help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GNU Make Question


From: Ken Smith
Subject: Re: GNU Make Question
Date: Fri, 3 Nov 2006 10:48:39 -0800

On 11/2/06, Andrew (Cheng-Liang) Hou <address@hidden> wrote:


Hi,

Can I use ifeq/ifneq in define block?
The example like as:

define ....

ifeq...
endif

endef

Yes.  Try the below with 3.81.

$ gmake

and

$ gmake var=val

 Ken Smith

---GNUmakefile---
x :=
y :=
z :=

define A
x := 1
ifeq ($(var),val)
y := 2
endif
z := 3
endef

$(eval $(A))

$(info x = "$(x)")
$(info y = "$(y)")
$(info z = "$(z)")




reply via email to

[Prev in Thread] Current Thread [Next in Thread]