I may have stumbled across a defect in make 3.80 concerning $(eval) used
in if{def,ndef,eq,neq} (I didn't try many more).

I have not been able to connect to subversions.gnu.org to test against the
CVS source, so this may have already been addressed.  I have reproduced
the defect on a red hat 7.2 box w/ make 3.80 built by hand, and a debian
unstable/testing box running a 3.80-7 package version.

Attached are a number of makefiles.  All of them generate a parse error
*except* for the work-around & include file also provided.  I have also
attached the typescript file from a run on my debian box.

I'd like to take an opportunity to thank the development team as well.
Not only for the maintainence and fixes, but for adding new features
such as $(eval).  I have designed and maintain the build system where I
work (well, actually 4 of them); they all use GNU make in some capacity.
My job is *much* easier due to your efforts.  Thanks.

-- 
Keith Hellman                             #include <disclaimer.h>
[EMAIL PROTECTED]                from disclaimer import standard
public key @ www.mcprogramming.com

"We will perhaps eventually be writing only small modules which are identified
by name as they are used to build larger ones, so that devices like
indentation, rather than delimiters, might become feasible for expressing local
structure in the source language."

-- Donald E. Knuth, "Structured Programming with goto Statements", Computing
Surveys, Vol 6 No 4, Dec. 1974
BOO=1
ifdef BOO

show=$(warning ${1}=/${${1}}/)
$(call show,MAKE_VERSION)

$(call show,foo)

$(eval foo=bar)
$(call show,foo)

$(eval foo:=spam ${foo})
$(call show,foo)

endif

all: ;


BOO=1
ifeq (${BOO},1)

show=$(warning ${1}=/${${1}}/)
$(call show,MAKE_VERSION)

$(call show,foo)

$(eval foo=bar)
$(call show,foo)

$(eval foo:=spam ${foo})
$(call show,foo)

endif

all: ;


BOO=1
ifndef _I_AM_NOT_DEFINED

show=$(warning ${1}=/${${1}}/)
$(call show,MAKE_VERSION)

$(call show,foo)

$(eval foo=bar)
$(call show,foo)

$(eval foo:=spam ${foo})
$(call show,foo)

endif

all: ;


BOO=1
ifneq (${BOO},)

show=$(warning ${1}=/${${1}}/)
$(call show,MAKE_VERSION)

$(call show,foo)

$(eval foo=bar)
$(call show,foo)

$(eval foo:=spam ${foo})
$(call show,foo)

endif

all: ;


Script started on Wed Jun 23 09:49:15 2004
]0;[EMAIL PROTECTED]: /home/khellman/Projects/makebugmakebug$ ls
ifdef_eval.mak  ifeq_eval.mak  ifndef_eval.mak  
ifneq_eval.mak  typescript  work_around.incl  
work_around.mak
]0;[EMAIL PROTECTED]: /home/khellman/Projects/makebugmakebug$ for m in *.mak ; do 
make -f $m ; done
ifdef_eval.mak:6: MAKE_VERSION=/3.80/
ifdef_eval.mak:8: foo=//
ifdef_eval.mak:10: *** missing `endif'.  Stop.
ifeq_eval.mak:6: MAKE_VERSION=/3.80/
ifeq_eval.mak:8: foo=//
ifeq_eval.mak:10: *** missing `endif'.  Stop.
ifndef_eval.mak:6: MAKE_VERSION=/3.80/
ifndef_eval.mak:8: foo=//
ifndef_eval.mak:10: *** missing `endif'.  Stop.
ifneq_eval.mak:6: MAKE_VERSION=/3.80/
ifneq_eval.mak:8: foo=//
ifneq_eval.mak:10: *** missing `endif'.  Stop.
work_around.incl:2: MAKE_VERSION=/3.80/
work_around.incl:4: foo=//
work_around.incl:7: foo=/bar/
work_around.incl:10: foo=/spam bar/
make: `all' is up to date.
]0;[EMAIL PROTECTED]: /home/khellman/Projects/makebugmakebug$ exit

Script done on Wed Jun 23 09:49:30 2004
show=$(warning ${1}=/${${1}}/)
$(call show,MAKE_VERSION)

$(call show,foo)

$(eval foo=bar)
$(call show,foo)

$(eval foo:=spam ${foo})
$(call show,foo)

BOO=1
ifneq (${BOO},)
include work_around.incl
endif

all: ;

Attachment: signature.asc
Description: Digital signature

_______________________________________________
Bug-make mailing list
[EMAIL PROTECTED]
http://lists.gnu.org/mailman/listinfo/bug-make

Reply via email to