bug-make
[Top][All Lists]
Advanced

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

3.81beta1: 2 bugs in function subst_expand()


From: Markus Mauhart
Subject: 3.81beta1: 2 bugs in function subst_expand()
Date: Mon, 13 Sep 2004 16:58:01 +0200

Hi,


there are 2 bugs in function subst_expand().

To checkout both take the following makefile, 123.mk:

-------123.mk--------
 $(warning value[text] = $(value text))
 $(warning text = $(text))
 $(warning value[a] = $(value a))
 $(warning a = $(a))

 $(error aus)

-------123.mk--------


bug1)

$ make -f 123.mk a="\$(patsubst Subst,Repl,AnyWordThatEndsWithSubstSubst)"
123.mk:1: value[text] =
123.mk:2: text =
123.mk:3: value[a] = $(patsubst Subst,Repl,AnyWordThatEndsWithSubstSubst)
123.mk:4: a = AnyWordThatEndsWithSubstRepl
123.mk:6: *** aus.  Stop.

correct would be:
123.mk:4: a = AnyWordThatEndsWithSubstSubst

fix:
replace "if ((by_word  && ((p > t && ..."
with    "if ((by_word  && ((p > text && ..."


bug2)

$ make -f 123.mk text="preQWEpre preQWEpre1 2preQWEpre 3preQWEpreQWEpre" 
a="\$(text:preQWEpre=REPL)"
123.mk:1: value[text] = preQWEpre preQWEpre1 2preQWEpre 3preQWEpreQWEpre
123.mk:2: text = preQWEpre preQWEpre1 2preQWEpre 3preQWEpreQWEpre
123.mk:3: value[a] = $(text:preQWEpre=REPL)
123.mk:4: a = REPL preQWEpre1 2REPL 3preQWEpreQWEpre
123.mk:6: *** aus.  Stop.

correct would be:
123.mk:4: a = REPL preQWEpre1 2REPL 3preQWEREPL

fix:
not so trivial ... when found suffix inside word, starting at t, then dont
do {t += slen}, instead do {t = end_of_token(t/*+slen-1*/) - slen}.


Regards,
Markus.







reply via email to

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