From 6f407ecb17983115fa55b9d1250f7b67e6684aec Mon Sep 17 00:00:00 2001 From: Brad King Date: Fri, 19 Nov 2004 09:42:08 -0500 Subject: [PATCH] ENH: Moved custom command rule files into special CMakeCustomCommands.dir subdirectory. --- Source/cmLocalUnixMakefileGenerator2.cxx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Source/cmLocalUnixMakefileGenerator2.cxx b/Source/cmLocalUnixMakefileGenerator2.cxx index 56b733c30..08793062b 100644 --- a/Source/cmLocalUnixMakefileGenerator2.cxx +++ b/Source/cmLocalUnixMakefileGenerator2.cxx @@ -24,7 +24,7 @@ #include // 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.