logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

Silent — module for supporting silent rules

Authors

Zygmunt Krynicki <me@zygoon.pl> zmk 0.5.1 October 21, 2020 zmk.Silent(5)

Description

The Silent module, once imported, provides functions and variables for supporting silentrules. 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.

Examples

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 $@

History

The Silent module first appeared in zmk 0.4

Name

Silent — module for supporting silent rules

Synopsis

include z.mk $(eval $(call ZMK.Import,Silent))

Targets

This module does not provide any targets.

Variables

This module provides the following variables. Silent.Active The global silent mode toggle. Any non-empty value enables silent rules. This is automatically configured by the Configure module. Silent.Command 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. Silent.Say 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. $@.

See Also