summaryrefslogtreecommitdiff
path: root/unit-tests/depsrc-optional.mk
blob: 75ae38bf3194fcb1ac1afccbfe95ebb9a97ba7ab (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# $NetBSD: depsrc-optional.mk,v 1.3 2020/09/05 15:57:12 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
	: ${.TARGET} is made.

optional: .OPTIONAL
	: This is not executed.