From 433d9fddde9b66727a5066ffe0e5a776da20a4f1 Mon Sep 17 00:00:00 2001 From: Ron Yorston Date: Sat, 1 Jun 2024 11:07:44 +0100 Subject: make: move test for complex chain of macro assignments The test 'Complex chain of macro assignments' relies on recursive macro expansion. This is a POSIX 202X feature, so the test should be moved to the appropriate section of the test script. --- testsuite/make.tests | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/testsuite/make.tests b/testsuite/make.tests index 6438c90c9..d9d56270a 100755 --- a/testsuite/make.tests +++ b/testsuite/make.tests @@ -112,20 +112,6 @@ semi = ; target:$(semi)@echo a = $(a) ' -# The fix for the above test broke a complex chain of macro assignments -# generated by autotools. -testing "make complex chain of macro assignments" \ - "make -f -" "flag 1\n" "" ' -FLAG_ = $(FLAG_$(VALUE)) -FLAG_0 = flag 0 -FLAG_1 = flag 1 -MYFLAG = $(FLAG_$(VALUE)) -VALUE = 1 - -target: - @echo $(MYFLAG) -' - # When a build command fails and the '-k' option has been provided # (continue execution on error) no further commands should be executed # for the current target. @@ -482,6 +468,20 @@ target: ' unset CURDIR +# The fix for an equal sign in an inline command on a target rule broke +# a complex chain of macro assignments generated by autotools. +testing "make complex chain of macro assignments" \ + "make -f -" "flag 1\n" "" ' +FLAG_ = $(FLAG_$(VALUE)) +FLAG_0 = flag 0 +FLAG_1 = flag 1 +MYFLAG = $(FLAG_$(VALUE)) +VALUE = 1 + +target: + @echo $(MYFLAG) +' + # POSIX 202X permits additional characters in macro and target names testing "make allow - and / in target names, - in macro names" \ "make -f -" \ -- cgit v1.2.3-55-g6feb