summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2011-09-12 05:29:58 +0000
committerPaul Smith <psmith@gnu.org>2011-09-12 05:29:58 +0000
commita5c774a51b7bfa564e0e44bfc22213ac55abc562 (patch)
tree75b3f28061b9cb792899f5b28c0fd1567a6fac2a /tests
parent9a9f83e8b52a3923efc6b4cf8c8f444773a30953 (diff)
downloadgunmake-a5c774a51b7bfa564e0e44bfc22213ac55abc562.tar.gz
Ensure variables defined in $(call ...) have global scope
Add a note about using #!/usr/bin/make -f to the manual. Clean up the w32 subdirectory in the dist tarball.
Diffstat (limited to 'tests')
-rw-r--r--tests/ChangeLog5
-rw-r--r--tests/scripts/functions/call11
2 files changed, 16 insertions, 0 deletions
diff --git a/tests/ChangeLog b/tests/ChangeLog
index 03983ec..a574724 100644
--- a/tests/ChangeLog
+++ b/tests/ChangeLog
@@ -1,3 +1,8 @@
+2011-09-12 Paul Smith <psmith@gnu.org>
+
+ * scripts/functions/call: Verify that using export in a $(call ...)
+ context creates a global variable. See Savannah bug #32498.
+
2011-09-02 Paul Smith <psmith@gnu.org>
* scripts/options/dash-n: Verify that in "-n -t", the -n takes
diff --git a/tests/scripts/functions/call b/tests/scripts/functions/call
index 6dd48b1..98f1d92 100644
--- a/tests/scripts/functions/call
+++ b/tests/scripts/functions/call
@@ -96,4 +96,15 @@ close(MAKEFILE);
$answer = "1 2 3 4 5 6 7 8 9\n1 2 3 4 5\n1 2 3\n1 2 3\n";
&compare_output($answer,&get_logfile(1));
+# Ensure that variables are defined in global scope even in a $(call ...)
+
+delete $ENV{X123};
+
+run_make_test('
+tst = $(eval export X123)
+$(call tst)
+all: ; @echo "$${X123-not set}"
+',
+ '', "\n");
+
1;