summaryrefslogtreecommitdiffstats
path: root/Source/cmUnixMakefileGenerator.cxx
diff options
context:
space:
mode:
authorKen Martin <ken.martin@kitware.com>2001-06-12 13:00:21 (GMT)
committerKen Martin <ken.martin@kitware.com>2001-06-12 13:00:21 (GMT)
commitff529aa8611ca8c4f65aa837685c7d18a9d5cfd7 (patch)
tree18d3f41ab504693ed0fb19a9abceb49fedc34ae5 /Source/cmUnixMakefileGenerator.cxx
parentd0614d75ea2fa259bed8e48226f85b0f5553cfb5 (diff)
downloadCMake-ff529aa8611ca8c4f65aa837685c7d18a9d5cfd7.zip
CMake-ff529aa8611ca8c4f65aa837685c7d18a9d5cfd7.tar.gz
CMake-ff529aa8611ca8c4f65aa837685c7d18a9d5cfd7.tar.bz2
some cleanup to the make depend process
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)