From 8f2b1e2c7c1ced20354dcbcd08942256cf0dade0 Mon Sep 17 00:00:00 2001 From: Paul Smith Date: Sun, 21 Jan 2001 06:49:11 +0000 Subject: Some bug fixes and document updates. --- tests/scripts/features/targetvars | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'tests/scripts/features/targetvars') 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; -- cgit v1.2.3