[CMake] CMake Digest, Vol 100, Issue 38

LM lmemsm at gmail.com
Thu Aug 16 10:58:38 EDT 2012


On Thu, Aug 16, 2012 Bill wrote:
> You should be able to reproduce this with a simple makefile setup like this:
>
> -----Makefile-----
> foo:
>        $(MAKE) -f foo.make
>
> ----foo.make----
> all:
>        echo "foo bar"

If I run this without MAKE set, I get errors.  If I export MAKE as
follows, the script works fine.
export MAKE=/bin/make

>
> So, the C:/MinGW/msys/bin/make.exe make is setting MAKE to be make.  You
> don't perhaps have an environment variable MAKE set to make do you?  Is
> C:/MinGW/msys/bin/ in your PATH?
>
> You could also try a makefile like this:
> all:
>      echo $(PATH)
>      echo $(MAKE)

Tried the following:
all:
	  echo $(PATH)
	   echo $(MAKE)
	   which $(MAKE)

Output is currently:
echo .:/usr/local/bin:/mingw/bin:/opt/perl/bin:/bin:/usr/bin:/c/util
.:/usr/local/bin:/mingw/bin:/opt/perl/bin:/bin:/usr/bin:/c/util
echo /bin/make
/bin/make
which /bin/make
/bin/make.exe

I added . to the path per another suggestions, but had previously
tried without it.

I tried running bootstrap again after I exported MAKE.  Previous runs
were without any environment variable settings for MAKE.  I get the
same issues when I try to run.  I also tried exporting
MAKE=/mingw/msys/bin/make and /c/mingw/msys/bin/make.  No difference.
It appears to be failing in CMakeTestCCompiler.cmake.  I tried
creating a similar test program to the one in the file and compiled
and built it manually.  The program itself appears to run
successfully.  Not sure why it's failing when cmake attempts to build
it.

It appears to be ignoring the MAKE environment variable setting at the
point where I'm hitting the error.  At the beginning of ./bootstrap it
does use it and says "Makefile processor on this system is: " giving
the name and location from MAKE or the one found first in my path if
MAKE is not set.  However, even if I copy make.exe locally and set
MAKE=make, it finds the local one at the beginning, but it still says:
Run Build Command:C:/MinGW/msys/bin/make.exe

Just to clarify, I'm using the make.exe (built with msys libraries) in
\mingw\msys\bin inside the msys shell.  I am not using
\mingw\bin\mingw32-make.exe which was built to work outside of the
msys shell (and without forked Cygwin emulation aka msys dlls).  Am
trying to get this to build within msys because I want to write the
steps to automate the entire build process in a bash script (if I can
get it working).  Thanks.

Sincerely,
Laura
http://www.distasis.com/cpp


More information about the CMake mailing list