From 2a2a53e9277014df4c4ca11fbd752ea515086220 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Wed, 25 Oct 2017 06:01:26 -0700 Subject: Makefile: improve command abbreviation. For all build steps other than linking, print only the leftmost prerequisite of the target. * Makefile (ABBREV): The macro references $< rather than $^, and hence longer needs the $(DEP_$@) filtering. (ABBREVN): New macro, identical to previous ABBREV, modulo a whitespace fix: removal of a stray tab character. (LINK_PROG): For linking, use ABBREVN so that all the object files are shown. --- Makefile | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 24133cdd..0128f2e8 100644 --- a/Makefile +++ b/Makefile @@ -87,12 +87,16 @@ MAKEFLAGS += --no-builtin-rules V = $(if $(VERBOSE),,@) -# Filtering out $(DEP_$@) allows the abbreviated output to show just the direct -# prerequisites without the long laundry list of additional dependencies. ABBREV = $(if $(VERBOSE),\ @:,\ @printf "%s %s -> %s\n" $(1) \ - "$(patsubst $(top_srcdir)%,%,$(filter-out $(DEP_$@),$^))" $@) + "$(patsubst $(top_srcdir)%,%,$<)" $@) +# Filtering out $(DEP_$@) allows the abbreviated output to show just the direct +# prerequisites without the long laundry list of additional dependencies. +ABBREVN = $(if $(VERBOSE),\ + @:,\ + @printf "%s %s -> %s\n" $(1) \ + "$(patsubst $(top_srcdir)%,%,$(filter-out $(DEP_$@),$^))" $@) ABBREV3 = $(if $(VERBOSE),@:,@printf "%s %s -> %s\n" $(1) "$(3)" $(2)) define DEPGEN @@ -123,7 +127,7 @@ $(call DEPGEN,${@:.o=.d}) endef define LINK_PROG -$(call ABBREV,LINK) +$(call ABBREVN,LINK) $(call SH,$(TXR_CC) $(1) $(TXR_CFLAGS) -o $@ $^ $(TXR_LDFLAGS)) endef -- cgit v1.2.3