summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2017-10-25 06:01:26 -0700
committerKaz Kylheku <kaz@kylheku.com>2017-10-25 06:01:26 -0700
commit68cb7ad16369d196e230200b6e43659e27b8c45e (patch)
tree4fc48c0f435d3dc1ab0d8cf24ae00d65b91545ba /Makefile
parent1ce4659039a548fdbf204e868a11475b1f6dcd0a (diff)
downloadtxr-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--Makefile12
1 files 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