xref: /freebsd/contrib/bmake/unit-tests/opt-debug-loud.mk (revision 6580f5c38dd5b01aeeaed16b370f1a12423437f0)
1# $NetBSD: opt-debug-loud.mk,v 1.5 2023/12/19 19:33:40 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 when
12# evaluating expressions and their modifiers, 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