* configure.ac: Require Automake 1.14.
* examples/calc++/local.mk, examples/local.mk, examples/mfcalc/local.mk,
* examples/rpcalc/local.mk, tests/local.mk: Use %D% and %C%.
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([m4])
-# Automake 1.10.3 and 1.11.1 fix a security flaw discussed here:
-#
-# http://thread.gmane.org/gmane.comp.sysutils.autotools.announce/131
-#
-# To avoid 1.11, we make 1.11.1 the minimum version.
+# We use Automake 1.14's %D% and %C%.
#
# We want gnits strictness only when rolling a stable release. For
# release candidates, we use version strings like 2.4.3_rc1, but gnits
# releases, we want to be able run make dist without being required to
# add a bogus NEWS entry. In that case, the version string
# automatically contains a dash, which we also let disable gnits.
-AM_INIT_AUTOMAKE([1.11.1 dist-xz nostdinc
+AM_INIT_AUTOMAKE([1.14 dist-xz nostdinc
color-tests parallel-tests
silent-rules]
m4_bmatch(m4_defn([AC_PACKAGE_VERSION]), [[-_]],
# Don't depend on $(BISON) otherwise we would rebuild these files
# in srcdir, including during distcheck, which is forbidden.
-examples/calc++/calc++-parser.stamp: $(BISON_IN)
+%D%/calc++-parser.stamp: $(BISON_IN)
SUFFIXES += .yy .stamp
.yy.stamp:
$(AM_V_YACC)rm -f $@
$(AM_V_at)$(YACCCOMPILE) -o $*.cc $<
$(AM_V_at)mv -f $@.tmp $@
-$(calc_sources_generated): examples/calc++/calc++-parser.stamp
- @test -f $@ || rm -f examples/calc++/calc++-parser.stamp
- @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) examples/calc++/calc++-parser.stamp
+$(calc_sources_generated): %D%/calc++-parser.stamp
+ @test -f $@ || rm -f %D%/calc++-parser.stamp
+ @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) %D%/calc++-parser.stamp
CLEANFILES += \
$(calc_sources_generated) \
- examples/calc++/calc++-parser.output \
- examples/calc++/calc++-parser.stamp \
- examples/calc++/calc++-scanner.cc
+ %D%/calc++-parser.output \
+ %D%/calc++-parser.stamp \
+ %D%/calc++-scanner.cc
## -------------------- ##
## -------------------- ##
# Avoid using BUILT_SOURCES which is too global.
-$(examples_calc___calc___OBJECTS): $(calc_sources_generated)
+$(%C%_calc___OBJECTS): $(calc_sources_generated)
calc_sources_extracted = \
- examples/calc++/calc++-driver.cc \
- examples/calc++/calc++-driver.hh \
- examples/calc++/calc++-scanner.ll \
- examples/calc++/calc++.cc
+ %D%/calc++-driver.cc \
+ %D%/calc++-driver.hh \
+ %D%/calc++-scanner.ll \
+ %D%/calc++.cc
calc_extracted = \
$(calc_sources_extracted) \
- examples/calc++/calc++-parser.yy
+ %D%/calc++-parser.yy
extracted += $(calc_extracted)
calc_sources_generated = \
- examples/calc++/calc++-parser.cc \
- examples/calc++/calc++-parser.hh \
- examples/calc++/location.hh \
- examples/calc++/position.hh \
- examples/calc++/stack.hh
+ %D%/calc++-parser.cc \
+ %D%/calc++-parser.hh \
+ %D%/location.hh \
+ %D%/position.hh \
+ %D%/stack.hh
calc_sources = \
$(calc_sources_extracted) \
$(calc_sources_generated)
if FLEX_CXX_WORKS
-check_PROGRAMS += examples/calc++/calc++
-nodist_examples_calc___calc___SOURCES = \
+check_PROGRAMS += %D%/calc++
+nodist_%C%_calc___SOURCES = \
$(calc_sources)
-examples_calc___calc___CPPFLAGS = -I$(top_builddir)/examples/calc++
-examples_calc___calc___CXXFLAGS = $(AM_CXXFLAGS) $(FLEX_SCANNER_CXXFLAGS)
-dist_TESTS += examples/calc++/calc++.test
+%C%_calc___CPPFLAGS = -I$(top_builddir)/%D%
+%C%_calc___CXXFLAGS = $(AM_CXXFLAGS) $(FLEX_SCANNER_CXXFLAGS)
+dist_TESTS += %D%/calc++.test
else
-EXTRA_DIST += examples/calc++/calc++.test
+EXTRA_DIST += %D%/calc++.test
endif
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-dist_noinst_SCRIPTS = examples/extexi examples/test
-TEST_LOG_COMPILER = $(top_srcdir)/examples/test
+dist_noinst_SCRIPTS = %D%/extexi %D%/test
+TEST_LOG_COMPILER = $(top_srcdir)/%D%/test
AM_CXXFLAGS = \
$(WARN_CXXFLAGS) $(WARN_CXXFLAGS_TEST) $(WERROR_CXXFLAGS)
## ------------ ##
doc = $(top_srcdir)/doc/bison.texi
-extexi = $(top_srcdir)/examples/extexi
+extexi = $(top_srcdir)/%D%/extexi
extract = VERSION="$(VERSION)" $(PERL) $(extexi) $(doc) --
extracted =
-CLEANFILES += $(extracted) examples/extracted.stamp
-examples/extracted.stamp: $(doc) $(extexi)
+CLEANFILES += $(extracted) %D%/extracted.stamp
+%D%/extracted.stamp: $(doc) $(extexi)
$(AM_V_GEN)rm -f $@ $@.tmp
$(AM_V_at)touch $@.tmp
$(AM_V_at)$(extract) $(extracted)
$(AM_V_at)mv $@.tmp $@
-$(extracted): examples/extracted.stamp
- @test -f $@ || rm -f examples/extracted.stamp
- @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) examples/extracted.stamp
+$(extracted): %D%/extracted.stamp
+ @test -f $@ || rm -f %D%/extracted.stamp
+ @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) %D%/extracted.stamp
-include examples/calc++/local.mk
-include examples/mfcalc/local.mk
-include examples/rpcalc/local.mk
+include %D%/calc++/local.mk
+include %D%/mfcalc/local.mk
+include %D%/rpcalc/local.mk
## -------------------- ##
BUILT_SOURCES += $(mfcalc_sources)
-CLEANFILES += examples/mfcalc/mfcalc.[ch] examples/mfcalc/mfcalc.output
+CLEANFILES += %D%/mfcalc.[ch] %D%/mfcalc.output
-mfcalc_extracted = \
- examples/mfcalc/calc.h \
- examples/mfcalc/mfcalc.y
-mfcalc_sources = \
- $(mfcalc_extracted)
+mfcalc_extracted = %D%/calc.h %D%/mfcalc.y
+mfcalc_sources = $(mfcalc_extracted)
extracted += $(mfcalc_extracted)
-check_PROGRAMS += examples/mfcalc/mfcalc
-examples_mfcalc_mfcalc_LDADD = -lm
-nodist_examples_mfcalc_mfcalc_SOURCES = \
- $(mfcalc_sources)
+check_PROGRAMS += %D%/mfcalc
+%C%_mfcalc_LDADD = -lm
+nodist_%C%_mfcalc_SOURCES = $(mfcalc_sources)
-examples_mfcalc_mfcalc_CPPFLAGS = -I$(top_builddir)/examples/mfcalc
-dist_TESTS += examples/mfcalc/mfcalc.test
+%C%_mfcalc_CPPFLAGS = -I$(top_builddir)/%D%
+dist_TESTS += %D%/mfcalc.test
## -------------------- ##
BUILT_SOURCES += $(rpcalc_sources)
-CLEANFILES += examples/rpcalc/rpcalc.[ch] examples/rpcalc/rpcalc.output
+CLEANFILES += %D%/rpcalc.[ch] %D%/rpcalc.output
-rpcalc_extracted = \
- examples/rpcalc/rpcalc.y
-rpcalc_sources = \
- $(rpcalc_extracted)
+rpcalc_extracted = %D%/rpcalc.y
+rpcalc_sources = $(rpcalc_extracted)
extracted += $(rpcalc_extracted)
-check_PROGRAMS += examples/rpcalc/rpcalc
-examples_rpcalc_rpcalc_LDADD = -lm
-nodist_examples_rpcalc_rpcalc_SOURCES = \
- $(rpcalc_sources)
+check_PROGRAMS += %D%/rpcalc
+%C%_rpcalc_LDADD = -lm
+nodist_%C%_rpcalc_SOURCES = $(rpcalc_sources)
-examples_rpcalc_rpcalc_CPPFLAGS = -I$(top_builddir)/examples/rpcalc
-dist_TESTS += examples/rpcalc/rpcalc.test
+%C%_rpcalc_CPPFLAGS = -I$(top_builddir)/%D%
+dist_TESTS += %D%/rpcalc.test
# Move into tests/ so that testsuite.dir etc. be created there.
RUN_TESTSUITE = $(TESTSUITE) -C tests $(TESTSUITEFLAGS)
check_SCRIPTS = $(BISON) tests/atconfig tests/atlocal
-RUN_TESTSUITE_deps = $(TESTSUITE) $(check_SCRIPTS)
+RUN_TESTSUITE_deps = all $(TESTSUITE) $(check_SCRIPTS)
clean-local: clean-local-tests
clean-local-tests: