[CMake] mingw vs MSYS makefiles

Alan W. Irwin irwin at beluga.phys.uvic.ca
Thu Feb 23 17:18:19 EST 2012


On 2012-02-23 16:02-0500 Bill Hoffman wrote:

> Seems to me there are 
> only two [MinGW/MSYS] cases regardless of how it was installed:
>
> 1. you have /bin/sh in your PATH and gmake runs commands via /bin/sh
> 2. you do not have /bin/sh in your PATH and gmake runs commands via the 
> native windows shell.

To add to the confusion, modern MinGW and MSYS have _two_ different
make commands.  One is called MinGW/bin/mingw32-make.exe and is used
by the "MinGW Makefiles" generator while the other is called
MinGW/msys/1.0/bin/make.exe and is used by the "MSYS Makefiles"
generator.  I presume those two executables correspond to various
forks of gmake.  There may be some other reason why they are different
from one another, but one distinct possibility is that
mingw32-make.exe now completely ignores the existence of sh.exe
and exclusively uses the native windows shell.

Bill, have you done any recent testing of the "MinGW Makefiles" case
with MinGW/bin/mingw32-make.exe to see if it is still necessary that
sh.exe not be on the PATH?  If not, then the cmake test for "sh.exe
not on the PATH" could be replaced by a check that the "MinGW
Makefiles" generator finds and uses mingw32-make.exe while the "MSYS
Makefiles" generator find and uses make.exe.

As the original poster said, it is really nice to have MSYS on your
PATH even if you are using the "MinGW Makefiles" generator.  I work
around this issue by renaming sh.exe to something else, but that
workaround would not be necessary _if_ the existence of sh.exe on the
PATH no longer affects what mingw32-make.exe does.

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state
implementation for stellar interiors (freeeos.sf.net); the Time
Ephemerides project (timeephem.sf.net); PLplot scientific plotting
software package (plplot.sf.net); the libLASi project
(unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
and the Linux Brochure Project (lbproject.sf.net).
__________________________

Linux-powered Science
__________________________


More information about the CMake mailing list