11.6Srillig# $NetBSD: opt-keep-going.mk,v 1.6 2020/12/07 00:53:30 rillig Exp $
21.1Srillig#
31.3Srillig# Tests for the -k command line option, which stops building a target as soon
41.3Srillig# as an error is detected, but continues building the other, independent
51.3Srillig# targets, as far as possible.
61.6Srillig#
71.6Srillig# Until 2020-12-07, if a dependency of the main target failed, the exit
81.6Srillig# status was nevertheless 0, which was wrong since the main targets could
91.6Srillig# not be made.  This was only wrong in -k mode combined with compat mode.
101.1Srillig
111.4Srillig.MAKEFLAGS: -d0			# switch stdout to being line-buffered
121.5Srillig.MAKEFLAGS: -k
131.4Srillig
141.3Srilligall: dependency other
151.3Srillig
161.3Srilligdependency:
171.3Srillig	@echo dependency 1
181.3Srillig	@false
191.3Srillig	@echo dependency 2
201.3Srillig	@:; exit 7
211.3Srillig	@echo dependency 3
221.3Srillig
231.3Srilligother:
241.3Srillig	@echo other 1
251.3Srillig	@false
261.3Srillig	@echo other 2
271.1Srillig
281.1Srilligall:
291.3Srillig	@echo main 1
301.3Srillig	@false
311.3Srillig	@echo main 2
32