diff options
Diffstat (limited to 'unit-tests/sh-jobs.mk')
-rw-r--r-- | unit-tests/sh-jobs.mk | 34 |
1 files changed, 30 insertions, 4 deletions
diff --git a/unit-tests/sh-jobs.mk b/unit-tests/sh-jobs.mk index 62172c2a0c86..e8d4f976109a 100644 --- a/unit-tests/sh-jobs.mk +++ b/unit-tests/sh-jobs.mk @@ -1,9 +1,35 @@ -# $NetBSD: sh-jobs.mk,v 1.2 2020/08/16 14:25:16 rillig Exp $ +# $NetBSD: sh-jobs.mk,v 1.3 2020/12/11 01:06:10 rillig Exp $ # # Tests for the "run in jobs mode" part of the "Shell Commands" section # from the manual page. -# TODO: Implementation +# TODO: Tutorial -all: - @:; +.MAKEFLAGS: -j1 + +all: .PHONY comment .WAIT comment-with-followup-line .WAIT no-comment + +# If a shell command starts with a comment character after stripping the +# leading '@', it is run in ignore-errors mode since the default runChkTmpl +# would lead to a syntax error in the generated shell file, at least for +# bash and dash, but not for NetBSD sh and ksh. +# +# See JobPrintCommand, cmdTemplate, runIgnTmpl +comment: .PHONY + @# comment + +# If a shell command starts with a comment character after stripping the +# leading '@', it is run in ignore-errors mode. +# +# See JobPrintCommand, cmdTemplate, runIgnTmpl +comment-with-followup-line: .PHONY + @# comment${.newline}echo '$@: This is printed.'; false + @true + +# Without the comment, the commands are run in the default mode, which checks +# the exit status of every makefile line. +# +# See JobPrintCommand, cmdTemplate, runChkTmpl +no-comment: .PHONY + @echo '$@: This is printed.'; false + @true |