Home | History | Annotate | Line # | Download | only in unit-tests
opt-query.mk revision 1.3
      1  1.3  rillig # $NetBSD: opt-query.mk,v 1.3 2020/08/19 05:13:18 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.3  rillig # This command cannot be prevented from being run since it is used at parse
     10  1.3  rillig # time, and any later variable assignments may depend on its result.
     11  1.3  rillig !=	echo 'command during parsing' 1>&2; echo
     12  1.1  rillig 
     13  1.3  rillig # None of these commands are run.
     14  1.3  rillig .BEGIN:
     15  1.3  rillig 	@echo '$@: hidden command'
     16  1.3  rillig 	@+echo '$@: run always'
     17  1.1  rillig 
     18  1.3  rillig # None of these commands are run.
     19  1.1  rillig all:
     20  1.3  rillig 	@echo '$@: hidden command'
     21  1.3  rillig 	@+echo '$@: run always'
     22  1.3  rillig 
     23  1.3  rillig # The exit status 1 is because the "all" target has to be made, that is,
     24  1.3  rillig # it is not up-to-date.
     25