From ebb733c0f9ab045b6fd6245df2baf2e87463e1bc Mon Sep 17 00:00:00 2001 From: Paul Smith Date: Wed, 17 Nov 1999 07:33:47 +0000 Subject: * Many cleanups and bugfixes. * New handling of += in target-specific variables. --- tests/scripts/features/targetvars | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'tests/scripts/features/targetvars') diff --git a/tests/scripts/features/targetvars b/tests/scripts/features/targetvars index 83bf9ed..e4dc0b2 100644 --- a/tests/scripts/features/targetvars +++ b/tests/scripts/features/targetvars @@ -124,5 +124,31 @@ close(MAKEFILE); $answer = "foo bar\n"; &compare_output($answer, &get_logfile(1)); +# TEST #9 +# For PR/1380: Using += assignment in target-specific variables sometimes fails + +$makefile3 = &get_tmpfile; + +open(MAKEFILE,"> $makefile3"); +print MAKEFILE <<'EOF'; +.PHONY: all one +all: FOO += baz +all: one; @echo $(FOO) + +FOO = bar + +one: FOO += biz +one: ; @echo $(FOO) +EOF +close(MAKEFILE); + +&run_make_with_options("$makefile3", "", &get_logfile); +$answer = "bar baz biz\nbar baz\n"; +&compare_output($answer, &get_logfile(1)); + +&run_make_with_options("$makefile3", "one", &get_logfile); +$answer = "bar biz\n"; +&compare_output($answer, &get_logfile(1)); + 1; -- cgit v1.2.3