e2eeea75eb
o allow env var MAKE_OBJDIR_CHECK_WRITABLE=no to skip writable checks in InitObjdir. Explicit .OBJDIR target always allows read-only directory. o More code cleanup and refactoring. o More unit tests MFC after: 1 week
22 lines
550 B
Makefile
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
|