[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Target specific += operator
From: |
Oliver Schmidt |
Subject: |
Target specific += operator |
Date: |
Sun, 6 Jul 2003 18:18:27 +0200 (MEST) |
Hi,
some time ago (Sun, 3 Nov 2002 17:03:25 +0200) I posted an example
that showed strange results with the target specific += operator.
Now I found the time to fix the problem with the attached patch,
i.e. the example
======== Makefile start ===============
.PHONY: targ
targ:
@echo "T=<$T>"
T := 1
targ: T = 2
targ: T += 3
======== Makefile end ===============
gives now the output T=<2 3> instead of T=<1 2 3>.
I hope the patch doesn't break desired behaviour, but after all
the "make check" doesn't report any error.
Best Regards,
Oliver
Index: variable.c
===================================================================
RCS file: /cvsroot/make/make/variable.c,v
retrieving revision 1.72
diff -u -3 -p -r1.72 variable.c
--- variable.c 2 May 2003 01:45:00 -0000 1.72
+++ variable.c 6 Jul 2003 15:57:27 -0000
@@ -957,6 +957,11 @@ do_variable_definition (const struct flo
append = 1;
v = lookup_variable_in_set (varname, strlen (varname),
current_variable_set_list->set);
+
+ /* Stop appending from upper context if previous target
+ specific variable definition was not with append-flavour. */
+ if (v != 0 && !v->append)
+ append = 0;
}
else
v = lookup_variable (varname, strlen (varname));
--
+++ GMX - Mail, Messaging & more http://www.gmx.net +++
Jetzt ein- oder umsteigen und USB-Speicheruhr als Prämie sichern!
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Target specific += operator,
Oliver Schmidt <=