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