freebsd-src/unit-tests/depsrc-optional.mk
Simon J. Gerraty 1b65f0bd2b Import bmake-20201117
o allow env var MAKE_OBJDIR_CHECK_WRITABLE=no to skip writable
  checks in InitObjdir.  Explicit .OBJDIR target always allows
  read-only directory.

o Fix building and unit-tests on non-BSD.

o More code cleanup and refactoring.

o More unit tests
2020-11-20 03:54:37 +00:00

22 lines
550 B
Makefile

# $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.
all: important
: ${.TARGET} is made.
important: optional optional-cohort
: ${.TARGET} is made.
optional: .OPTIONAL
: An optional leaf node is not executed.
# See IsOODateRegular.
optional-cohort:: .OPTIONAL
: A leaf node using '::' is considered out-of-date.
.MAKEFLAGS: -dm