Subj : Re: Makefile question relating to conditional To : comp.programming From : Willem Date : Sat Sep 24 2005 10:37 am hzmonte@hotmail.com wrote: ) I inherit a Makefile that has the following rule: ) ) target: main.c ) if ( `uname` == "SunOS" ) $(CC) $(CFLAGS) $(LDFLAGS_SOL) ) main.c $(DEBUGOBJ) -o main ) if ( `uname` == "Linux" ) $(CC) $(CFLAGS) $(LDFLAGS_LINUX) ) main.c $(DEBUGOBJ) -o main ) ) It is to be run by GNU gmake, and it does seem to run okay. Plain vanilla make will run it fine as well. ) But I am not able to see anywhere in the GNU Make manual that says ) gmake supports an if conditional with the above syntax. It supports ) ifeq, ifneq, etc, but not if(...==...). Is this an undocumented ) feature of gmake? 'if' is not part of gmake. It is part of sh. gmake (or make) just runs the whole line as a command. Try typing the following on your commandline: if ( `uname` == "Linux" ) echo Linux if ( `uname` == "SunOS" ) echo SunOS ) And I am not able to find in the manual what 'xxx' and "xxx" means. Thats not 'xxx', that is `xxx`. There's a difference. Read the manual for sh to see what the reverse quotes mean. SaSW, Willem -- Disclaimer: I am in no way responsible for any of the statements made in the above text. For all I know I might be drugged or something.. No I'm not paranoid. You all think I'm paranoid, don't you ! #EOT .