From 1f06941a7cc586c78152ca67dec0551106977b08 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Tue, 30 Apr 2024 15:07:06 -0400 Subject: build: Listen to make -s --- build/prelude.mk | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) (limited to 'build/prelude.mk') diff --git a/build/prelude.mk b/build/prelude.mk index b235fa9..5be26cb 100644 --- a/build/prelude.mk +++ b/build/prelude.mk @@ -44,33 +44,22 @@ TRUTHY,y := y TRUTHY,1 := y # Boolean operators are also implemented with nested expansion -NOT, := y +NOT, := y # Normalize ${V} to either "y" or "" -IS_V := ${TRUTHY,${V}} +export XV=${TRUTHY,${V}} # Suppress output unless V=1 Q, := @ -Q := ${Q,${IS_V}} +Q := ${Q,${XV}} # Show full commands with `make V=1`, otherwise short summaries -MSG = @msg() { \ - MSG="$$1"; \ - shift; \ - test "${IS_V}" || printf '%s\n' "$$MSG"; \ - test "$${1:-}" || return 0; \ - test "${IS_V}" && printf '%s\n' "$$*"; \ - "$$@"; \ - }; \ - msg - -# Maximum width of a short message, to align the ✔/✘ -MSG_WIDTH := 30 +MSG = @build/msg.sh # cat a file if V=1 VCAT,y := @cat VCAT, := @: -VCAT := ${VCAT,${IS_V}} +VCAT := ${VCAT,${XV}} # All external dependencies ALL_PKGS := \ -- cgit v1.2.3