summaryrefslogtreecommitdiff
path: root/tests/scripts
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/scripts
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/scripts')
-rw-r--r--tests/scripts/variables/private12
1 files changed, 12 insertions, 0 deletions
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;