xref: /freebsd-src/contrib/bmake/unit-tests/opt-no-action-runflags.mk (revision 06b9b3e0ad0dc3f0166b3e8f26ced68c271cf527)
1*06b9b3e0SSimon J. Gerraty# $NetBSD: opt-no-action-runflags.mk,v 1.1 2020/12/09 07:57:52 rillig Exp $
2*06b9b3e0SSimon J. Gerraty#
3*06b9b3e0SSimon J. Gerraty# Tests for the -n command line option, which runs almost no commands,
4*06b9b3e0SSimon J. Gerraty# combined with the RunFlags '@', '-', '+' for individual commands.
5*06b9b3e0SSimon J. Gerraty#
6*06b9b3e0SSimon J. Gerraty# See also:
7*06b9b3e0SSimon J. Gerraty#	opt-jobs-no-action.mk
8*06b9b3e0SSimon J. Gerraty#		The corresponding test with the -j option
9*06b9b3e0SSimon J. Gerraty
10*06b9b3e0SSimon J. Gerraty.MAKEFLAGS: -n
11*06b9b3e0SSimon J. Gerraty
12*06b9b3e0SSimon J. Gerratyall: .PHONY combined
13*06b9b3e0SSimon J. Gerraty
14*06b9b3e0SSimon J. GerratySILENT.no=	# none
15*06b9b3e0SSimon J. GerratySILENT.yes=	@
16*06b9b3e0SSimon J. GerratyALWAYS.no=	# none
17*06b9b3e0SSimon J. GerratyALWAYS.yes=	+
18*06b9b3e0SSimon J. GerratyIGNERR.no=	echo running
19*06b9b3e0SSimon J. GerratyIGNERR.yes=	-echo running; false
20*06b9b3e0SSimon J. Gerraty#
21*06b9b3e0SSimon J. Gerratycombined: .PHONY
22*06b9b3e0SSimon J. Gerraty	@+echo hide-from-output 'begin $@'; echo
23*06b9b3e0SSimon J. Gerraty.for silent in no yes
24*06b9b3e0SSimon J. Gerraty.  for always in no yes
25*06b9b3e0SSimon J. Gerraty.    for ignerr in no yes
26*06b9b3e0SSimon J. Gerraty	@+echo hide-from-output silent=${silent} always=${always} ignerr=${ignerr}
27*06b9b3e0SSimon J. Gerraty	${SILENT.${silent}}${ALWAYS.${always}}${IGNERR.${ignerr}}
28*06b9b3e0SSimon J. Gerraty	@+echo hide-from-output
29*06b9b3e0SSimon J. Gerraty.    endfor
30*06b9b3e0SSimon J. Gerraty.  endfor
31*06b9b3e0SSimon J. Gerraty.endfor
32*06b9b3e0SSimon J. Gerraty	@+echo hide-from-output 'end $@'
33