make(1): split the -j -n test into separate targets
The manual page says that in -j mode when the shell does not have ErrCtl (and none of the default shells has that), the command prefix '-' "affects the entire job", but this seems to be wrong. At least, there is no change in the output from before, when all commands had been in the same target.
This commit is contained in:
parent
c179784be7
commit
a98a651d79
|
@ -1,4 +1,4 @@
|
||||||
# $NetBSD: opt-jobs-no-action.mk,v 1.4 2020/12/09 07:57:52 rillig Exp $
|
# $NetBSD: opt-jobs-no-action.mk,v 1.5 2020/12/09 08:15:45 rillig Exp $
|
||||||
#
|
#
|
||||||
# Tests for the combination of the options -j and -n, which prints the
|
# Tests for the combination of the options -j and -n, which prints the
|
||||||
# commands instead of actually running them.
|
# commands instead of actually running them.
|
||||||
|
@ -74,16 +74,26 @@ ALWAYS.yes= +
|
||||||
IGNERR.no= echo running
|
IGNERR.no= echo running
|
||||||
IGNERR.yes= -echo running; false
|
IGNERR.yes= -echo running; false
|
||||||
#
|
#
|
||||||
combined:
|
combined: combined-begin
|
||||||
@+echo 'begin $@'
|
|
||||||
|
combined-begin: .PHONY
|
||||||
|
@+echo 'begin combined'
|
||||||
@+echo
|
@+echo
|
||||||
|
|
||||||
.for silent in no yes
|
.for silent in no yes
|
||||||
. for always in no yes
|
. for always in no yes
|
||||||
. for ignerr in no yes
|
. for ignerr in no yes
|
||||||
|
. for target in combined-silent-${silent}-always-${always}-ignerr-${ignerr}
|
||||||
|
combined: .WAIT ${target} .WAIT
|
||||||
|
${target}: .PHONY
|
||||||
@+echo silent=${silent} always=${always} ignerr=${ignerr}
|
@+echo silent=${silent} always=${always} ignerr=${ignerr}
|
||||||
${SILENT.${silent}}${ALWAYS.${always}}${IGNERR.${ignerr}}
|
${SILENT.${silent}}${ALWAYS.${always}}${IGNERR.${ignerr}}
|
||||||
@+echo
|
@+echo
|
||||||
. endfor
|
. endfor
|
||||||
. endfor
|
. endfor
|
||||||
|
. endfor
|
||||||
.endfor
|
.endfor
|
||||||
@+echo 'end $@'
|
|
||||||
|
combined: combined-end
|
||||||
|
combined-end: .PHONY
|
||||||
|
@+echo 'end combined'
|
||||||
|
|
Loading…
Reference in New Issue