bug-make
[Top][All Lists]
Advanced

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

Re: target-specific appending with an empty value


From: Oliver Schmidt
Subject: Re: target-specific appending with an empty value
Date: Mon, 7 Jul 2003 19:56:15 +0200 (MEST)

Hi,

the following patch corrects the described bug, i.e. the makefile

======= Makefile Begin ==========

a = 1
targ: a +=
targ:
        @echo "$@: a = $(a)"

======= Makefile End  ===========

gives now the correct answer: "targ: a = 1".

Best Regards,
Oliver


Index: expand.c
===================================================================
RCS file: /cvsroot/make/make/expand.c,v
retrieving revision 1.35
diff -u -3 -p -r1.35 expand.c
--- expand.c    30 Jan 2003 06:21:36 -0000      1.35
+++ expand.c    7 Jul 2003 17:46:29 -0000
@@ -143,7 +143,7 @@ reference_variable (char *o, char *name,
   if (v == 0)
     warn_undefined (name, length);

-  if (v == 0 || *v->value == '\0')
+  if (v == 0 || (*v->value == '\0' && !v->append))
     return o;





-- 
+++ GMX - Mail, Messaging & more  http://www.gmx.net +++

Jetzt ein- oder umsteigen und USB-Speicheruhr als Prämie sichern!





reply via email to

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