summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2005-04-27 15:46:46 (GMT)
committerBrad King <brad.king@kitware.com>2005-04-27 15:46:46 (GMT)
commit4b371ed7fe32ddf1bc2633a7cbcae0943a908d45 (patch)
treea73675a8d0e5e1e402fb368e50baad6aa6db4922 /Source
parent0ef2334a5f7678e63e49c916dd35947e172804f9 (diff)
downloadCMake-4b371ed7fe32ddf1bc2633a7cbcae0943a908d45.zip
CMake-4b371ed7fe32ddf1bc2633a7cbcae0943a908d45.tar.gz
CMake-4b371ed7fe32ddf1bc2633a7cbcae0943a908d45.tar.bz2
ENH: Added dependency on all for install rule to make sure build is up to date before installing. This behavior can be disabled by setting CMAKE_SKIP_INSTALL_ALL_DEPENDENCY to true.
Diffstat (limited to 'Source')
-rw-r--r--Source/cmLocalUnixMakefileGenerator2.cxx11
1 files changed, 9 insertions, 2 deletions
diff --git a/Source/cmLocalUnixMakefileGenerator2.cxx b/Source/cmLocalUnixMakefileGenerator2.cxx
index 9de8f4d..e8183ee 100644
--- a/Source/cmLocalUnixMakefileGenerator2.cxx
+++ b/Source/cmLocalUnixMakefileGenerator2.cxx
@@ -1079,7 +1079,7 @@ cmLocalUnixMakefileGenerator2
// Write special "install" target to run cmake_install.cmake script.
{
- std::vector<std::string> no_depends;
+ std::vector<std::string> depends;
std::vector<std::string> commands;
std::string cmd;
if(m_Makefile->GetDefinition("CMake_BINARY_DIR"))
@@ -1096,9 +1096,16 @@ cmLocalUnixMakefileGenerator2
}
cmd += " -P cmake_install.cmake";
commands.push_back(cmd);
+ const char* noall =
+ m_Makefile->GetDefinition("CMAKE_SKIP_INSTALL_ALL_DEPENDENCY");
+ if(!noall || cmSystemTools::IsOff(noall))
+ {
+ // Drive the build before installing.
+ depends.push_back("all");
+ }
this->WriteMakeRule(makefileStream,
"Special rule to run installation script.",
- "install", no_depends, commands);
+ "install", depends, commands);
}
// Write special "rebuild_cache" target to re-run cmake.