ENH: Moved custom command rule files into special CMakeCustomCommands.dir subdirectory.

This commit is contained in:
Brad King 2004-11-19 09:42:08 -05:00
parent 4352c2faae
commit 6f407ecb17

View File

@ -24,7 +24,7 @@
#include <queue> #include <queue>
// Quick-switch for generating old makefiles. // Quick-switch for generating old makefiles.
#if 1 #if 0
# define CMLUMG_MAKEFILE_NAME "Makefile" # define CMLUMG_MAKEFILE_NAME "Makefile"
#else #else
# define CMLUMG_WRITE_OLD_MAKEFILE # define CMLUMG_WRITE_OLD_MAKEFILE
@ -522,9 +522,15 @@ cmLocalUnixMakefileGenerator2
} }
const cmCustomCommand& cc = *source.GetCustomCommand(); 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. // Construct the name of the rule file.
std::string customName = this->GetCustomBaseName(cc); std::string customName = this->GetCustomBaseName(cc);
std::string ruleFileName = customName; std::string ruleFileName = dir;
ruleFileName += "/";
ruleFileName += customName;
ruleFileName += ".make"; ruleFileName += ".make";
// If this is a duplicate rule produce an error. // If this is a duplicate rule produce an error.