summaryrefslogtreecommitdiff
path: root/tests/scripts/functions
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2003-01-22 13:45:44 +0000
committerPaul Smith <psmith@gnu.org>2003-01-22 13:45:44 +0000
commitd15a484098a52e0784933ba03a98445fdc86ea3f (patch)
tree2842543ad79b0bf854dbdb7a8fef9d95c0204402 /tests/scripts/functions
parentdd70c67ea48a0a5deca2358533110dc4bfc83dcc (diff)
downloadgunmake-d15a484098a52e0784933ba03a98445fdc86ea3f.tar.gz
Fix bug #1744: mask extra arguments to recursive invocations of $(call ...)
Diffstat (limited to 'tests/scripts/functions')
-rw-r--r--tests/scripts/functions/call31
1 files changed, 31 insertions, 0 deletions
diff --git a/tests/scripts/functions/call b/tests/scripts/functions/call
index a8834cd..efee476 100644
--- a/tests/scripts/functions/call
+++ b/tests/scripts/functions/call
@@ -69,4 +69,35 @@ $answer = "foo bar\ndefault file file\nb d f\n\n\nb\nbar foo baz\nfoo bar baz bl
&compare_output($answer, &get_logfile(1));
+
+# TEST eclipsing of arguments when invoking sub-calls
+
+$makefile2 = &get_tmpfile;
+
+open(MAKEFILE,"> $makefile2");
+
+print MAKEFILE <<'EOF';
+
+all = $1 $2 $3 $4 $5 $6 $7 $8 $9
+
+level1 = $(call all,$1,$2,$3,$4,$5)
+level2 = $(call level1,$1,$2,$3)
+level3 = $(call level2,$1,$2,$3,$4,$5)
+
+all:
+ @echo $(call all,1,2,3,4,5,6,7,8,9,10,11)
+ @echo $(call level1,1,2,3,4,5,6,7,8)
+ @echo $(call level2,1,2,3,4,5,6,7,8)
+ @echo $(call level3,1,2,3,4,5,6,7,8)
+EOF
+
+close(MAKEFILE);
+
+&run_make_with_options($makefile2, "", &get_logfile);
+
+# Create the answer to what should be produced by this 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));
+
1;