summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2021-04-08 17:42:30 -0700
committerKaz Kylheku <kaz@kylheku.com>2021-04-08 17:42:30 -0700
commitf5fddd6325ee30b4910a7e640b56feabab3d011d (patch)
treea43e8fe7bbba0862afaed135d5d5c60267991644
parent8f11158ff4862ef77ef12bbf8f92095368b57f41 (diff)
downloadtxr-f5fddd6325ee30b4910a7e640b56feabab3d011d.tar.gz
txr-f5fddd6325ee30b4910a7e640b56feabab3d011d.tar.bz2
txr-f5fddd6325ee30b4910a7e640b56feabab3d011d.zip
build: calm restless yacc.
* Makefile (%.tab.c %.tab.h): Remove the trick of keeping the old y.tab.h file if it has not changed. This was once a good idea, but now that we have a proper grouped targets pattern rule which knows that y.tab.h depends on and is produced from parser.y, the trick causes y.tab.h to be perpetually out of date due to its old time stamp, and so yacc is run on every build.
-rw-r--r--Makefile7
1 files changed, 1 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index 521b894f..fe007c88 100644
--- a/Makefile
+++ b/Makefile
@@ -280,15 +280,10 @@ lex.yy.c: $(top_srcdir)parser.l
%.tab.c %.tab.h: $(top_srcdir)parser.%
$(call ABBREV,YACC)
- $(call SH, \
- if [ -e y.tab.h ]; then mv y.tab.h y.tab.h.old ; fi)
- $(call SH,rm -f y.tab.c)
+ $(call SH,rm -f y.tab.c y.tab.h)
$(call SH, \
if $(TXR_YACC) -v -d $< ; then \
chmod a-w y.tab.c ; \
- if cmp -s y.tab.h y.tab.h.old ; then \
- mv y.tab.h.old y.tab.h ; \
- fi ; \
else \
rm y.tab.c ; \
false ; \