Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/make/unit-tests make(1): add test for the .WAIT depe...



details:   https://anonhg.NetBSD.org/src/rev/8e646396096d
branches:  trunk
changeset: 938416:8e646396096d
user:      rillig <rillig%NetBSD.org@localhost>
date:      Mon Sep 07 18:40:32 2020 +0000

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

diffstat:

 usr.bin/make/unit-tests/depsrc-wait.exp |  12 ++++++++++++
 usr.bin/make/unit-tests/depsrc-wait.mk  |  25 +++++++++++++++++++------
 2 files changed, 31 insertions(+), 6 deletions(-)

diffs (48 lines):

diff -r 8fdc1377a584 -r 8e646396096d usr.bin/make/unit-tests/depsrc-wait.exp
--- a/usr.bin/make/unit-tests/depsrc-wait.exp   Mon Sep 07 18:37:21 2020 +0000
+++ b/usr.bin/make/unit-tests/depsrc-wait.exp   Mon Sep 07 18:40:32 2020 +0000
@@ -1,1 +1,13 @@
+--- a ---
+echo a
+a
+--- b1 ---
+echo b1
+b1
+--- b ---
+echo b
+b
+--- x ---
+echo x
+x
 exit status 0
diff -r 8fdc1377a584 -r 8e646396096d usr.bin/make/unit-tests/depsrc-wait.mk
--- a/usr.bin/make/unit-tests/depsrc-wait.mk    Mon Sep 07 18:37:21 2020 +0000
+++ b/usr.bin/make/unit-tests/depsrc-wait.mk    Mon Sep 07 18:40:32 2020 +0000
@@ -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.
+
+# 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
 
-# TODO: Implementation
-
-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



Home | Main Index | Thread Index | Old Index