Update scaninc to include missing .include files in assembler files
This commit is contained in:
parent
b420b98d63
commit
1a2b430646
4 changed files with 20 additions and 7 deletions
2
Makefile
2
Makefile
|
@ -225,7 +225,7 @@ endif
|
||||||
ifeq ($(NODEP),1)
|
ifeq ($(NODEP),1)
|
||||||
$(C_BUILDDIR)/%.o: c_dep :=
|
$(C_BUILDDIR)/%.o: c_dep :=
|
||||||
else
|
else
|
||||||
$(C_BUILDDIR)/%.o: c_dep = $(shell $(SCANINC) -I include $(C_SUBDIR)/$*.c)
|
$(C_BUILDDIR)/%.o: c_dep = $(shell $(SCANINC) -I include -I tools/agbcc/include $(C_SUBDIR)/$*.c)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(DINFO),1)
|
ifeq ($(DINFO),1)
|
||||||
|
|
|
@ -97,19 +97,26 @@ int main(int argc, char **argv)
|
||||||
}
|
}
|
||||||
for (auto include : file.GetIncludes())
|
for (auto include : file.GetIncludes())
|
||||||
{
|
{
|
||||||
|
bool exists = false;
|
||||||
|
std::string path("");
|
||||||
for (auto includeDir : includeDirs)
|
for (auto includeDir : includeDirs)
|
||||||
{
|
{
|
||||||
std::string path(includeDir + include);
|
path = includeDir + include;
|
||||||
if (CanOpenFile(path))
|
if (CanOpenFile(path))
|
||||||
{
|
{
|
||||||
bool inserted = dependencies.insert(path).second;
|
exists = true;
|
||||||
if (inserted)
|
|
||||||
{
|
|
||||||
filesToProcess.push(path);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (!exists && file.FileType() == SourceFileType::Asm)
|
||||||
|
{
|
||||||
|
path = include;
|
||||||
|
}
|
||||||
|
bool inserted = dependencies.insert(path).second;
|
||||||
|
if (inserted && exists)
|
||||||
|
{
|
||||||
|
filesToProcess.push(path);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
includeDirs.pop_back();
|
includeDirs.pop_back();
|
||||||
}
|
}
|
||||||
|
|
|
@ -89,6 +89,11 @@ SourceFile::SourceFile(std::string path)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SourceFileType SourceFile::FileType()
|
||||||
|
{
|
||||||
|
return m_file_type;
|
||||||
|
}
|
||||||
|
|
||||||
SourceFile::~SourceFile()
|
SourceFile::~SourceFile()
|
||||||
{
|
{
|
||||||
if (m_file_type == SourceFileType::Cpp || m_file_type == SourceFileType::Header)
|
if (m_file_type == SourceFileType::Cpp || m_file_type == SourceFileType::Header)
|
||||||
|
|
|
@ -50,6 +50,7 @@ public:
|
||||||
const std::set<std::string>& GetIncbins();
|
const std::set<std::string>& GetIncbins();
|
||||||
const std::set<std::string>& GetIncludes();
|
const std::set<std::string>& GetIncludes();
|
||||||
std::string& GetSrcDir();
|
std::string& GetSrcDir();
|
||||||
|
SourceFileType FileType();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
union InnerUnion {
|
union InnerUnion {
|
||||||
|
|
Loading…
Reference in a new issue