This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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

Carlo Florendo wrote:
David Rothenberger wrote:
On 7/18/2007 9:03 PM, Carlo Florendo wrote:
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 "_");

Try removing the trailing semicolon. It is not removed by make, so PLATFORM ends up being "CYGWIN;".

Bingo. That did it!

So does that mean that make 3.80 was wrong then?

Please ignore this, sorry. Both have the correct behaviour.

When expanded under Linux, the make statements become

ifeq ("Linux;", "CYGWIN)
    echo cygwin;
    echo linux;

it will "correctly" output "linux" but it got to the else conditional only because "Linux;" != "CYGWIN.

The trailing semi-colon confused me. I was treating the Makefile as a bash script.

Thanks, David!

Best Regards,


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

The Astra Group of Companies
5-3-11 Sekido, Tama City
Tokyo 206-0011, Japan

Unsubscribe info:
Problem reports:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]