help-gnu-utils
[Top][All Lists]
Advanced

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

more make questions


From: James
Subject: more make questions
Date: 1 Feb 2006 19:03:11 -0800
User-agent: G2/0.2

$ cat makefile
all: T
define MK
$(1): VAR=$(2)
$(1): S
        @echo $$@ $$(VAR)
endef
$(eval $(call MK,T,abc))
S:
        @echo $@ $(VAR)
ifeq ($(VAR),)
        @echo VAR is an empty string
else
        @echo VAR=$(VAR)
endif

$ make-3.81beta3
S abc
VAR is an empty string
T abc

But, I wish to see
S abc
VAR=abc
T abe

However, if makefile is modified as
all: T
VAR=12345
define MK
...
then, I get
S abc
VAR=abc
T abc

What is going on?
James



reply via email to

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