]> git.saurik.com Git - bison.git/commit - examples/local.mk
maint: de-recurse the handling of examples
authorAkim Demaille <demaille@gostai.com>
Mon, 13 Feb 2012 17:23:45 +0000 (18:23 +0100)
committerAkim Demaille <demaille@gostai.com>
Tue, 14 Feb 2012 20:00:59 +0000 (21:00 +0100)
commit360ae94ebc3f25f93c44ed6e6f65730afa56ff63
tree8f750f3e58e2c2db67071033e35df24f44545da8
parent72c12bfa1b675dff82689ace48d09f57b317db74
maint: de-recurse the handling of examples

The directory was still using a local Makefile.am because it provides
"scoped" Make variables: these examples are not meant to use the same
CPPFLAGS etc.  If we were to use the same -I set, we'd pick up
gnulib's stdio.h for instance, which we do not want for these simple
examples.

Yet, as a result, the dependencies are less accurate, there is code
duplication, etc.  This is especially perceptible when trying to
extract more examples from the documentation, as will be done in
forthcoming changes.

In order to make the tuning of CPPFLAGS easier, discard the predefined
-I from Automake.

* examples/calc++/Makefile.am: Rename as...
* examples/calc++/local.mk: this.
Adjust the paths which are now rooted in top_srcdir/top_builddir.
Handle BISON_CXX_WORKS here, instead of the too crude previous
approach that completely discarded the whole directory.
($(BISON)): Remove now useless bouncing recipe.
(calc___CPPFLAGS): New.
Stay away from -Ilib.
* Makefile.am, configure.ac, examples/local.mk,
* examples/calc++/test: Adjust.

* configure.ac: Pass nostdinc to Automake.
* src/local.mk, lib/local.mk (AM_CPPFLAGS): Move to...
* Makefile.am: here.

* src/local.mk, examples/calc++/Makefile.am (BISON, BISON_IN): Factor
to...
* Makefile.am: here.
* tests/local.mk: Use it.
Makefile.am
configure.ac
examples/calc++/.gitignore
examples/calc++/Makefile.am [deleted file]
examples/calc++/local.mk [new file with mode: 0644]
examples/calc++/test
examples/local.mk
src/local.mk
tests/local.mk