summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2020-09-24 19:56:07 -0700
committerKaz Kylheku <kaz@kylheku.com>2020-09-24 19:56:07 -0700
commitb2c4389575185b5526370d3fb682c6ac06367b87 (patch)
tree2db46427cbbc9595479b32dd7e20e710acfc83f4 /Makefile
parent781cf1d35e83f75cf5278205cd34f63fb1284213 (diff)
downloadtxr-b2c4389575185b5526370d3fb682c6ac06367b87.tar.gz
txr-b2c4389575185b5526370d3fb682c6ac06367b87.tar.bz2
txr-b2c4389575185b5526370d3fb682c6ac06367b87.zip
parser: commit Bison-2.5-generated code.
* Makefile (BS_LIC_FROM, BS_LIC_TO): Variables removed. (y.tab.c): Remove all filtering hacks. Don't remove the license from y.tab.c. Don't remove yyparse declaration from y.tab.h. Provide a pattern rule for producing any missing file X from X.shipped. That's how y.tab.c and y.tab.h get produced from y.tab.c.shipped and y.tab.h.shipped, respectively, in user mode. * y.tab.c.shipped, y.tab.h.shipped: New files, generated using Bison 2.5.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile19
1 files changed, 8 insertions, 11 deletions
diff --git a/Makefile b/Makefile
index 8e00b1b5..0ea7b344 100644
--- a/Makefile
+++ b/Makefile
@@ -265,9 +265,6 @@ $(eval $(foreach item,lex.yy.o txr.o match.o parser.o,\
$(eval $(foreach item,y.tab.c y.tab.h lex.yy.c,\
$(call DEP,$(item),config.make config.h)))
-BS_LIC_FROM := ^[/][*] Bison impl
-BS_LIC_TO := Bison. [*][/]
-
lex.yy.c: $(top_srcdir)parser.l
$(call ABBREV,LEX)
$(call SH,rm -f $@)
@@ -297,14 +294,7 @@ y.tab.c: $(top_srcdir)parser.y
$(call SH,rm -f y.tab.c)
$(call SH, \
if $(TXR_YACC) $(YACC_FLAGS) -v -d $< ; then \
- grep -qs '$(BS_LIC_FROM)' y.tab.c && \
- grep -qs '$(BS_LIC_TO)' y.tab.c && \
- sed -e '/$(BS_LIC_FROM)/$(CM)/$(BS_LIC_TO)/d' \
- < y.tab.c > y.tab.c.tmp && \
- mv y.tab.c.tmp y.tab.c ; \
chmod a-w y.tab.c ; \
- sed -e '/yyparse/d' < y.tab.h > y.tab.h.tmp && \
- mv y.tab.h.tmp y.tab.h ; \
if cmp -s y.tab.h y.tab.h.old ; then \
mv y.tab.h.old y.tab.h ; \
fi ; \
@@ -313,6 +303,13 @@ y.tab.c: $(top_srcdir)parser.y
false ; \
fi)
+else
+
+%: $(top_srcdir)%.shipped
+ $(call ABBREV,COPY)
+ $(call SH,rm -f $@)
+ $(call SH,cp $< $@)
+
endif
# Suppress useless sccs id array and unused label warning in byacc otuput.
@@ -348,7 +345,7 @@ rebuild clean repatch: notconfigured
distclean:
$(V)echo "executing generic cleanup for non-configured directory"
rm -f txr txr.exe txr-dbg txr-dbg.exe txr-win.exe txr-win-dbg.exe
- rm -rf y.tab.c lex.yy.c y.tab.h y.output
+ rm -f y.tab.c lex.yy.c y.tab.h y.output
rm -rf config opt dbg share/txr/stdlib/*.tlo* run.sh
rm -f config.* reconfigure
rm -rf mpi-1.?.?