diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2015-08-14 06:27:33 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2015-08-14 06:27:33 -0700 |
commit | fdb54c85577859e26525463c2e21801cd9b2377c (patch) | |
tree | 9f219b7f56e613f48d56f3c45f28a23584fb1d60 /Makefile | |
parent | 9952353de4a6bdfd27727a00d53ae8958038c72d (diff) | |
download | txr-fdb54c85577859e26525463c2e21801cd9b2377c.tar.gz txr-fdb54c85577859e26525463c2e21801cd9b2377c.tar.bz2 txr-fdb54c85577859e26525463c2e21801cd9b2377c.zip |
Remove unwanted yyparse declaration from y.tab.h.
* Makefile (y.tab.c): Putting in an ugly workaround for an obnoxious
new behavior introduced in Bison 3.x, which breaks our build on
platforms that have a newer Bison. After generating y.tab.h, we remove
the unwanted declaration with sed.
* parser.y (yyparse): Declare, since y.tab.h doesn't any more,
and the newer Bison's parse skeletons expect it.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -203,7 +203,14 @@ y.tab.h: y.tab.c y.tab.c: $(top_srcdir)parser.y $(call ABBREV,YACC) $(V)rm -f y.tab.c - $(V)if $(YACC) -v -d $< ; then chmod a-w y.tab.c ; true ; else rm y.tab.c ; false ; fi + $(V)if $(YACC) -v -d $< ; then \ + 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 ; \ + else \ + rm y.tab.c ; \ + false ; \ + fi # Suppress useless sccs id array and unused label warning in byacc otuput. # Bison-generated parser also tests for this lint define. |