summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2011-05-07 20:03:49 +0000
committerPaul Smith <psmith@gnu.org>2011-05-07 20:03:49 +0000
commitf15efca8112bc2cd4f120a64fcc3aa4fa70a871e (patch)
tree2a66f3f6ff75521c152afa89ef8d35be0cd5f9d0 /tests
parentb664d3a91d57bbd7efdb042489d70a1473e46753 (diff)
downloadgunmake-f15efca8112bc2cd4f120a64fcc3aa4fa70a871e.tar.gz
Ensure private variables are not used when appending target-specific
variables. Fixes Savannah bug #32872.
Diffstat (limited to 'tests')
-rw-r--r--tests/ChangeLog3
-rw-r--r--tests/scripts/variables/private12
2 files changed, 15 insertions, 0 deletions
diff --git a/tests/ChangeLog b/tests/ChangeLog
index 73b49fa..629242c 100644
--- a/tests/ChangeLog
+++ b/tests/ChangeLog
@@ -1,5 +1,8 @@
2011-05-07 Paul Smith <psmith@gnu.org>
+ * scripts/variables/private: Ensure we skip private variables when
+ appending. Test for Savannah bug #32872.
+
* scripts/functions/wildcard: Verify wildcard used to test for
file existence/non-existence.
diff --git a/tests/scripts/variables/private b/tests/scripts/variables/private
index b4baf5f..1797745 100644
--- a/tests/scripts/variables/private
+++ b/tests/scripts/variables/private
@@ -75,4 +75,16 @@ a b: ; @echo $@=$(private)
',
'', "b=a\na=a\n");
+# 9: make sure private suppresses inheritence
+run_make_test(q!
+DEFS = FOO
+all: bar1
+bar1: private DEFS += 1
+bar3: private DEFS += 3
+bar1: bar2
+bar2: bar3
+bar1 bar2 bar3: ; @echo '$@: $(DEFS)'
+!,
+ '', "bar3: FOO 3\nbar2: FOO\nbar1: FOO 1\n");
+
1;