11.4Srillig# $NetBSD: deptgt-ignore.mk,v 1.4 2022/01/22 21:50:41 rillig Exp $ 21.1Srillig# 31.3Srillig# Tests for the special target .IGNORE in dependency declarations, which 41.3Srillig# does not stop if a command from this target exits with a non-zero status. 51.4Srillig# 61.4Srillig# This test only applies to compatibility mode. In jobs mode such as with 71.4Srillig# '-j1', all commands for a single target are bundled into a single shell 81.4Srillig# program, which is a different implementation technique, the .IGNORE applies 91.4Srillig# there as well. 101.4Srillig 111.4Srillig.MAKEFLAGS: -d0 # force stdout to be unbuffered 121.4Srillig 131.4Srilligall: depends-on-failed depends-on-ignored 141.4Srillig.PHONY: all depends-on-failed depends-on-ignored error-failed error-ignored 151.4Srillig 161.4Srilligerror-failed error-ignored: 171.4Srillig @echo '${.TARGET} before' 181.4Srillig @false 191.4Srillig @echo '${.TARGET} after' 201.4Srillig 211.4Srilligdepends-on-failed: error-failed 221.4Srillig @echo 'Making ${.TARGET} from ${.ALLSRC}.' 231.4Srilligdepends-on-ignored: error-ignored 241.4Srillig @echo 'Making ${.TARGET} from ${.ALLSRC}.' 251.1Srillig 261.4Srillig# Even though the command 'false' in the middle fails, the remaining commands 271.4Srillig# are still run. After that, the target is marked made, so targets depending 281.4Srillig# on the target with the ignored commands are made. 291.4Srillig.IGNORE: error-ignored 301.1Srillig 311.4Srillig#.MAKEFLAGS: -dg2 32