Home | History | Annotate | Line # | Download | only in unit-tests
      1  1.4  rillig # $NetBSD: opt-no-action.mk,v 1.4 2020/11/09 20:50:56 rillig Exp $
      2  1.1  rillig #
      3  1.3  rillig # Tests for the -n command line option, which runs almost no commands.
      4  1.3  rillig # It just outputs them, to be inspected by human readers.
      5  1.3  rillig # Only commands that are in a .MAKE target or prefixed by '+' are run.
      6  1.1  rillig 
      7  1.4  rillig .MAKEFLAGS: -n
      8  1.4  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 all: main
     14  1.3  rillig all: run-always
     15  1.3  rillig 
     16  1.3  rillig # Both of these commands are printed, but only the '+' command is run.
     17  1.3  rillig .BEGIN:
     18  1.3  rillig 	@echo '$@: hidden command'
     19  1.3  rillig 	@+echo '$@: run always'
     20  1.3  rillig 
     21  1.3  rillig # Both of these commands are printed, but only the '+' command is run.
     22  1.3  rillig main:
     23  1.3  rillig 	@echo '$@: hidden command'
     24  1.3  rillig 	@+echo '$@: run always'
     25  1.3  rillig 
     26  1.3  rillig # None of these commands is printed, but both are run, because this target
     27  1.3  rillig # depends on the special source ".MAKE".
     28  1.3  rillig run-always: .MAKE
     29  1.3  rillig 	@echo '$@: hidden command'
     30  1.3  rillig 	@+echo '$@: run always'
     31  1.3  rillig 
     32  1.3  rillig # Both of these commands are printed, but only the '+' command is run.
     33  1.3  rillig .END:
     34  1.3  rillig 	@echo '$@: hidden command'
     35  1.3  rillig 	@+echo '$@: run always'
     36