xref: /freebsd/contrib/bmake/unit-tests/opt-debug-loud.mk (revision 8ddb146abcdf061be9f2c0db7e391697dafad85c)
1# $NetBSD: opt-debug-loud.mk,v 1.4 2020/10/05 19:27:48 rillig Exp $
2#
3# Tests for the -dl command line option, which prints the commands before
4# running them, ignoring the command line option for silent mode (-s) as
5# well as the .SILENT special source and target, as well as the '@' prefix
6# for shell commands.
7
8.MAKEFLAGS: -dl -s
9.SILENT:
10
11# The -dl command line option does not affect commands that are run during
12# variable expansion, such as :!cmd! or :sh.
13.if ${:!echo word!} != "word"
14.  error
15.endif
16
17all: .SILENT
18	# Even though the command line option -s is given, .SILENT is set
19	# for all targets and for this target in particular, the command
20	# is still printed.  The -dl debugging option is stronger than all
21	# of these.
22	@echo all-word
23