depsrc-optional.mk revision 1.3 1 # $NetBSD: depsrc-optional.mk,v 1.3 2020/09/05 15:57:12 rillig Exp $
2 #
3 # Tests for the special source .OPTIONAL in dependency declarations,
4 # which ignores the target if make cannot find out how to create it.
5 #
6 # TODO: Describe practical use cases for this feature.
7
8 # TODO: Explain why the commands for "important" are not executed.
9 # I had thought that only the "optional" commands were skipped.
10
11 all: important
12 : ${.TARGET} is made.
13
14 important: optional
15 : ${.TARGET} is made.
16
17 optional: .OPTIONAL
18 : This is not executed.
19