1 1.4 rillig # $NetBSD: depsrc-optional.mk,v 1.4 2020/11/08 10:17:55 rillig Exp $ 2 1.1 rillig # 3 1.3 rillig # Tests for the special source .OPTIONAL in dependency declarations, 4 1.3 rillig # which ignores the target if make cannot find out how to create it. 5 1.3 rillig # 6 1.3 rillig # TODO: Describe practical use cases for this feature. 7 1.3 rillig 8 1.3 rillig # TODO: Explain why the commands for "important" are not executed. 9 1.3 rillig # I had thought that only the "optional" commands were skipped. 10 1.3 rillig 11 1.3 rillig all: important 12 1.3 rillig : ${.TARGET} is made. 13 1.1 rillig 14 1.4 rillig important: optional optional-cohort 15 1.3 rillig : ${.TARGET} is made. 16 1.1 rillig 17 1.3 rillig optional: .OPTIONAL 18 1.3 rillig : This is not executed. 19 1.4 rillig 20 1.4 rillig # XXX: "non-existent and no sources" is wrong, should be ":: operator and 21 1.4 rillig # no sources..." instead. 22 1.4 rillig optional-cohort:: .OPTIONAL 23 1.4 rillig : This is not executed. 24 1.4 rillig 25 1.4 rillig .MAKEFLAGS: -dm 26