Browse Source

BUG: For Watcom WMake use the short path to avoid quoting problems in custom commands with shell redirections.

Brad King 17 years ago
parent
commit
9631c499dc
1 changed files with 13 additions and 0 deletions
  1. 13 0
      Source/cmLocalUnixMakefileGenerator3.cxx

+ 13 - 0
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)
         {