summaryrefslogtreecommitdiffstats
path: root/Source/cmUnixMakefileGenerator.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2002-04-18 17:44:50 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2002-04-18 17:44:50 (GMT)
commitfe4eb49014f31a7dbe49d2c253e50a0cc5514b56 (patch)
treeb09ced979321d21db32f31affb1307ea32d5af2d /Source/cmUnixMakefileGenerator.cxx
parentdc15248b40672ddff590d6aedbb0bad9e0ddae4b (diff)
downloadCMake-fe4eb49014f31a7dbe49d2c253e50a0cc5514b56.zip
CMake-fe4eb49014f31a7dbe49d2c253e50a0cc5514b56.tar.gz
CMake-fe4eb49014f31a7dbe49d2c253e50a0cc5514b56.tar.bz2
BUG: quote the echo commands
Diffstat (limited to 'Source/cmUnixMakefileGenerator.cxx')
-rw-r--r--Source/cmUnixMakefileGenerator.cxx13
1 files changed, 10 insertions, 3 deletions
diff --git a/Source/cmUnixMakefileGenerator.cxx b/Source/cmUnixMakefileGenerator.cxx
index 179efed..301d945 100644
--- a/Source/cmUnixMakefileGenerator.cxx
+++ b/Source/cmUnixMakefileGenerator.cxx
@@ -2083,9 +2083,16 @@ void cmUnixMakefileGenerator::OutputMakeRule(std::ostream& fout,
{
std::string echostring = replace;
cmSystemTools::ReplaceString(echostring, "\n\t", "\n\techo ");
- // let's try to see what happens without \"
- // fout << "\techo \"" << echostring.c_str() << "\"\n";
- fout << "\techo " << echostring.c_str() << "\n";
+ // for unix we want to quote the output of echo
+ // for nmake and borland, the echo should not be quoted
+ if(strcmp(this->GetName(), "Unix Makefiles") == 0)
+ {
+ fout << "\techo \"" << echostring.c_str() << "\"\n";
+ }
+ else
+ {
+ fout << "\techo " << echostring.c_str() << "\n";
+ }
}
fout << "\t" << replace.c_str() << "\n";
}