diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2017-10-25 06:01:26 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2017-10-25 06:01:26 -0700 |
commit | 68cb7ad16369d196e230200b6e43659e27b8c45e (patch) | |
tree | 4fc48c0f435d3dc1ab0d8cf24ae00d65b91545ba /Makefile | |
parent | 1ce4659039a548fdbf204e868a11475b1f6dcd0a (diff) | |
download | txr-68cb7ad16369d196e230200b6e43659e27b8c45e.tar.gz txr-68cb7ad16369d196e230200b6e43659e27b8c45e.tar.bz2 txr-68cb7ad16369d196e230200b6e43659e27b8c45e.zip |
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.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -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 |