2021-06-25 18:16:24 +00:00
|
|
|
# $NetBSD: sh-jobs.mk,v 1.4 2021/04/16 16:49:27 rillig Exp $
|
2020-09-05 16:11:04 +00:00
|
|
|
#
|
|
|
|
# Tests for the "run in jobs mode" part of the "Shell Commands" section
|
|
|
|
# from the manual page.
|
|
|
|
|
2021-01-14 01:24:34 +00:00
|
|
|
# TODO: Tutorial
|
2020-09-05 16:11:04 +00:00
|
|
|
|
2021-01-14 01:24:34 +00:00
|
|
|
.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.
|
|
|
|
#
|
2021-06-25 18:16:24 +00:00
|
|
|
# See JobWriteCommand, cmdTemplate, runIgnTmpl
|
2021-01-14 01:24:34 +00:00
|
|
|
comment: .PHONY
|
|
|
|
@# comment
|
|
|
|
|
|
|
|
# If a shell command starts with a comment character after stripping the
|
|
|
|
# leading '@', it is run in ignore-errors mode.
|
|
|
|
#
|
2021-06-25 18:16:24 +00:00
|
|
|
# See JobWriteCommand, cmdTemplate, runIgnTmpl
|
2021-01-14 01:24:34 +00:00
|
|
|
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.
|
|
|
|
#
|
2021-06-25 18:16:24 +00:00
|
|
|
# See JobWriteCommand, cmdTemplate, runChkTmpl
|
2021-01-14 01:24:34 +00:00
|
|
|
no-comment: .PHONY
|
|
|
|
@echo '$@: This is printed.'; false
|
|
|
|
@true
|