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
12all: .PHONY combined
13
14SILENT.no=	# none
15SILENT.yes=	@
16ALWAYS.no=	# none
17ALWAYS.yes=	+
18IGNERR.no=	echo running
19IGNERR.yes=	-echo running; false
20#
21combined: .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