1zmk.Silent(5) Programmer's Manual zmk.Silent(5)
2
4 Silent — module for supporting silent rules
5
7 include z.mk
8 $(eval $(call ZMK.Import,Silent))
9
11 The Silent module, once imported, provides functions and variables for
12 supporting silent rules. Silent rules are a configuration option, trad‐
13 ing precision of the exact commands used by the build system, for better
14 visibility of warnings and other output. When enabled, actual commands
15 executed by Make are hidden and a symbolic representation replaced with a
16 symbolic representation devoid of details.
17
18 Silent rules are usually a configuration option of a specific build
19 workspace. To enable, execute the configure script with the option
20 --enable-silent-rules.
21
23 This module does not provide any targets.
24
26 This module provides the following variables.
27
28 Silent.Active
29 The global silent mode toggle. Any non-empty value enables silent rules.
30 This is automatically configured by the Configure module.
31
32 Silent.Command
33 Expands to @ when silent rules are active. Can be placed in front of com‐
34 mands of a make rule to cause make not to echo the command itself. It
35 should be paired with Silent.Say for the complete experience.
36
37 Silent.Say
38 Function expanding to a shell command printing the 1st and 2nd argument.
39 The first argument should be the symbolic name of the tool, such as CC or
40 LD. The second argument should be the resulting file, i.e. $@.
41
43 A hypothetical rule for compiling .foo files to .fooobj files, supporting
44 silent rules, might look like this.
45
46 include z.mk
47 $(eval $(call ZMK.Import,Silent))
48
49 %.fooobj: %.foo
50 $(eval $(call Silent.Say,FOOCC,$@))
51 $(Silent.Command)foocc -c $^ -o $@
52
54 The Silent module first appeared in zmk 0.4
55
57 Zygmunt Krynicki <me@zygoon.pl>
58
59zmk 0.5 October 21, 2020 zmk 0.5