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:
Akim Demaille
2012-02-14 17:32:51 +01:00
parent 7726724a70
commit 609b3d8096
4 changed files with 41 additions and 46 deletions

View File

@@ -1,11 +1,18 @@
/*.cc
/*.hh
/*.ll
/*.o
/*.output
/*.stamp
/*.tmp
/*.yy
/.deps
/calc++
/calc++-driver.cc
/calc++-driver.hh
/calc++-parser.output
/calc++-parser.yy
/calc++-parser.cc
/calc++-parser.h
/calc++-scanner.cc
/calc++-scanner.ll
/calc++.cc
/calc++.exe
/calc.stamp
/location.hh
/position.hh
/stack.hh