diff options
author | Ken Martin <ken.martin@kitware.com> | 2005-06-10 14:45:08 (GMT) |
---|---|---|
committer | Ken Martin <ken.martin@kitware.com> | 2005-06-10 14:45:08 (GMT) |
commit | e559aa11ac92f0cedab7912f0672fb9471124467 (patch) | |
tree | 1036d72b3b57d354b367017e5b44d4a52bacc46d /Source/cmGlobalUnixMakefileGenerator3.cxx | |
parent | e1870805b4a700e6739f73f66f9be77bcc3e82f4 (diff) | |
download | CMake-e559aa11ac92f0cedab7912f0672fb9471124467.zip CMake-e559aa11ac92f0cedab7912f0672fb9471124467.tar.gz CMake-e559aa11ac92f0cedab7912f0672fb9471124467.tar.bz2 |
ENH: added support for forcing recomputation of depends
Diffstat (limited to 'Source/cmGlobalUnixMakefileGenerator3.cxx')
-rw-r--r-- | Source/cmGlobalUnixMakefileGenerator3.cxx | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx index 8c3c997..8df3b69 100644 --- a/Source/cmGlobalUnixMakefileGenerator3.cxx +++ b/Source/cmGlobalUnixMakefileGenerator3.cxx @@ -418,6 +418,22 @@ void cmGlobalUnixMakefileGenerator3 commands.push_back(lg->GetRecursiveMakeCall("Makefile2","clean")); lg->WriteMakeRule(makefileStream, "The main clean target", "clean", depends, commands); + + // write the depend rule, really a recompute depends rule + depends.clear(); + commands.clear(); + std::string cmakefileName = "Makefile.cmake"; + std::string runRule = + "$(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)"; + runRule += " --check-build-system "; + runRule += lg->Convert(cmakefileName.c_str(),cmLocalGenerator::NONE, + cmLocalGenerator::SHELL); + runRule += " 1"; + + commands.push_back(runRule); + lg->WriteMakeRule(makefileStream, "clear depends", + "depend", + depends, commands); } |