aboutsummaryrefslogtreecommitdiff
path: root/contrib/bmake/unit-tests/depsrc-optional.mk
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/bmake/unit-tests/depsrc-optional.mk')
-rw-r--r--contrib/bmake/unit-tests/depsrc-optional.mk15
1 files changed, 9 insertions, 6 deletions
diff --git a/contrib/bmake/unit-tests/depsrc-optional.mk b/contrib/bmake/unit-tests/depsrc-optional.mk
index 75ae38bf3194..f12eeca2b3cb 100644
--- a/contrib/bmake/unit-tests/depsrc-optional.mk
+++ b/contrib/bmake/unit-tests/depsrc-optional.mk
@@ -1,18 +1,21 @@
-# $NetBSD: depsrc-optional.mk,v 1.3 2020/09/05 15:57:12 rillig Exp $
+# $NetBSD: depsrc-optional.mk,v 1.5 2020/11/08 10:33:47 rillig Exp $
#
# Tests for the special source .OPTIONAL in dependency declarations,
# which ignores the target if make cannot find out how to create it.
#
# TODO: Describe practical use cases for this feature.
-# TODO: Explain why the commands for "important" are not executed.
-# I had thought that only the "optional" commands were skipped.
-
all: important
: ${.TARGET} is made.
-important: optional
+important: optional optional-cohort
: ${.TARGET} is made.
optional: .OPTIONAL
- : This is not executed.
+ : An optional leaf node is not executed.
+
+# See IsOODateRegular.
+optional-cohort:: .OPTIONAL
+ : A leaf node using '::' is considered out-of-date.
+
+.MAKEFLAGS: -dm