summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2002-01-02 16:54:50 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2002-01-02 16:54:50 (GMT)
commitd253ef49bc4ff15991507053db4c43659f4f9509 (patch)
tree299fcb2c04cd79fd939a1b7288b52048021ca9b2
parent0ac6b2d7a034d306ba5fde56ec6bdd5cf54aa0b8 (diff)
downloadCMake-d253ef49bc4ff15991507053db4c43659f4f9509.zip
CMake-d253ef49bc4ff15991507053db4c43659f4f9509.tar.gz
CMake-d253ef49bc4ff15991507053db4c43659f4f9509.tar.bz2
BUG: put back recursive call to make for checking sources
-rw-r--r--Source/cmNMakeMakefileGenerator.cxx1
-rw-r--r--Source/cmUnixMakefileGenerator.cxx15
2 files changed, 14 insertions, 2 deletions
diff --git a/Source/cmNMakeMakefileGenerator.cxx b/Source/cmNMakeMakefileGenerator.cxx
index 99869fa..0685d82 100644
--- a/Source/cmNMakeMakefileGenerator.cxx
+++ b/Source/cmNMakeMakefileGenerator.cxx
@@ -726,6 +726,7 @@ void cmNMakeMakefileGenerator::OutputBuildLibraryInDir(std::ostream& fout,
fout << cmSystemTools::EscapeSpaces(fullpath)
<< ":\n\tcd " << cmSystemTools::EscapeSpaces(path) << "\n"
<< "\t$(MAKE) -$(MAKEFLAGS) $(MAKESILENT) cmake.depends\n"
+ << "\t$(MAKE) -$(MAKEFLAGS) $(MAKESILENT) cmake.check_depends\n"
<< "\t$(MAKE) -$(MAKEFLAGS) $(MAKESILENT) -f cmake.check_depends\n"
<< "\t$(MAKE) $(MAKESILENT) " << cmSystemTools::EscapeSpaces(fullpath)
<< "\n\tcd " <<
diff --git a/Source/cmUnixMakefileGenerator.cxx b/Source/cmUnixMakefileGenerator.cxx
index b932793..071f943 100644
--- a/Source/cmUnixMakefileGenerator.cxx
+++ b/Source/cmUnixMakefileGenerator.cxx
@@ -249,10 +249,11 @@ void cmUnixMakefileGenerator::OutputMakefile(const char* file)
// Set up the default target as the VERY first target, so that make with no arguments will run it
this->
OutputMakeRule(fout,
- "Default target executed when no arguments are given to make, first make sure cmake.depends is up-to-date, then check the sources, then build the all target",
+ "Default target executed when no arguments are given to make, first make sure cmake.depends exists, cmake.check_depends is up-to-date, check the sources, then build the all target",
"default_target",
0,
"$(MAKE) -$(MAKEFLAGS) $(MAKESILENT) cmake.depends",
+ "$(MAKE) -$(MAKEFLAGS) $(MAKESILENT) cmake.check_depends",
"$(MAKE) -$(MAKEFLAGS) $(MAKESILENT) -f cmake.check_depends",
"$(MAKE) -$(MAKEFLAGS) $(MAKESILENT) all");
@@ -900,6 +901,7 @@ void cmUnixMakefileGenerator::OutputBuildLibraryInDir(std::ostream& fout,
fout << cmSystemTools::EscapeSpaces(fullpath)
<< ":\n\tcd " << cmSystemTools::EscapeSpaces(path)
<< "; $(MAKE) -$(MAKEFLAGS) $(MAKESILENT) cmake.depends"
+ << "; $(MAKE) -$(MAKEFLAGS) $(MAKESILENT) cmake.check_depends"
<< "; $(MAKE) -$(MAKEFLAGS) $(MAKESILENT) -f cmake.check_depends"
<< "; $(MAKE) $(MAKESILENT) " << makeTarget << "\n\n";
}
@@ -1598,7 +1600,7 @@ void cmUnixMakefileGenerator::OutputMakeRules(std::ostream& fout)
" $(TARGETS)");
}
// collect up all the sources
- std::string allsources("$(CMAKE_MAKEFILE_SOURCES) ");
+ std::string allsources;
std::map<cmStdString, cmTarget>& targets = m_Makefile->GetTargets();
for(std::map<cmStdString, cmTarget>::const_iterator target = targets.begin();
target != targets.end(); ++target)
@@ -1619,11 +1621,20 @@ void cmUnixMakefileGenerator::OutputMakeRules(std::ostream& fout)
this->OutputMakeRule(fout,
"Rule to build the cmake.depends and Makefile as side effect, if a source cmakelist file is out of date.",
"cmake.depends",
+ "$(CMAKE_MAKEFILE_SOURCES)",
+ "$(CMAKE_COMMAND) "
+ "-S$(CMAKE_CURRENT_SOURCE) -O$(CMAKE_CURRENT_BINARY) "
+ "-H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)"
+ );
+ this->OutputMakeRule(fout,
+ "Rule to build the cmake.check_depends and Makefile as side effect, if any source file has changed.",
+ "cmake.check_depends",
allsources.c_str(),
"$(CMAKE_COMMAND) "
"-S$(CMAKE_CURRENT_SOURCE) -O$(CMAKE_CURRENT_BINARY) "
"-H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)"
);
+
this->OutputMakeRule(fout,
"Rule to force the build of cmake.depends",
"depend",