summaryrefslogtreecommitdiff
path: root/Source/cmMakefile.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2010-12-17 10:32:01 -0500
committerBrad King <brad.king@kitware.com>2010-12-17 10:32:01 -0500
commitad25a968b9e47e9e966d166dd0e494dc684ebd66 (patch)
tree5638f53977907708fd7473f5b3c9a582a36a1a92 /Source/cmMakefile.cxx
parentc128abe383e2f08e3f3e916f9b64356ca47056d1 (diff)
parent78c86f454272a2ac417ad6a89e4c7ed7e4975adb (diff)
downloadcmake-ad25a968b9e47e9e966d166dd0e494dc684ebd66.tar.gz
Merge branch 'ImprovedDotSupport2' into dev/strict-mode
Conflicts: Source/cmake.cxx
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r--Source/cmMakefile.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index bb8316ef1d..0913e0adda 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -928,6 +928,14 @@ cmMakefile::AddCustomCommandToOutput(const std::vector<std::string>& outputs,
// Construct a rule file associated with the first output produced.
std::string outName = outputs[0];
outName += ".rule";
+ const char* dir =
+ this->LocalGenerator->GetGlobalGenerator()->
+ GetCMakeCFGInitDirectory();
+ if(dir && dir[0] == '$')
+ {
+ cmSystemTools::ReplaceString(outName, dir,
+ cmake::GetCMakeFilesDirectory());
+ }
// Check if the rule file already exists.
file = this->GetSource(outName.c_str());
if(file && file->GetCustomCommand() && !replace)