From aa0ac1642be0ac93da35598728057b53df3c0c56 Mon Sep 17 00:00:00 2001 From: Andy Cedilnik Date: Thu, 18 Apr 2002 15:58:35 -0400 Subject: [PATCH] Make quotes and echos to work on unix (hopefully) --- Source/cmUnixMakefileGenerator.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Source/cmUnixMakefileGenerator.cxx b/Source/cmUnixMakefileGenerator.cxx index 301d94521..c41af2470 100644 --- a/Source/cmUnixMakefileGenerator.cxx +++ b/Source/cmUnixMakefileGenerator.cxx @@ -2082,15 +2082,18 @@ void cmUnixMakefileGenerator::OutputMakeRule(std::ostream& fout, && replace.find("$(MAKE)") != 0) { std::string echostring = replace; - cmSystemTools::ReplaceString(echostring, "\n\t", "\n\techo "); // 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) { + cmSystemTools::ReplaceString(echostring, "\\\n", " "); + cmSystemTools::ReplaceString(echostring, " \t", " "); + cmSystemTools::ReplaceString(echostring, "\n\t", "\"\n\techo \""); fout << "\techo \"" << echostring.c_str() << "\"\n"; } else { + cmSystemTools::ReplaceString(echostring, "\n\t", "\n\techo "); fout << "\techo " << echostring.c_str() << "\n"; } }