summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2002-10-05 13:45:47 +0000
committerPaul Smith <psmith@gnu.org>2002-10-05 13:45:47 +0000
commit47cd8d4624b60d3462991c436c961e0721cd278b (patch)
tree897bc298ea2cd924c12f029d6b699a2c7adaa84b /tests
parentd1d9c0274bf49bac2cf5293caef54f474cced796 (diff)
downloadgunmake-47cd8d4624b60d3462991c436c961e0721cd278b.tar.gz
Fix core dump on malformed variable line (Debian bug #81656)
Allow SysV-style variable references to use {} in addition to (). Add variable.h to the POTFILES.in since it has a translatable string.
Diffstat (limited to 'tests')
-rw-r--r--tests/ChangeLog5
-rw-r--r--tests/scripts/variables/automatic6
2 files changed, 11 insertions, 0 deletions
diff --git a/tests/ChangeLog b/tests/ChangeLog
index 6f42eae..2c39999 100644
--- a/tests/ChangeLog
+++ b/tests/ChangeLog
@@ -1,3 +1,8 @@
+2002-10-05 Paul D. Smith <psmith@gnu.org>
+
+ * scripts/variables/automatic: Add tests for $$(@), $${@}, $${@D},
+ and $${@F}.
+
2002-09-23 Paul D. Smith <psmith@gnu.org>
* scripts/features/escape: Test handling of escaped comment
diff --git a/tests/scripts/variables/automatic b/tests/scripts/variables/automatic
index 42e8cba..2919960 100644
--- a/tests/scripts/variables/automatic
+++ b/tests/scripts/variables/automatic
@@ -60,6 +60,8 @@ print MAKEFILE <<'EOF';
$(dir)/foo $(dir)/bar: $@.x $$@.x $$$@.x $$$$@.x $$(@D).x $$(@F).x
$(dir)/x.z $(dir)/y.z: $(dir)/%.z : $@.% $$@.% $$$@.% $$$$@.% $$(@D).% $$(@F).%
+
+$(dir)/biz: $$(@).x $${@}.x $${@D}.x $${@F}.x
EOF
close(MAKEFILE);
@@ -72,4 +74,8 @@ $answer = ".x\n$dir/foo.x\n\$.x\n\$@.x\n$dir.x\nfoo.x\n$dir/bar.x\nbar.x\n";
$answer = ".x\n$dir/x.z.x\n\$.x\n\$@.x\n$dir.x\nx.z.x\n.y\n$dir/y.z.y\n\$.y\n\$@.y\n$dir.y\ny.z.y\n";
&compare_output($answer, &get_logfile(1));
+&run_make_with_options($makefile2, "$dir/biz", &get_logfile);
+$answer = "$dir/biz.x\n$dir.x\nbiz.x\n";
+&compare_output($answer, &get_logfile(1));
+
1;