diff options
author | Marcus Huderle <huderlem@gmail.com> | 2019-08-28 16:52:33 -0500 |
---|---|---|
committer | huderlem <huderlem@gmail.com> | 2019-08-29 16:37:42 -0500 |
commit | 1a2b43064638207b5267ed70cd3d12c385591292 (patch) | |
tree | e695e36290bc82da0c99d7419252137c15b46d37 /tools/scaninc/scaninc.cpp | |
parent | b420b98d633f16b0905295345cb671b2834b956e (diff) |
Update scaninc to include missing .include files in assembler files
Diffstat (limited to 'tools/scaninc/scaninc.cpp')
-rw-r--r-- | tools/scaninc/scaninc.cpp | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/tools/scaninc/scaninc.cpp b/tools/scaninc/scaninc.cpp index b95cbd033..a3e40c5d9 100644 --- a/tools/scaninc/scaninc.cpp +++ b/tools/scaninc/scaninc.cpp @@ -97,19 +97,26 @@ int main(int argc, char **argv) } for (auto include : file.GetIncludes()) { + bool exists = false; + std::string path(""); for (auto includeDir : includeDirs) { - std::string path(includeDir + include); + path = includeDir + include; if (CanOpenFile(path)) { - bool inserted = dependencies.insert(path).second; - if (inserted) - { - filesToProcess.push(path); - } + exists = true; break; } } + if (!exists && file.FileType() == SourceFileType::Asm) + { + path = include; + } + bool inserted = dependencies.insert(path).second; + if (inserted && exists) + { + filesToProcess.push(path); + } } includeDirs.pop_back(); } |