diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2001-12-21 20:39:43 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2001-12-21 20:39:43 (GMT) |
commit | 2c7bb2bf343f7c2614706c012ba4f751231802c3 (patch) | |
tree | d3af198e66b956f52725af9412232557169641f1 | |
parent | 65339be84a3e271ee0c2c4340e03f448d62a97f0 (diff) | |
download | CMake-2c7bb2bf343f7c2614706c012ba4f751231802c3.zip CMake-2c7bb2bf343f7c2614706c012ba4f751231802c3.tar.gz CMake-2c7bb2bf343f7c2614706c012ba4f751231802c3.tar.bz2 |
BUG: fix so you can remove a directory in the source tree, and clean up echo of commands
-rw-r--r-- | Source/cmNMakeMakefileGenerator.cxx | 20 | ||||
-rw-r--r-- | Source/cmUnixMakefileGenerator.cxx | 36 |
2 files changed, 46 insertions, 10 deletions
diff --git a/Source/cmNMakeMakefileGenerator.cxx b/Source/cmNMakeMakefileGenerator.cxx index 5e56d2a..fca80a7 100644 --- a/Source/cmNMakeMakefileGenerator.cxx +++ b/Source/cmNMakeMakefileGenerator.cxx @@ -309,28 +309,40 @@ void cmNMakeMakefileGenerator::OutputMakeRule(std::ostream& fout, { replace = ShortPathCommand(command); m_Makefile->ExpandVariablesInString(replace); - fout << "\t" << "echo " << replace.c_str() << "\n"; + if(replace[0] != '-' && replace.find("echo") != 0) + { + fout << "\t" << "echo " << replace.c_str() << "\n"; + } fout << "\t" << replace.c_str() << "\n"; } if(command2) { replace = ShortPathCommand(command2); m_Makefile->ExpandVariablesInString(replace); - fout << "\t" << "echo " << replace.c_str() << "\n"; + if(replace[0] != '-' && replace.find("echo") != 0) + { + fout << "\t" << "echo " << replace.c_str() << "\n"; + } fout << "\t" << replace.c_str() << "\n"; } if(command3) { replace = ShortPathCommand(command3); m_Makefile->ExpandVariablesInString(replace); - fout << "\t" << "echo " << replace.c_str() << "\n"; + if(replace[0] != '-' && replace.find("echo") != 0) + { + fout << "\t" << "echo " << replace.c_str() << "\n"; + } fout << "\t" << replace.c_str() << "\n"; } if(command4) { replace = ShortPathCommand(command4); m_Makefile->ExpandVariablesInString(replace); - fout << "\t" << "echo " << replace.c_str() << "\n"; + if(replace[0] != '-' && replace.find("echo") != 0) + { + fout << "\t" << "echo " << replace.c_str() << "\n"; + } fout << "\t" << replace.c_str() << "\n"; } fout << "\n"; diff --git a/Source/cmUnixMakefileGenerator.cxx b/Source/cmUnixMakefileGenerator.cxx index 11e1ec6..4e77293 100644 --- a/Source/cmUnixMakefileGenerator.cxx +++ b/Source/cmUnixMakefileGenerator.cxx @@ -1511,15 +1511,27 @@ void cmUnixMakefileGenerator::OutputMakeRules(std::ostream& fout) this->BuildInSubDirectory(fout, m_Makefile->GetHomeOutputDirectory(), "depend", 0); + const char* depend_subdirs = 0; + if(!m_Makefile->GetSubDirectories().empty()) + { + this->OutputMakeRule(fout, + "Rule to force build of cmake.depend in subdirectories", + "depend_subdirs", + "$(SUBDIR_DEPEND)", + 0 + ); + depend_subdirs = "$(MAKE) -$(MAKEFLAGS) $(MAKESILENT) depend_subdirs"; + } this->OutputMakeRule(fout, "Rule to force the build of cmake.depends", "depend", - "$(SUBDIR_DEPEND)", + 0, "$(CMAKE_COMMAND) " "-S$(CMAKE_CURRENT_SOURCE) -O$(CMAKE_CURRENT_BINARY) " "-H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)", "-$(RM) cmake.depends_mark", - "echo mark > cmake.depends_mark" + "echo mark > cmake.depends_mark", + depend_subdirs ); this->OutputMakeRule(fout, "Rebuild CMakeCache.txt file", @@ -1739,28 +1751,40 @@ void cmUnixMakefileGenerator::OutputMakeRule(std::ostream& fout, { replace = command; m_Makefile->ExpandVariablesInString(replace); - fout << "\t" << "echo " << replace.c_str() << "\n"; + if(replace[0] != '-' || replace.find("echo") != 0) + { + fout << "\t" << "echo " << replace.c_str() << "\n"; + } fout << "\t" << replace.c_str() << "\n"; } if(command2) { replace = command2; m_Makefile->ExpandVariablesInString(replace); - fout << "\t" << "echo " << replace.c_str() << "\n"; + if(replace[0] != '-' && replace.find("echo") != 0) + { + fout << "\t" << "echo " << replace.c_str() << "\n"; + } fout << "\t" << replace.c_str() << "\n"; } if(command3) { replace = command3; m_Makefile->ExpandVariablesInString(replace); - fout << "\t" << "echo " << replace.c_str() << "\n"; + if(replace[0] != '-' && replace.find("echo") != 0) + { + fout << "\t" << "echo " << replace.c_str() << "\n"; + } fout << "\t" << replace.c_str() << "\n"; } if(command4) { replace = command4; m_Makefile->ExpandVariablesInString(replace); - fout << "\t" << "echo " << replace.c_str() << "\n"; + if(replace[0] != '-' && replace.find("echo") != 0) + { + fout << "\t" << "echo " << replace.c_str() << "\n"; + } fout << "\t" << replace.c_str() << "\n"; } fout << "\n"; |