xref: /freebsd-src/contrib/bmake/unit-tests/opt-keep-going-multiple.mk (revision 06b9b3e0ad0dc3f0166b3e8f26ced68c271cf527)
1*06b9b3e0SSimon J. Gerraty# $NetBSD: opt-keep-going-multiple.mk,v 1.1 2020/12/07 01:32:04 rillig Exp $
2*06b9b3e0SSimon J. Gerraty#
3*06b9b3e0SSimon J. Gerraty# Tests for the -k command line option, which stops building a target as soon
4*06b9b3e0SSimon J. Gerraty# as an error is detected, but continues building the other, independent
5*06b9b3e0SSimon J. Gerraty# targets, as far as possible.
6*06b9b3e0SSimon J. Gerraty#
7*06b9b3e0SSimon J. Gerraty# Until 2020-12-07, the exit status of make depended only on the last of the
8*06b9b3e0SSimon J. Gerraty# main targets.  Even if the first few targets could not be made, make
9*06b9b3e0SSimon J. Gerraty# nevertheless exited with status 0.
10*06b9b3e0SSimon J. Gerraty
11*06b9b3e0SSimon J. Gerraty.MAKEFLAGS: -k
12*06b9b3e0SSimon J. Gerraty.MAKEFLAGS: fail1 fail2 succeed
13*06b9b3e0SSimon J. Gerraty
14*06b9b3e0SSimon J. Gerratyfail1 fail2: .PHONY
15*06b9b3e0SSimon J. Gerraty	false ${.TARGET}
16*06b9b3e0SSimon J. Gerraty
17*06b9b3e0SSimon J. Gerratysucceed: .PHONY
18*06b9b3e0SSimon J. Gerraty	true ${.TARGET}
19*06b9b3e0SSimon J. Gerraty
20*06b9b3e0SSimon J. Gerraty.END:
21*06b9b3e0SSimon J. Gerraty	: The end.
22