* Radly [2010-09-16 14:20]:
> OS = $OSTYPE
> 
> ifeq ($(value OS), darwin10.0)
>   TXT = GOT_IT
> else
>   TXT = MISSED_IT
> endif
> 
> all:
>       @echo OS = $(value OS)
>       @echo $(TXT)
> 
> And here's the printed output:
> OS = darwin10.0
> MISSED_IT

$ cat /tmp/makefile
OS = linux

ifeq "$(OS)" "linux"
        txt = "got it"
else
        txt = "missed it"
endif

all:
        @printf "os = %s\n" $(OS)
        @printf "%s\n" $(txt)

$ make -f /tmp/makefile
os = linux
got it

HTH,

-- 
JR

_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to