summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalUnixMakefileGenerator2.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2004-11-19 14:42:08 (GMT)
committerBrad King <brad.king@kitware.com>2004-11-19 14:42:08 (GMT)
commit6f407ecb17983115fa55b9d1250f7b67e6684aec (patch)
treee4d3acefcc0ddc88cb05f1fa0c8bd9ca799d67bc /Source/cmLocalUnixMakefileGenerator2.cxx
parent4352c2faae1536fe8f10e11771ca7c9217dcdc58 (diff)
downloadCMake-6f407ecb17983115fa55b9d1250f7b67e6684aec.zip
CMake-6f407ecb17983115fa55b9d1250f7b67e6684aec.tar.gz
CMake-6f407ecb17983115fa55b9d1250f7b67e6684aec.tar.bz2
ENH: Moved custom command rule files into special CMakeCustomCommands.dir subdirectory.
Diffstat (limited to 'Source/cmLocalUnixMakefileGenerator2.cxx')
-rw-r--r--Source/cmLocalUnixMakefileGenerator2.cxx10
1 files changed, 8 insertions, 2 deletions
diff --git a/Source/cmLocalUnixMakefileGenerator2.cxx b/Source/cmLocalUnixMakefileGenerator2.cxx
index 56b733c..0879306 100644
--- a/Source/cmLocalUnixMakefileGenerator2.cxx
+++ b/Source/cmLocalUnixMakefileGenerator2.cxx
@@ -24,7 +24,7 @@
#include <queue>
// Quick-switch for generating old makefiles.
-#if 1
+#if 0
# define CMLUMG_MAKEFILE_NAME "Makefile"
#else
# define CMLUMG_WRITE_OLD_MAKEFILE
@@ -522,9 +522,15 @@ cmLocalUnixMakefileGenerator2
}
const cmCustomCommand& cc = *source.GetCustomCommand();
+ // Create a directory for custom rule files.
+ std::string dir = "CMakeCustomCommands.dir";
+ cmSystemTools::MakeDirectory(this->ConvertToFullPath(dir).c_str());
+
// Construct the name of the rule file.
std::string customName = this->GetCustomBaseName(cc);
- std::string ruleFileName = customName;
+ std::string ruleFileName = dir;
+ ruleFileName += "/";
+ ruleFileName += customName;
ruleFileName += ".make";
// If this is a duplicate rule produce an error.