diff options
author | Ron Yorston <rmy@pobox.com> | 2024-06-01 11:07:44 +0100 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2024-06-01 11:07:44 +0100 |
commit | 433d9fddde9b66727a5066ffe0e5a776da20a4f1 (patch) | |
tree | 849dc0439696a41a62cfe051dece3805773c7a03 | |
parent | f9d10b2b6314ea2a80515112498aaa919ad81c97 (diff) | |
download | busybox-w32-433d9fddde9b66727a5066ffe0e5a776da20a4f1.tar.gz busybox-w32-433d9fddde9b66727a5066ffe0e5a776da20a4f1.tar.bz2 busybox-w32-433d9fddde9b66727a5066ffe0e5a776da20a4f1.zip |
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.
-rwxr-xr-x | testsuite/make.tests | 28 |
1 files 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 = ; | |||
112 | target:$(semi)@echo a = $(a) | 112 | target:$(semi)@echo a = $(a) |
113 | ' | 113 | ' |
114 | 114 | ||
115 | # The fix for the above test broke a complex chain of macro assignments | ||
116 | # generated by autotools. | ||
117 | testing "make complex chain of macro assignments" \ | ||
118 | "make -f -" "flag 1\n" "" ' | ||
119 | FLAG_ = $(FLAG_$(VALUE)) | ||
120 | FLAG_0 = flag 0 | ||
121 | FLAG_1 = flag 1 | ||
122 | MYFLAG = $(FLAG_$(VALUE)) | ||
123 | VALUE = 1 | ||
124 | |||
125 | target: | ||
126 | @echo $(MYFLAG) | ||
127 | ' | ||
128 | |||
129 | # When a build command fails and the '-k' option has been provided | 115 | # When a build command fails and the '-k' option has been provided |
130 | # (continue execution on error) no further commands should be executed | 116 | # (continue execution on error) no further commands should be executed |
131 | # for the current target. | 117 | # for the current target. |
@@ -482,6 +468,20 @@ target: | |||
482 | ' | 468 | ' |
483 | unset CURDIR | 469 | unset CURDIR |
484 | 470 | ||
471 | # The fix for an equal sign in an inline command on a target rule broke | ||
472 | # a complex chain of macro assignments generated by autotools. | ||
473 | testing "make complex chain of macro assignments" \ | ||
474 | "make -f -" "flag 1\n" "" ' | ||
475 | FLAG_ = $(FLAG_$(VALUE)) | ||
476 | FLAG_0 = flag 0 | ||
477 | FLAG_1 = flag 1 | ||
478 | MYFLAG = $(FLAG_$(VALUE)) | ||
479 | VALUE = 1 | ||
480 | |||
481 | target: | ||
482 | @echo $(MYFLAG) | ||
483 | ' | ||
484 | |||
485 | # POSIX 202X permits additional characters in macro and target names | 485 | # POSIX 202X permits additional characters in macro and target names |
486 | testing "make allow - and / in target names, - in macro names" \ | 486 | testing "make allow - and / in target names, - in macro names" \ |
487 | "make -f -" \ | 487 | "make -f -" \ |