xref: /freebsd/contrib/bmake/unit-tests/job-flags.mk (revision cfd6422a5217410fbd66f7a7a8a64d9d85e61229)
1# $NetBSD: job-flags.mk,v 1.2 2020/11/14 13:17:47 rillig Exp $
2#
3# Tests for Job.flags, which are controlled by special source dependencies
4# like .SILENT or .IGNORE, as well as the command line options -s or -i.
5
6.MAKEFLAGS: -j1
7
8all: silent .WAIT ignore .WAIT ignore-cmds
9
10.BEGIN:
11	@echo $@
12
13silent: .SILENT .PHONY
14	echo $@
15
16ignore: .IGNORE .PHONY
17	@echo $@
18	true in $@
19	false in $@
20	@echo 'Still there in $@'
21
22ignore-cmds: .PHONY
23	# This node is not marked .IGNORE; individual commands can be switched
24	# to ignore mode by prefixing them with a '-'.
25	-false without indentation
26	# This also works if the '-' is indented by a space or a tab.
27	# Leading whitespace is stripped off by ParseLine_ShellCommand.
28	 -false space
29		-false tab
30
31.END:
32	@echo $@
33