List Info

Thread: GNU Make Question




GNU Make Question
user name
2006-11-03 18:48:39
On 11/2/06, Andrew (Cheng-Liang) Hou <ahoubroadcom.com> 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)")


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

about | contact  Other archives ( Real Estate discussion Medical topics )