mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-22 18:53:04 +00:00
calc++: rely on Automake.
Rely on $(YACC) being the bison being built, and let Automake do the rest. It turned out to be much more difficult than anticipated, for various reasons, including some bad behavior from Automake 1.11.2 which (i) generates calc++-parser.h instead of calc++-parser.hh, and (ii) leaves an #include "y.tab.h" in the generated parser instead of #include "calc++-parser.h". The authors of Automake appear to be aware of the problem, http://lists.gnu.org/archive/html/automake/2011-05/msg00008.html so a simple work around will suffice for the time being. * examples/calc++/y.tab.h, examples/calc++/calc++-parser.hh: New. To work around Automake 1.11.2 issues. * examples/calc++/local.mk: Remove all the rules for compilation with bison, leave them to Automake. So provide it with "calc++-parse.yy" as a source file. (calc_sources_generated, calc_sources_extracted): Rename as. (calc_generated, calc_extracted): these. (calc_sources): New. Fix them.
This commit is contained in:
6
examples/calc++/y.tab.h
Normal file
6
examples/calc++/y.tab.h
Normal file
@@ -0,0 +1,6 @@
|
||||
// Work around an Automake 1.11.2 bug: it asks for the creation of
|
||||
// y.tab.c and y.tab.h and then renames them as calc++-parser.cc and
|
||||
// calc++-parser.h, but in the former it does not convert the
|
||||
// #include "y.tab.h". We don't want this to show in the
|
||||
// documentation.
|
||||
#include "calc++-parser.hh"
|
||||
Reference in New Issue
Block a user