]> git.saurik.com Git - bison.git/commit
calc++: rely on Automake.
authorAkim Demaille <demaille@gostai.com>
Tue, 14 Feb 2012 16:32:51 +0000 (17:32 +0100)
committerAkim Demaille <demaille@gostai.com>
Wed, 15 Feb 2012 10:31:49 +0000 (11:31 +0100)
commit609b3d8096fb0cc1fa4d908b6e1a860ced260bda
tree5ef746316f5e653e16c6f227b1c030713f19fadd
parent7726724a70998575780ca4c80b36798b80b7cbe2
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.
examples/calc++/.gitignore
examples/calc++/calc++-parser.hh [new file with mode: 0644]
examples/calc++/local.mk
examples/calc++/y.tab.h [new file with mode: 0644]