From f5fddd6325ee30b4910a7e640b56feabab3d011d Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Thu, 8 Apr 2021 17:42:30 -0700 Subject: 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. --- Makefile | 7 +------ 1 file changed, 1 insertion(+), 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 ; \ -- cgit v1.2.3