help-make
[Top][All Lists]
Advanced

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

temporary function variables in user defined make functions not blanked


From: Noel Yap
Subject: temporary function variables in user defined make functions not blanked out
Date: Tue, 11 Nov 2003 11:41:15 -0500

I've got the following makefile:

define reverse-list
  $(if $(strip $(1)), \
    $(call reverse-list,$(call pop-front,$(1)),$(firstword $(1)) $(2)), \
    $(2))
endef

good-wrapper = $(call reverse-list,$(2),)
bad-wrapper = $(call reverse-list,$(2))

.PHONY: all
all:
        echo $(call good-wrapper,,a o e u)
        echo $(call bad-wrapper,,a o e u)

with the following behaviour:

piias306 /ms/user/y/yapn/proj/aoeu 77$ gmake
u e o a
u e o a a o e u

Is this a bug, or an undocumented feature?

Thanks,
Noel
-- 
NOTICE: If received in error, please destroy and notify sender.  Sender does 
not waive confidentiality or privilege, and use is prohibited.




reply via email to

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