diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2002-01-02 16:54:50 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2002-01-02 16:54:50 (GMT) |
commit | d253ef49bc4ff15991507053db4c43659f4f9509 (patch) | |
tree | 299fcb2c04cd79fd939a1b7288b52048021ca9b2 /Source/cmUnixMakefileGenerator.cxx | |
parent | 0ac6b2d7a034d306ba5fde56ec6bdd5cf54aa0b8 (diff) | |
download | CMake-d253ef49bc4ff15991507053db4c43659f4f9509.zip CMake-d253ef49bc4ff15991507053db4c43659f4f9509.tar.gz CMake-d253ef49bc4ff15991507053db4c43659f4f9509.tar.bz2 |
BUG: put back recursive call to make for checking sources
Diffstat (limited to 'Source/cmUnixMakefileGenerator.cxx')
-rw-r--r-- | Source/cmUnixMakefileGenerator.cxx | 15 |
1 files changed, 13 insertions, 2 deletions
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", |