1*b0c40a00SSimon J. Gerraty# $NetBSD: sh-jobs.mk,v 1.4 2021/04/16 16:49:27 rillig Exp $ 22c3632d1SSimon J. Gerraty# 32c3632d1SSimon J. Gerraty# Tests for the "run in jobs mode" part of the "Shell Commands" section 42c3632d1SSimon J. Gerraty# from the manual page. 52c3632d1SSimon J. Gerraty 606b9b3e0SSimon J. Gerraty# TODO: Tutorial 72c3632d1SSimon J. Gerraty 806b9b3e0SSimon J. Gerraty.MAKEFLAGS: -j1 906b9b3e0SSimon J. Gerraty 1006b9b3e0SSimon J. Gerratyall: .PHONY comment .WAIT comment-with-followup-line .WAIT no-comment 1106b9b3e0SSimon J. Gerraty 1206b9b3e0SSimon J. Gerraty# If a shell command starts with a comment character after stripping the 1306b9b3e0SSimon J. Gerraty# leading '@', it is run in ignore-errors mode since the default runChkTmpl 1406b9b3e0SSimon J. Gerraty# would lead to a syntax error in the generated shell file, at least for 1506b9b3e0SSimon J. Gerraty# bash and dash, but not for NetBSD sh and ksh. 1606b9b3e0SSimon J. Gerraty# 17*b0c40a00SSimon J. Gerraty# See JobWriteCommand, cmdTemplate, runIgnTmpl 1806b9b3e0SSimon J. Gerratycomment: .PHONY 1906b9b3e0SSimon J. Gerraty @# comment 2006b9b3e0SSimon J. Gerraty 2106b9b3e0SSimon J. Gerraty# If a shell command starts with a comment character after stripping the 2206b9b3e0SSimon J. Gerraty# leading '@', it is run in ignore-errors mode. 2306b9b3e0SSimon J. Gerraty# 24*b0c40a00SSimon J. Gerraty# See JobWriteCommand, cmdTemplate, runIgnTmpl 2506b9b3e0SSimon J. Gerratycomment-with-followup-line: .PHONY 2606b9b3e0SSimon J. Gerraty @# comment${.newline}echo '$@: This is printed.'; false 2706b9b3e0SSimon J. Gerraty @true 2806b9b3e0SSimon J. Gerraty 2906b9b3e0SSimon J. Gerraty# Without the comment, the commands are run in the default mode, which checks 3006b9b3e0SSimon J. Gerraty# the exit status of every makefile line. 3106b9b3e0SSimon J. Gerraty# 32*b0c40a00SSimon J. Gerraty# See JobWriteCommand, cmdTemplate, runChkTmpl 3306b9b3e0SSimon J. Gerratyno-comment: .PHONY 3406b9b3e0SSimon J. Gerraty @echo '$@: This is printed.'; false 3506b9b3e0SSimon J. Gerraty @true 36