summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2015-08-15 08:37:48 -0700
committerKaz Kylheku <kaz@kylheku.com>2015-08-15 08:37:48 -0700
commit11ab30bd76f3cc28b364f79398229212e9537de1 (patch)
tree5e3dc22c0d0c43f45895f2950885b009eeb05583 /Makefile
parent899655aa3b256dab10e764889c8323a53a585a04 (diff)
downloadtxr-11ab30bd76f3cc28b364f79398229212e9537de1.tar.gz
txr-11ab30bd76f3cc28b364f79398229212e9537de1.tar.bz2
txr-11ab30bd76f3cc28b364f79398229212e9537de1.zip
Regenerate parser and scanner if config changes.
* Makefile (lex.yy.c, y.tab.c, y.tab.h): Add missing dependencies on config.h and config.make so that these files are regenerated if we touch the configuration (for instance change the YACC variable).
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile6
1 files changed, 3 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 30f09166..9a4c423d 100644
--- a/Makefile
+++ b/Makefile
@@ -187,20 +187,20 @@ $(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
+lex.yy.c: $(top_srcdir)parser.l $(conf_dir)/config.make $(conf_dir)/config.h
$(call ABBREV,LEX)
$(V)rm -f $@
$(V)$(LEX) $(LEX_DBG_FLAGS) $<
$(V)chmod a-w $@
-y.tab.h: y.tab.c
+y.tab.h: y.tab.c $(conf_dir)/config.make $(conf_dir)/config.h
$(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
+y.tab.c: $(top_srcdir)parser.y $(conf_dir)/config.make $(conf_dir)/config.h
$(call ABBREV,YACC)
$(V)rm -f y.tab.c
$(V)if $(YACC) -v -d $< ; then \