From 9631c499dc31ea1aba70201afc1a565b84c33620 Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 30 Apr 2008 15:58:56 -0400 Subject: BUG: For Watcom WMake use the short path to avoid quoting problems in custom commands with shell redirections. --- Source/cmLocalUnixMakefileGenerator3.cxx | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index 14201a4..c4f7d0e 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -1019,6 +1019,19 @@ cmLocalUnixMakefileGenerator3 // without the current directory being in the search path. cmd = "./" + cmd; } + if(this->WatcomWMake && + cmSystemTools::FileIsFullPath(cmd.c_str()) && + cmd.find(" ") != cmd.npos) + { + // On Watcom WMake use the windows short path for the command + // name. This is needed to avoid funny quoting problems on + // lines with shell redirection operators. + std::string scmd; + if(cmSystemTools::GetShortPath(cmd.c_str(), scmd)) + { + cmd = scmd; + } + } cmd = this->Convert(cmd.c_str(),NONE,SHELL); for(unsigned int j=1; j < commandLine.size(); ++j) { -- cgit v0.12