]> git.notmuchmail.org Git - notmuch/commitdiff
build: add optional target parameter to quiet variable function
authorJani Nikula <jani@nikula.org>
Tue, 29 Aug 2017 18:27:08 +0000 (21:27 +0300)
committerDavid Bremner <david@tethera.net>
Wed, 30 Aug 2017 01:05:37 +0000 (22:05 -0300)
Sometimes using $@ as the target in the quiet build lines can be
confusing. Accept an optional second parameter in the quiet variable
function to specify the target.

Makefile.local

index c51b9afb8fe6549b67f1c7c116fe1399aec8913a..2eb55e6ce1cdd3ead68b8b0db8d90b7d4873f5a0 100644 (file)
@@ -182,11 +182,11 @@ verify-newer:
 # user how to enable verbose compiles.
 ifeq ($(V),)
 quiet_DOC := "Use \"$(MAKE) V=1\" to see the verbose compile lines.\n"
-quiet = @printf $(quiet_DOC)$(eval quiet_DOC:=)"$1 $@\n"; $($(word 1, $(1)))
+quiet = @printf $(quiet_DOC)$(eval quiet_DOC:=)"$(1) $(or $(2),$@)\n"; $($(word 1, $(1)))
 endif
 # The user has explicitly enabled quiet compilation.
 ifeq ($(V),0)
-quiet = @printf "$1 $@\n"; $($(word 1, $(1)))
+quiet = @printf "$(1) $(or $(2),$@)\n"; $($(word 1, $(1)))
 endif
 # Otherwise, print the full command line.
 quiet ?= $($(word 1, $(1)))