zmk.Silent(5) | File Formats Manual (prm) | zmk.Silent(5) |
Silent
— module
for supporting silent rules
include z.mk $(eval $(call ZMK.Import,Silent))
The Silent
module, once
imported,
provides functions and variables for supporting
silent
rules. Silent rules are a configuration option, trading precision of
the exact commands used by the build system, for better visibility of
warnings and other output. When enabled, actual commands executed by Make
are hidden and a symbolic representation replaced with a symbolic
representation devoid of details.
Silent rules are usually a configuration option of a specific build workspace. To enable, execute the configure script with the option --enable-silent-rules.
This module does not provide any targets.
This module provides the following variables.
The global silent mode toggle. Any non-empty value enables silent
rules. This is automatically configured by the
Configure
module.
Expands to
@ when silent
rules are active. Can be placed in front of commands of a make rule to cause
make not to echo the command itself. It should be paired with
Silent.Say
for the complete experience.
Function expanding to a shell command printing the 1st and 2nd argument. The first argument should be the symbolic name of the tool, such as CC or LD. The second argument should be the resulting file, i.e. $@.
A hypothetical rule for compiling .foo files to .fooobj files, supporting silent rules, might look like this.
include z.mk $(eval $(call ZMK.Import,Silent)) %.fooobj: %.foo $(eval $(call Silent.Say,FOOCC,$@)) $(Silent.Command)foocc -c $^ -o $@
The Silent
module first appeared in zmk
0.4
Zygmunt Krynicki <me@zygoon.pl>
October 21, 2020 | zmk 0.5.1 |