1 1.4 rillig # $NetBSD: sh-jobs.mk,v 1.4 2021/04/16 16:49:27 rillig Exp $ 2 1.1 rillig # 3 1.2 rillig # Tests for the "run in jobs mode" part of the "Shell Commands" section 4 1.2 rillig # from the manual page. 5 1.1 rillig 6 1.3 rillig # TODO: Tutorial 7 1.1 rillig 8 1.3 rillig .MAKEFLAGS: -j1 9 1.3 rillig 10 1.3 rillig all: .PHONY comment .WAIT comment-with-followup-line .WAIT no-comment 11 1.3 rillig 12 1.3 rillig # If a shell command starts with a comment character after stripping the 13 1.3 rillig # leading '@', it is run in ignore-errors mode since the default runChkTmpl 14 1.3 rillig # would lead to a syntax error in the generated shell file, at least for 15 1.3 rillig # bash and dash, but not for NetBSD sh and ksh. 16 1.3 rillig # 17 1.4 rillig # See JobWriteCommand, cmdTemplate, runIgnTmpl 18 1.3 rillig comment: .PHONY 19 1.3 rillig @# comment 20 1.3 rillig 21 1.3 rillig # If a shell command starts with a comment character after stripping the 22 1.3 rillig # leading '@', it is run in ignore-errors mode. 23 1.3 rillig # 24 1.4 rillig # See JobWriteCommand, cmdTemplate, runIgnTmpl 25 1.3 rillig comment-with-followup-line: .PHONY 26 1.3 rillig @# comment${.newline}echo '$@: This is printed.'; false 27 1.3 rillig @true 28 1.3 rillig 29 1.3 rillig # Without the comment, the commands are run in the default mode, which checks 30 1.3 rillig # the exit status of every makefile line. 31 1.3 rillig # 32 1.4 rillig # See JobWriteCommand, cmdTemplate, runChkTmpl 33 1.3 rillig no-comment: .PHONY 34 1.3 rillig @echo '$@: This is printed.'; false 35 1.3 rillig @true 36