ZMK.SILENT(5)
π NAME π
Silent β the module that makes your build shut up (affectionately) so you can actually see your warnings. It's for supporting silent rules, bestie. That's the whole vibe.
β¨ SYNOPSIS β¨
include z.mk
$(eval $(call ZMK.Import,Silent))
That's it. Two lines. You import it, you get the whole toolkit. Slay.
πΈ DESCRIPTION πΈ
okay so. Once you import the Silent module, it hands you a whole little collection of functions and variables that support silent rules. And what even are silent rules, you ask? Great question, bestie.
Silent rules are a configuration option. What they do is trade the precision of knowing the exact commands your build system is runningβ¦ for much better visibility of warnings and other output. Like, it's a whole trade-off, and honestly? Sometimes it's a glow-up. When silent rules are enabled, the actual commands that Make executes get hidden, and a symbolic representation gets put in their place instead β one that's completely devoid of details. So you see CC foo.o and not the entire 400-character compiler invocation. iykyk.
Silent rules are usually a configuration option of a specific build workspace. So if you want them on, you go run the configure script with the option:
--enable-silent-rules
Periodt. That's the switch.
π TARGETS π
This module does not provide any targets. Not a single one. Zero. Nada. It's giving β¨supporting castβ¨, not β¨main characterβ¨ β and that's completely fine. π
π¦ VARIABLES π¦
Okay so this module does provide the following variables, and they're the whole point, so let's get into it. π«Ά
π Silent.Active
The global silent mode toggle. Any non-empty value enables silent rules β literally any non-empty value, we don't judge. And the best part? This is automatically configured by the Configure module. So you don't even have to set it yourself, you just get to enjoy it. π
π Silent.Command
This one expands to @ when silent rules are active. Put it in front of commands of a make rule and make will not echo the command itself. Like, it goes quiet. Respectfully. π€«
Pro tip from the manpage itself: it should be paired with Silent.Say for the complete experience. Don't do half the fit, bestie. Do the whole look. π
π Silent.Say
A function that expands to a shell command which prints the 1st and 2nd argument. So here's how you use it:
- The first argument should be the symbolic name of the tool, like
CCorLD. - The second argument should be the resulting file β that is,
$@.
So it's basically the module going "hey bestie, here's what I'm doing and what I'm doing it to" without dumping the entire command line on your terminal. Iconic behaviour, honestly. π
π₯ EXAMPLES π₯
Okay so here's a hypothetical rule for compiling .foo files into .fooobj files, supporting silent rules. Look at it. It's beautiful. π
include z.mk
$(eval $(call ZMK.Import,Silent))
%.fooobj: %.foo
$(eval $(call Silent.Say,FOOCC,$@))
$(Silent.Command)foocc -c $^ -o $@
See how Silent.Say announces FOOCC and the target, and then Silent.Command shuts make up while the real command runs? That's the whole duo. Chef's kiss. π
β¨
π HISTORY π
The Silent module first appeared in zmk 0.4. So it's been serving looks for a minute now. β
π AUTHORS π
Zygmunt Krynicki <me@zygoon.pl> β the icon who wrote this whole thing. Give them their flowers. πΈ
And that's the page, bestie! This is from zmk version 0.5.1, dated October 21, 2020, and it's the zmk.Silent(5) manual page from the LOCAL manual. No cap. Go forth and silence your builds responsibly. ππβ¨
π¦ where this page comes from
- debian bookworm: zmk-doc 0.5.1-2 Β· LGPL-3.0-only
- debian trixie: zmk-doc 0.5.1-2 Β· LGPL-3.0-only
- ubuntu jammy: zmk-doc 0.5.1-2 Β· LGPL-3.0-only
- ubuntu noble: zmk-doc 0.5.1-2 Β· LGPL-3.0-only
- ubuntu questing: zmk-doc 0.5.1-2
- ubuntu resolute: zmk-doc 0.5.1-2build1 Β· LGPL-3.0-only
- ubuntu stonking: zmk-doc 0.5.1-2build1 Β· LGPL-3.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms