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