summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2015-08-15 18:37:35 -0700
committerKaz Kylheku <kaz@kylheku.com>2015-08-15 18:37:35 -0700
commit894bfc876e2326c96873de9cdcbb45801456dde0 (patch)
treeff3a34847a3db560258eef98ffbf66c3851a8e7e /Makefile
parent4ea8afab7038188cc6e7186230188362006a2820 (diff)
downloadtxr-894bfc876e2326c96873de9cdcbb45801456dde0.tar.gz
txr-894bfc876e2326c96873de9cdcbb45801456dde0.tar.bz2
txr-894bfc876e2326c96873de9cdcbb45801456dde0.zip
Minor dependency fix in Makefile.
* Makefile (y.tab.c, y.tab.h, lex.yy.c): Express dependency of these on the configuration material via the DEP macro rather than directly. That way ABBREV can reflect over the dependency.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile9
1 files changed, 6 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 8c33a7b3..1f17291b 100644
--- a/Makefile
+++ b/Makefile
@@ -187,20 +187,23 @@ $(call DEP,$(OBJS) $(EXTRA_OBJS-y),\
$(eval $(foreach item,lex.yy.o txr.o match.o parser.o,\
$(call DEP,opt/$(item) dbg/$(item),y.tab.h)))
-lex.yy.c: $(top_srcdir)parser.l $(conf_dir)/config.make $(conf_dir)/config.h
+$(eval $(foreach item,y.tab.c y.tab.h lex.yy.c,\
+ $(call DEP,$(item),$(conf_dir)/config.make $(conf_dir)/config.h)))
+
+lex.yy.c: $(top_srcdir)parser.l
$(call ABBREV,LEX)
$(V)rm -f $@
$(V)$(LEX) $(LEX_DBG_FLAGS) $<
$(V)chmod a-w $@
-y.tab.h: y.tab.c $(conf_dir)/config.make $(conf_dir)/config.h
+y.tab.h: y.tab.c
$(V)if ! [ -e y.tab.h ] ; then \
echo "Someone removed y.tab.h but left y.tab.c" ; \
echo "Remove y.tab.c and re-run make" ; \
exit 1; \
fi
-y.tab.c: $(top_srcdir)parser.y $(conf_dir)/config.make $(conf_dir)/config.h
+y.tab.c: $(top_srcdir)parser.y
$(call ABBREV,YACC)
$(V)rm -f y.tab.c
$(V)if $(YACC) -v -d $< ; then \