summaryrefslogtreecommitdiff
path: root/tests/scripts/features/targetvars
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2001-01-21 06:49:11 +0000
committerPaul Smith <psmith@gnu.org>2001-01-21 06:49:11 +0000
commit8f2b1e2c7c1ced20354dcbcd08942256cf0dade0 (patch)
treea80c1cefee45b65819fb02554be24f5545d5d7df /tests/scripts/features/targetvars
parente5324a8c6a6380b544be8d64773827e976bea35a (diff)
downloadgunmake-8f2b1e2c7c1ced20354dcbcd08942256cf0dade0.tar.gz
Some bug fixes and document updates.
Diffstat (limited to 'tests/scripts/features/targetvars')
-rw-r--r--tests/scripts/features/targetvars24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/scripts/features/targetvars b/tests/scripts/features/targetvars
index a1bd88e..a70d3ab 100644
--- a/tests/scripts/features/targetvars
+++ b/tests/scripts/features/targetvars
@@ -170,5 +170,29 @@ close(MAKEFILE);
$answer = "; ok\n";
&compare_output($answer, &get_logfile(1));
+# Test #12
+# PR/2020: More hassles with += target-specific vars. I _really_ think
+# I nailed it this time :-/.
+
+$makefile5 = &get_tmpfile;
+
+open(MAKEFILE, "> $makefile5");
+print MAKEFILE <<'EOF';
+.PHONY: a
+
+BLAH := foo
+COMMAND = echo $(BLAH)
+
+a: ; @$(COMMAND)
+
+a: BLAH := bar
+a: COMMAND += snafu $(BLAH)
+EOF
+close(MAKEFILE);
+
+&run_make_with_options("$makefile5", "", &get_logfile);
+$answer = "bar snafu bar\n";
+&compare_output($answer, &get_logfile(1));
+
1;