diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2002-12-10 21:47:37 (GMT) |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2002-12-10 21:47:37 (GMT) |
commit | 3893ee72d2d5a04889cc1056b56029c9d60393c0 (patch) | |
tree | 3d96e526b726e7c0f2965489f74f2655776d6390 /Source/cmLocalUnixMakefileGenerator.cxx | |
parent | ab64db6ee84604c361a2d6f279398f7c9d3247f5 (diff) | |
download | CMake-3893ee72d2d5a04889cc1056b56029c9d60393c0.zip CMake-3893ee72d2d5a04889cc1056b56029c9d60393c0.tar.gz CMake-3893ee72d2d5a04889cc1056b56029c9d60393c0.tar.bz2 |
Add comment support, so that you can see in build process what the custom command does
Diffstat (limited to 'Source/cmLocalUnixMakefileGenerator.cxx')
-rw-r--r-- | Source/cmLocalUnixMakefileGenerator.cxx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Source/cmLocalUnixMakefileGenerator.cxx b/Source/cmLocalUnixMakefileGenerator.cxx index 84305f7..5e72e0f 100644 --- a/Source/cmLocalUnixMakefileGenerator.cxx +++ b/Source/cmLocalUnixMakefileGenerator.cxx @@ -1785,6 +1785,7 @@ void cmLocalUnixMakefileGenerator::OutputCustomRules(std::ostream& fout) { // escape spaces and convert to native slashes path for // the command + const char* comment = c->second.m_Comment.c_str(); std::string command = c->second.m_Command; cmSystemTools::ReplaceString(command, "/./", "/"); command = cmSystemTools::ConvertToOutputPath(command.c_str()); @@ -1811,7 +1812,7 @@ void cmLocalUnixMakefileGenerator::OutputCustomRules(std::ostream& fout) } // output rule this->OutputMakeRule(fout, - "Custom command", + (*comment?comment:"Custom command"), source.c_str(), depends.c_str(), command.c_str()); @@ -1838,7 +1839,7 @@ void cmLocalUnixMakefileGenerator::OutputCustomRules(std::ostream& fout) } // output rule this->OutputMakeRule(fout, - "Custom command", + (*comment?comment:"Custom command"), output->c_str(), depends.c_str(), command.c_str()); @@ -2511,7 +2512,8 @@ void cmLocalUnixMakefileGenerator::OutputMakeRule(std::ostream& fout, { replace = *i; m_Makefile->ExpandVariablesInString(replace); - if(count == 0 && replace[0] != '-' && replace.find("echo") != 0 + if(count == 0 && replace.find_first_not_of(" \t\n\r") != std::string::npos && + replace[0] != '-' && replace.find("echo") != 0 && replace.find("$(MAKE)") != 0) { std::string echostring = "Building "; |