Home | History | Annotate | Line # | Download | only in unit-tests
      1 # $NetBSD: opt-no-action-runflags.mk,v 1.1 2020/12/09 07:57:52 rillig Exp $
      2 #
      3 # Tests for the -n command line option, which runs almost no commands,
      4 # combined with the RunFlags '@', '-', '+' for individual commands.
      5 #
      6 # See also:
      7 #	opt-jobs-no-action.mk
      8 #		The corresponding test with the -j option
      9 
     10 .MAKEFLAGS: -n
     11 
     12 all: .PHONY combined
     13 
     14 SILENT.no=	# none
     15 SILENT.yes=	@
     16 ALWAYS.no=	# none
     17 ALWAYS.yes=	+
     18 IGNERR.no=	echo running
     19 IGNERR.yes=	-echo running; false
     20 #
     21 combined: .PHONY
     22 	@+echo hide-from-output 'begin $@'; echo
     23 .for silent in no yes
     24 .  for always in no yes
     25 .    for ignerr in no yes
     26 	@+echo hide-from-output silent=${silent} always=${always} ignerr=${ignerr}
     27 	${SILENT.${silent}}${ALWAYS.${always}}${IGNERR.${ignerr}}
     28 	@+echo hide-from-output
     29 .    endfor
     30 .  endfor
     31 .endfor
     32 	@+echo hide-from-output 'end $@'
     33