cygwin's [g]make 3.81 seems not to understand conditionals

Carlo Florendo subscribermail@gmail.com
Thu Jul 19 04:03:00 GMT 2007


Hi Guys,

I've got (and attached) this simple Makefile that checks the build platform 
of a machine.

Here's the cut-and-pasted content of the Makefile:

PLATFORM=$(shell uname -s | cut -f 1 -d " " | cut -f 1 -d "_");
dummy:
ifeq ("${PLATFORM}", "CYGWIN")
     echo cygwin;
else
     echo linux;
endif


When run under Linux:

root@srv1 /tmp
$ make --version
GNU Make 3.80
Copyright (C) 2002  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

root@srv1 /tmp
$ md5sum Makefile
18395e930e3a5e56c0ce9dc82f184c15  Makefile

root@srv1 /tmp
$ make
echo linux;
linux


When run under Cygwin:

admin@desktop1 /tmp
$ make --version
GNU Make 3.81
Copyright (C) 2006  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for i686-pc-cygwin

admin@desktop1 /tmp
$ md5sum Makefile
18395e930e3a5e56c0ce9dc82f184c15 *Makefile

admin@desktop1 /tmp
$ make
echo linux;
linux


As you could see from the md5s, I run the same Makefile. Under the Linux 
machine, I run an older make version, 3.80.  On Cygwin, I use make version 
3.81.

The output under cygwin should've been:

echo cygwin
cygwin


And yes, I know the workarounds, using inline shell command within the 
Makefile, and yes, the workarounds worked properly.  However, I'd like to 
see the make conditionals work correctly.

For completeness' sake and FWIW, I've also attached cygcheck's output.

Any hints?

Thank you very much.

Best Regards,

Carlo


-- 
Carlo Florendo
Softare Engineer/Network Co-Administrator
Astra Philippines Inc.
UP-Ayala Technopark, Diliman 1101, Quezon City
Philippines
http://www.astra.ph

--
The Astra Group of Companies
5-3-11 Sekido, Tama City
Tokyo 206-0011, Japan
http://www.astra.co.jp
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Makefile
URL: <http://cygwin.com/pipermail/cygwin/attachments/20070719/9d63683c/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: cyg.out
URL: <http://cygwin.com/pipermail/cygwin/attachments/20070719/9d63683c/attachment-0001.ksh>
-------------- next part --------------
--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


More information about the Cygwin mailing list