Module Name:    src
Committed By:   rillig
Date:           Mon Sep  7 18:40:32 UTC 2020

Modified Files:
        src/usr.bin/make/unit-tests: depsrc-wait.exp depsrc-wait.mk

Log Message:
make(1): add test for the .WAIT dependency source


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/usr.bin/make/unit-tests/depsrc-wait.exp
cvs rdiff -u -r1.2 -r1.3 src/usr.bin/make/unit-tests/depsrc-wait.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/make/unit-tests/depsrc-wait.exp
diff -u src/usr.bin/make/unit-tests/depsrc-wait.exp:1.1 src/usr.bin/make/unit-tests/depsrc-wait.exp:1.2
--- src/usr.bin/make/unit-tests/depsrc-wait.exp:1.1	Sun Aug 16 12:07:51 2020
+++ src/usr.bin/make/unit-tests/depsrc-wait.exp	Mon Sep  7 18:40:32 2020
@@ -1 +1,13 @@
+--- a ---
+echo a
+a
+--- b1 ---
+echo b1
+b1
+--- b ---
+echo b
+b
+--- x ---
+echo x
+x
 exit status 0

Index: src/usr.bin/make/unit-tests/depsrc-wait.mk
diff -u src/usr.bin/make/unit-tests/depsrc-wait.mk:1.2 src/usr.bin/make/unit-tests/depsrc-wait.mk:1.3
--- src/usr.bin/make/unit-tests/depsrc-wait.mk:1.2	Sun Aug 16 14:25:16 2020
+++ src/usr.bin/make/unit-tests/depsrc-wait.mk	Mon Sep  7 18:40:32 2020
@@ -1,8 +1,21 @@
-# $NetBSD: depsrc-wait.mk,v 1.2 2020/08/16 14:25:16 rillig Exp $
+# $NetBSD: depsrc-wait.mk,v 1.3 2020/09/07 18:40:32 rillig Exp $
 #
-# Tests for the special source .WAIT in dependency declarations.
+# Tests for the special source .WAIT in dependency declarations,
+# which adds a sequence point between the nodes to its left and the nodes
+# to its right.
 
-# TODO: Implementation
+# Even though the build could run massively parallel, the .WAIT imposes a
+# strict ordering in this example, which forces the targets to be made in
+# exactly this order.
+.MAKEFLAGS: -j8
 
-all:
-	@:;
+# This is the example from the manual page.
+.PHONY: x a b b1
+x: a .WAIT b
+	echo x
+a:
+	echo a
+b: b1
+	echo b
+b1:
+	echo b1

Reply via email to