summaryrefslogtreecommitdiffstats
path: root/Source/cmUnixMakefileGenerator.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmUnixMakefileGenerator.cxx')
-rw-r--r--Source/cmUnixMakefileGenerator.cxx32
1 files changed, 31 insertions, 1 deletions
diff --git a/Source/cmUnixMakefileGenerator.cxx b/Source/cmUnixMakefileGenerator.cxx
index afcd1ae..333da63 100644
--- a/Source/cmUnixMakefileGenerator.cxx
+++ b/Source/cmUnixMakefileGenerator.cxx
@@ -71,12 +71,42 @@ void cmUnixMakefileGenerator::GenerateMakefile()
// Generate depends
cmMakeDepend md;
md.SetMakefile(m_Makefile);
- md.DoDepends();
+ md.GenerateDependInformation();
+ this->ProcessDepends(md);
// output the makefile fragment
this->OutputMakefile("Makefile");
}
}
+void cmUnixMakefileGenerator::ProcessDepends(const cmMakeDepend &md)
+{
+ // Now create cmDependInformation objects for files in the directory
+ cmTargets &tgts = m_Makefile->GetTargets();
+ for(cmTargets::iterator l = tgts.begin(); l != tgts.end(); l++)
+ {
+ std::vector<cmSourceFile> &classes = l->second.GetSourceFiles();
+ for(std::vector<cmSourceFile>::iterator i = classes.begin();
+ i != classes.end(); ++i)
+ {
+ if(!i->GetIsAHeaderFileOnly())
+ {
+ // get the depends
+ const cmDependInformation *info =
+ md.GetDependInformationForSourceFile(*i);
+ if (info)
+ {
+ for( cmDependInformation::IndexSet::const_iterator indx =
+ info->m_IndexSet.begin();
+ indx != info->m_IndexSet.end(); ++indx)
+ {
+ i->GetDepends().push_back(md.GetDependInformation()[*indx]->m_FullPath);
+ }
+ }
+ }
+ }
+ }
+}
+
// This is where CMakeTargets.make is generated
void cmUnixMakefileGenerator::OutputMakefile(const char* file)