summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2014-12-10 17:58:01 -0800
committerKaz Kylheku <kaz@kylheku.com>2014-12-10 17:58:01 -0800
commitc63b7549a408a059776151d6dfc6889dbb3979a5 (patch)
tree9c92ee4b307ada11ed3b95f5668a3bcad7986484 /Makefile
parenta764442a57fae2490d93d2daefea5152d6213e78 (diff)
downloadtxr-c63b7549a408a059776151d6dfc6889dbb3979a5.tar.gz
txr-c63b7549a408a059776151d6dfc6889dbb3979a5.tar.bz2
txr-c63b7549a408a059776151d6dfc6889dbb3979a5.zip
* Makefile (ABBREV): Rewrite to take advantage of DEP_
variables to remove the dependencies from the output. (ABBREV2): No longer needed, removed. (dbg/%.o, opt/%.o, %.o): Just use ABBREV instead of ABBREV2; it does the right thing. Dependency of objects on config.make removed. * dep.mk: Regenerated. Now provides variable assignments in addition to rules, and each object is made dependent on config.make. * depend.txr: Adjusted to generate dep.mk in new format.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile15
1 files changed, 8 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index a5075109..cc9d32df 100644
--- a/Makefile
+++ b/Makefile
@@ -68,22 +68,25 @@ MAKEFLAGS += --no-builtin-rules
V = $(if $(VERBOSE),,@)
-ABBREV = $(if $(VERBOSE),@:,@printf "%s %s -> %s\n" $(1) "$^" $@)
-ABBREV2 = $(if $(VERBOSE),@:,@printf "%s %s -> %s\n" $(1) "$(2)" $@)
+# 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) "$(filter-out $(DEP_$@),$^)" $@)
ABBREV3 = $(if $(VERBOSE),@:,@printf "%s %s -> %s\n" $(1) "$(3)" $(2))
dbg/%.o: %.c
- $(call ABBREV2,CC,$<)
+ $(call ABBREV,CC)
$(V)mkdir -p $(dir $@)
$(V)$(CC) $(CFLAGS) -c -o $@ $<
opt/%.o: %.c
- $(call ABBREV2,CC,$<)
+ $(call ABBREV,CC)
$(V)mkdir -p $(dir $@)
$(V)$(CC) $(OPT_FLAGS) $(CFLAGS) -c -o $@ $<
%.o: %.c
- $(call ABBREV2,CC,$<)
+ $(call ABBREV,CC,$<)
$(V)$(CC) $(OPT_FLAGS) $(CFLAGS) -c -o $@ $<
.PHONY: all
@@ -101,8 +104,6 @@ VPATH := $(top_srcdir)
-include $(top_srcdir)/dep.mk
-$(OPT_OBJS) $(DBG_OBJS): config.make
-
lex.yy.c: parser.l config.make
$(call ABBREV,LEX)
$(V)rm -f $@