diff options
author | Akim Demaille <demaille@gostai.com> | 2012-02-24 12:10:07 +0100 |
---|---|---|
committer | Akim Demaille <demaille@gostai.com> | 2012-02-24 13:32:17 +0100 |
commit | 59fba180a5b8c7135445bfbada5e96266a3286e8 (patch) | |
tree | 807c172621f42ec6b63f7962f0524d3b5dff900e /examples/calc++/local.mk | |
parent | 2191bb749b8f63b6037ca7e590ae499d0bb26db9 (diff) | |
download | bison-59fba180a5b8c7135445bfbada5e96266a3286e8.tar.gz |
build: fix more example extraction issues.
* Makefile.am (dist_TESTS): New.
(TESTS, EXTRA_DIST): Run and ship them.
* examples/calc++/local.mk: examples/calc++/calc++.stamp no longer
exists, don't try to ship it.
(.yy.stamp): New recipe.
Use it.
* examples/calc++/local.mk, examples/mfcalc/local.mk,
* examples/rpcalc/local.mk:
Don't ship the sources.
Adjust the CPPFLAGS: there is nothing left in srcdir.
(MAINTAINERCLEANFILES): Remove, now we are in builddir.
(TESTS): Rename as...
(dist_TESTS): this.
Diffstat (limited to 'examples/calc++/local.mk')
-rw-r--r-- | examples/calc++/local.mk | 31 |
1 files changed, 9 insertions, 22 deletions
diff --git a/examples/calc++/local.mk b/examples/calc++/local.mk index 8a039736..884bcc58 100644 --- a/examples/calc++/local.mk +++ b/examples/calc++/local.mk @@ -19,23 +19,16 @@ ## Parser generation. ## ## ------------------- ## -CLEANFILES += $(top_srcdir)/examples/calc++/*.output *.tmp -MAINTAINERCLEANFILES += examples/calc++/*.stamp $(calc_sources) +CLEANFILES += examples/calc++/calc++-parser.output *.tmp -# Compile the parser and save cycles. -# This code comes from "Handling Tools that Produce Many Outputs", -# from the Automake documentation. -EXTRA_DIST += \ - examples/calc++/calc++-parser.stamp \ - examples/calc++/calc++-parser.yy \ - examples/calc++/calc++.stamp # Don't depend on $(BISON) otherwise we would rebuild these files # in srcdir, including during distcheck, which is forbidden. -examples/calc++/calc++-parser.stamp: examples/calc++/calc++-parser.yy $(BISON_IN) +examples/calc++/calc++-parser.stamp: $(BISON_IN) +SUFFIXES += .yy .stamp +.yy.stamp: $(AM_V_YACC)rm -f $@ $(AM_V_at)touch $@.tmp - $(AM_V_at)$(YACCCOMPILE) -o examples/calc++/calc++-parser.cc \ - examples/calc++/calc++-parser.yy + $(AM_V_at)$(YACCCOMPILE) -o $*.cc $< $(AM_V_at)mv -f $@.tmp $@ $(calc_sources_generated): examples/calc++/calc++-parser.stamp @@ -49,8 +42,6 @@ $(calc_sources_generated): examples/calc++/calc++-parser.stamp # Avoid using BUILT_SOURCES which is too global. $(examples_calc___calc___OBJECTS): $(calc_sources_generated) -CLEANFILES += *.tmp -MAINTAINERCLEANFILES += $(calc_sources) calc_sources_extracted = \ examples/calc++/calc++-driver.cc \ @@ -70,16 +61,12 @@ calc_sources_generated = \ calc_sources = \ $(calc_sources_extracted) \ $(calc_sources_generated) + if BISON_CXX_WORKS check_PROGRAMS += examples/calc++/calc++ -examples_calc___calc___SOURCES = \ +nodist_examples_calc___calc___SOURCES = \ $(calc_sources) -examples_calc___calc___CPPFLAGS = \ - -I$(top_builddir)/examples/calc++ \ - -I$(top_srcdir)/examples/calc++ -TESTS += examples/calc++/calc++.test +examples_calc___calc___CPPFLAGS = -I$(top_builddir)/examples/calc++ +dist_TESTS += examples/calc++/calc++.test endif -EXTRA_DIST += \ - examples/calc++/calc++-parser.yy \ - examples/calc++/calc++.test |