summaryrefslogtreecommitdiff
path: root/tests/scripts/variables
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2012-03-04 08:09:09 +0000
committerPaul Smith <psmith@gnu.org>2012-03-04 08:09:09 +0000
commiteb632d7676e92fd5750413ab6a6d16f3a6fda5c4 (patch)
tree7cf272861f2940b998b41b81ec19778254504887 /tests/scripts/variables
parentfdb5fcc28d5e991d1d194d6e6a194c47108d103a (diff)
downloadgunmake-eb632d7676e92fd5750413ab6a6d16f3a6fda5c4.tar.gz
Ensure appending private variables in pattern-specific target variables.
Fixes Savannah bug #35468.
Diffstat (limited to 'tests/scripts/variables')
-rw-r--r--tests/scripts/variables/private32
1 files changed, 32 insertions, 0 deletions
diff --git a/tests/scripts/variables/private b/tests/scripts/variables/private
index 1797745..012274e 100644
--- a/tests/scripts/variables/private
+++ b/tests/scripts/variables/private
@@ -87,4 +87,36 @@ bar1 bar2 bar3: ; @echo '$@: $(DEFS)'
!,
'', "bar3: FOO 3\nbar2: FOO\nbar1: FOO 1\n");
+# 10: Test append with pattern-specific variables and private
+
+run_make_test(q!
+IA = global
+PA = global
+PS = global
+S = global
+PS = global
+SV = global
+b%: IA += b%
+b%: private PA += b%
+b%: private PS = b%
+bar: all
+bar: IA += bar
+bar: private PA += bar
+bar: private PS = bar
+a%: IA += a%
+a%: private PA += a%
+a%: private PS = a%
+all: IA += all
+all: private PA += all
+all: private PS = all
+
+bar all: ; @echo '$@: IA=$(IA)'; echo '$@: PA=$(PA)'; echo '$@: PS=$(PS)'
+!,
+ '', "all: IA=global b% bar a% all
+all: PA=global a% all
+all: PS=all
+bar: IA=global b% bar
+bar: PA=global b% bar
+bar: PS=bar\n");
+
1;