aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2022-10-19 13:23:16 +0100
committerRon Yorston <rmy@pobox.com>2022-10-19 13:23:16 +0100
commit81d36c8a293192acb942878dd95a7d862fcbed19 (patch)
tree40e92bbb5943c22ef545b7d5848c20347384aae3
parent3c5b4335d36d2aaa5dadc82b004f43e5a18eddfa (diff)
downloadbusybox-w32-81d36c8a293192acb942878dd95a7d862fcbed19.tar.gz
busybox-w32-81d36c8a293192acb942878dd95a7d862fcbed19.tar.bz2
busybox-w32-81d36c8a293192acb942878dd95a7d862fcbed19.zip
make: .NOTPARALLEL and .WAIT are special targets
Austin Group defect report 1437 has been accepted. It describes the special targets .NOTPARALLEL and .WAIT which are used to influence the behaviour of parallel builds. Since parallel builds aren't implemented in here they actually don't 't have much effect. - For completeness they're flagged as special targets. - .WAIT should be allowed as a prerequisite.
-rw-r--r--miscutils/make.c4
-rwxr-xr-xtestsuite/make.tests14
2 files changed, 16 insertions, 2 deletions
diff --git a/miscutils/make.c b/miscutils/make.c
index 431ac41d4..f50ffbbef 100644
--- a/miscutils/make.c
+++ b/miscutils/make.c
@@ -1358,6 +1358,8 @@ target_type(char *s)
1358 ".SILENT", 1358 ".SILENT",
1359 ".SUFFIXES", 1359 ".SUFFIXES",
1360 ".PHONY", 1360 ".PHONY",
1361 ".NOTPARALLEL",
1362 ".WAIT",
1361 }; 1363 };
1362 1364
1363 if (*s != '.') 1365 if (*s != '.')
@@ -1738,6 +1740,8 @@ input(FILE *fd, int ilevel)
1738 files = gd.gl_pathv; 1740 files = gd.gl_pathv;
1739 } 1741 }
1740 for (i = 0; i < nfile; ++i) { 1742 for (i = 0; i < nfile; ++i) {
1743 if (!posix && strcmp(files[i], ".WAIT") == 0)
1744 continue;
1741 np = newname(files[i]); 1745 np = newname(files[i]);
1742 newdep(&dp, np); 1746 newdep(&dp, np);
1743 } 1747 }
diff --git a/testsuite/make.tests b/testsuite/make.tests
index c97950e95..35d3b7149 100755
--- a/testsuite/make.tests
+++ b/testsuite/make.tests
@@ -277,8 +277,6 @@ target:
277 @echo "$(hello) 4" 277 @echo "$(hello) 4"
278' 278'
279 279
280cd .. || exit 1; rm -rf make.tempdir 2>/dev/null
281
282# Nested macro expansion is allowed. This should be compatible 280# Nested macro expansion is allowed. This should be compatible
283# with other implementations. 281# with other implementations.
284testing "make nested macro expansion" \ 282testing "make nested macro expansion" \
@@ -297,6 +295,18 @@ target:
297 @echo 5 $($a$b$c) 295 @echo 5 $($a$b$c)
298' 296'
299 297
298# .WAIT is allowed as a prerequisite. Since parallel builds aren't
299# implemented it doesn't have any effect.
300mkdir make.tempdir && cd make.tempdir || exit 1
301touch file1 file2
302testing "make .WAIT is allowed as a prerequisite" \
303 "make -f -" \
304 "file1 file2\n" "" '
305target: file1 .WAIT file2
306 @echo $^
307'
308cd .. || exit 1; rm -rf make.tempdir 2>/dev/null
309
300testing "make double-colon rule" \ 310testing "make double-colon rule" \
301 "make -f -" "target1\ntarget2\n" "" ' 311 "make -f -" "target1\ntarget2\n" "" '
302target:: 312target::