1 1.4 rillig # $NetBSD: opt-query.mk,v 1.4 2020/11/09 20:50:56 rillig Exp $ 2 1.1 rillig # 3 1.2 rillig # Tests for the -q command line option. 4 1.3 rillig # 5 1.3 rillig # The -q option only looks at the dependencies between the targets. 6 1.3 rillig # None of the commands in the targets are run, not even those that are 7 1.3 rillig # prefixed with '+'. 8 1.3 rillig 9 1.4 rillig .MAKEFLAGS: -q 10 1.4 rillig 11 1.3 rillig # This command cannot be prevented from being run since it is used at parse 12 1.3 rillig # time, and any later variable assignments may depend on its result. 13 1.3 rillig != echo 'command during parsing' 1>&2; echo 14 1.1 rillig 15 1.3 rillig # None of these commands are run. 16 1.3 rillig .BEGIN: 17 1.3 rillig @echo '$@: hidden command' 18 1.3 rillig @+echo '$@: run always' 19 1.1 rillig 20 1.3 rillig # None of these commands are run. 21 1.1 rillig all: 22 1.3 rillig @echo '$@: hidden command' 23 1.3 rillig @+echo '$@: run always' 24 1.3 rillig 25 1.3 rillig # The exit status 1 is because the "all" target has to be made, that is, 26 1.3 rillig # it is not up-to-date. 27