[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Conditionals, step one
From: |
Jean-Rene David |
Subject: |
Re: Conditionals, step one |
Date: |
Fri, 17 Sep 2010 07:33:29 -0400 |
User-agent: |
Mutt/1.5.20 (2009-06-14) |
* 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
Re: Conditionals, step one, Paul Smith, 2010/09/16
Re: Conditionals, step one,
Jean-Rene David <=