summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2006-02-17 13:29:52 +0000
committerPaul Smith <psmith@gnu.org>2006-02-17 13:29:52 +0000
commitbde826b18aeb6fd3c9de7a7733d1e163efde90e1 (patch)
tree8de85f137b768170247e18a2a2c95652a637530d /tests
parent0806a403d65ef6a7f16e2c17aa8286100ebad5d7 (diff)
downloadgunmake-bde826b18aeb6fd3c9de7a7733d1e163efde90e1.tar.gz
Make sure we don't introduce a circularity into the variable set linked
list. Fixes Savannah bug #15757.
Diffstat (limited to 'tests')
-rw-r--r--tests/ChangeLog6
-rw-r--r--tests/scripts/features/targetvars25
2 files changed, 31 insertions, 0 deletions
diff --git a/tests/ChangeLog b/tests/ChangeLog
index c1342cb..57dec0d 100644
--- a/tests/ChangeLog
+++ b/tests/ChangeLog
@@ -1,3 +1,9 @@
+2006-02-17 Paul D. Smith <psmith@gnu.org>
+
+ * scripts/features/targetvars: Test a complex construction which
+ guarantees that we have to merge variable lists of different
+ sizes. Tests for Savannah bug #15757.
+
2006-02-15 Paul D. Smith <psmith@gnu.org>
* scripts/functions/error: Make sure filename/lineno information
diff --git a/tests/scripts/features/targetvars b/tests/scripts/features/targetvars
index 3989340..c22ce13 100644
--- a/tests/scripts/features/targetvars
+++ b/tests/scripts/features/targetvars
@@ -267,4 +267,29 @@ close(MAKEFILE);
$answer = "no build information\n";
&compare_output($answer, &get_logfile(1));
+# TEST #17
+
+# Test a merge of set_lists for files, where one list is much longer
+# than the other. See Savannah bug #15757.
+
+mkdir('t1');
+touch('t1/rules.mk');
+
+run_make_test('
+VPATH = t1
+include rules.mk
+.PHONY: all
+all: foo.x
+foo.x : rules.mk ; @echo MYVAR=$(MYVAR) FOOVAR=$(FOOVAR) ALLVAR=$(ALLVAR)
+all: ALLVAR = xxx
+foo.x: FOOVAR = bar
+rules.mk : MYVAR = foo
+.INTERMEDIATE: foo.x rules.mk
+',
+ '-I t1',
+ 'MYVAR= FOOVAR=bar ALLVAR=xxx');
+
+rmfiles('t1/rules.mk');
+rmdir('t1');
+
1;