xref: /freebsd/contrib/bmake/unit-tests/opt-ignore.mk (revision 924226fba12cc9a228c73b956e1b7fa24c60b055)
1# $NetBSD: opt-ignore.mk,v 1.5 2020/11/09 20:50:56 rillig Exp $
2#
3# Tests for the -i command line option, which ignores the exit status of the
4# shell commands, and just continues with the next command, even from the same
5# target.
6#
7# Is there a situation in which this option is useful?
8#
9# Why are the "Error code" lines all collected at the bottom of the output
10# file, where they cannot be related to the individual shell commands that
11# failed?
12
13.MAKEFLAGS: -d0			# switch stdout to being line-buffered
14.MAKEFLAGS: -i
15
16all: dependency other
17
18dependency:
19	@echo dependency 1
20	@false
21	@echo dependency 2
22	@:; exit 7
23	@echo dependency 3
24
25other:
26	@echo other 1
27	@false
28	@echo other 2
29
30all:
31	@echo main 1
32	@false
33	@echo main 2
34