[cmake-commits] king committed cmGlobalMinGWMakefileGenerator.cxx 1.7 1.8 cmLocalUnixMakefileGenerator3.cxx 1.180 1.181 cmLocalUnixMakefileGenerator3.h 1.61 1.62

cmake-commits at cmake.org cmake-commits at cmake.org
Thu Oct 5 14:51:23 EDT 2006


Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv32055

Modified Files:
	cmGlobalMinGWMakefileGenerator.cxx 
	cmLocalUnixMakefileGenerator3.cxx 
	cmLocalUnixMakefileGenerator3.h 
Log Message:
BUG: Hack to make echo command work properly in mingw32-make.


Index: cmLocalUnixMakefileGenerator3.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmLocalUnixMakefileGenerator3.h,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -d -r1.61 -r1.62
--- cmLocalUnixMakefileGenerator3.h	4 Oct 2006 22:52:29 -0000	1.61
+++ cmLocalUnixMakefileGenerator3.h	5 Oct 2006 18:51:20 -0000	1.62
@@ -131,6 +131,14 @@
   void SetSilentNoColon(bool v)  {this->SilentNoColon = v;}
 
   /**
+   * Set the command to use for native make shell echo.  The value
+   * should include all parts of the command up to the beginning of
+   * the message (including a whitespace separator).
+   */
+  void SetNativeEchoCommand(const char* cmd)
+    { this->NativeEchoCommand = cmd; }
+
+  /**
    * Set the string used to include one makefile into another default
    * is include.
    */
@@ -332,6 +340,7 @@
   std::string ExecutableOutputPath;
   std::string LibraryOutputPath;
   std::string ConfigurationName;
+  std::string NativeEchoCommand;
   bool DefineWindowsNULL;
   bool UnixCD;
   bool PassMakeflags;

Index: cmLocalUnixMakefileGenerator3.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmLocalUnixMakefileGenerator3.cxx,v
retrieving revision 1.180
retrieving revision 1.181
diff -u -d -r1.180 -r1.181
--- cmLocalUnixMakefileGenerator3.cxx	4 Oct 2006 22:52:29 -0000	1.180
+++ cmLocalUnixMakefileGenerator3.cxx	5 Oct 2006 18:51:20 -0000	1.181
@@ -50,6 +50,7 @@
   this->ColorMakefile = false;
   this->SkipPreprocessedSourceRules = false;
   this->SkipAssemblySourceRules = false;
+  this->NativeEchoCommand = "@echo ";
 }
 
 //----------------------------------------------------------------------------
@@ -1044,7 +1045,7 @@
         if(color_name.empty())
           {
           // Use the native echo command.
-          cmd = "@echo ";
+          cmd = this->NativeEchoCommand;
           cmd += this->EscapeForShell(line.c_str(), false, true);
           }
         else

Index: cmGlobalMinGWMakefileGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalMinGWMakefileGenerator.cxx,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- cmGlobalMinGWMakefileGenerator.cxx	15 Jun 2006 20:17:11 -0000	1.7
+++ cmGlobalMinGWMakefileGenerator.cxx	5 Oct 2006 18:51:20 -0000	1.8
@@ -61,6 +61,22 @@
   lg->SetIgnoreLibPrefix(true);
   lg->SetPassMakeflags(false);
   lg->SetUnixCD(true);
+
+  // mingw32-make has trouble running code like
+  //
+  //  @echo message with spaces
+  //
+  // If quotes are added
+  //
+  //  @echo "message with spaces"
+  //
+  // it runs but the quotes are displayed.  Instead we can separate
+  // with a semicolon
+  //
+  //  @echo;message with spaces
+  //
+  // to hack around the problem.
+  lg->SetNativeEchoCommand("@echo;");
   return lg;
 }
 



More information about the Cmake-commits mailing list