[cmake-commits] king committed cmGlobalMSYSMakefileGenerator.cxx 1.10 1.11 cmLocalGenerator.cxx 1.153 1.154 cmLocalGenerator.h 1.66 1.67 cmLocalUnixMakefileGenerator3.h 1.59 1.60

cmake-commits at cmake.org cmake-commits at cmake.org
Thu Sep 28 10:37:23 EDT 2006


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

Modified Files:
	cmGlobalMSYSMakefileGenerator.cxx cmLocalGenerator.cxx 
	cmLocalGenerator.h cmLocalUnixMakefileGenerator3.h 
Log Message:
BUG: MSYS makefile shell needs posix paths to executables in some cases and it does not hurt to do it always.


Index: cmLocalUnixMakefileGenerator3.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmLocalUnixMakefileGenerator3.h,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -d -r1.59 -r1.60
--- cmLocalUnixMakefileGenerator3.h	23 Aug 2006 13:45:24 -0000	1.59
+++ cmLocalUnixMakefileGenerator3.h	28 Sep 2006 14:37:19 -0000	1.60
@@ -108,6 +108,13 @@
   void SetWindowsShell(bool v)  {this->WindowsShell = v;}
 
   /**
+   * Set to true if the shell being used is the MSYS shell.
+   * This controls if statements in the makefile and the SHELL variable.
+   * The default is false.
+   */
+  void SetMSYSShell(bool v)  {this->MSYSShell = v;}
+
+  /**
    * If set to true, then NULL is set to nil for non Windows_NT.
    * This uses make syntax used by nmake and borland.
    * The default is false.

Index: cmLocalGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmLocalGenerator.cxx,v
retrieving revision 1.153
retrieving revision 1.154
diff -u -d -r1.153 -r1.154
--- cmLocalGenerator.cxx	28 Sep 2006 13:49:40 -0000	1.153
+++ cmLocalGenerator.cxx	28 Sep 2006 14:37:18 -0000	1.154
@@ -40,6 +40,7 @@
   this->Parent = 0;
   this->WindowsShell = false;
   this->WindowsVSIDE = false;
+  this->MSYSShell = false;
   this->IgnoreLibPrefix = false;
   this->UseRelativePaths = false;
   this->Configured = false;
@@ -2007,6 +2008,18 @@
       {
       cmSystemTools::SetForceUnixPaths(true);
       }
+
+    // For the MSYS shell convert drive letters to posix paths, so
+    // that c:/some/path becomes /c/some/path.  This is needed to
+    // avoid problems with the shell path translation.
+    if(this->MSYSShell)
+      {
+      if(result.size() > 2 && result[1] == ':')
+        {
+        result[1] = result[0];
+        result[0] = '/';
+        }
+      }
     }
   return result;
 }

Index: cmLocalGenerator.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmLocalGenerator.h,v
retrieving revision 1.66
retrieving revision 1.67
diff -u -d -r1.66 -r1.67
--- cmLocalGenerator.h	28 Sep 2006 13:49:40 -0000	1.66
+++ cmLocalGenerator.h	28 Sep 2006 14:37:19 -0000	1.67
@@ -274,6 +274,7 @@
   bool WindowsShell;
   bool WindowsVSIDE;
   bool ForceUnixPath;
+  bool MSYSShell;
   bool UseRelativePaths;
   bool IgnoreLibPrefix;
   bool Configured;

Index: cmGlobalMSYSMakefileGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalMSYSMakefileGenerator.cxx,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- cmGlobalMSYSMakefileGenerator.cxx	15 Jun 2006 20:17:11 -0000	1.10
+++ cmGlobalMSYSMakefileGenerator.cxx	28 Sep 2006 14:37:18 -0000	1.11
@@ -88,6 +88,7 @@
 {
   cmLocalUnixMakefileGenerator3* lg = new cmLocalUnixMakefileGenerator3;
   lg->SetWindowsShell(false);
+  lg->SetMSYSShell(true);
   lg->SetGlobalGenerator(this);
   lg->SetIgnoreLibPrefix(true);
   lg->SetPassMakeflags(false);



More information about the Cmake-commits mailing list