1# $NetBSD: deptgt-silent-jobs.mk,v 1.3 2022/04/15 09:33:20 rillig Exp $
2#
3# Ensure that the special dependency target '.SILENT' only affects the amount
4# of output, but not the kind of error handling.
5#
6# History:
7#	In job.c 1.83 from 2003.12.20.00.18.22, in an attempt to fix
8#	https://gnats.netbsd.org/18573, commands that suppressed error
9#	handling were output in jobs mode, even when the global '.SILENT'
10#	was set.  This was fixed in job.c 1.452 from 2022-02-12.
11#
12# See also:
13#	https://gnats.netbsd.org/45356
14
15all: compat jobs
16.PHONY: all compat jobs test
17
18.SILENT:
19test:
20	@echo '${VARIANT}: testing 1'
21	-echo '${VARIANT}: testing 2'
22	echo '${VARIANT}: testing 3'
23
24# expect: compat: testing 1
25# expect: compat: testing 2
26# expect: compat: testing 3
27compat:
28	@${MAKE} -r -f ${MAKEFILE} test VARIANT=compat
29
30# expect: jobs: testing 1
31# expect: jobs: testing 2
32# expect: jobs: testing 3
33jobs:
34	@${MAKE} -r -f ${MAKEFILE} test VARIANT=jobs -j1
35