summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkim Demaille <akim@lrde.epita.fr>2013-11-05 14:32:20 +0100
committerAkim Demaille <akim@lrde.epita.fr>2013-11-05 14:32:20 +0100
commitafc4457605a784879fa57435bf45521ad7513771 (patch)
tree6ad066d252704a406bfb6996ea92d615298955fd
parent60dcc936ceceff90ba1161208067105d3f743bb5 (diff)
downloadbison-afc4457605a784879fa57435bf45521ad7513771.tar.gz
build: use Automake 1.14's non-recursive Makefile features
* 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%.
-rw-r--r--configure.ac8
-rw-r--r--examples/calc++/local.mk48
-rw-r--r--examples/local.mk22
-rw-r--r--examples/mfcalc/local.mk20
-rw-r--r--examples/rpcalc/local.mk19
-rw-r--r--tests/local.mk2
6 files changed, 54 insertions, 65 deletions
diff --git a/configure.ac b/configure.ac
index 688803af..f3dcdfd8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -33,11 +33,7 @@ AC_DEFINE_UNQUOTED([PACKAGE_COPYRIGHT_YEAR], [$PACKAGE_COPYRIGHT_YEAR],
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
@@ -45,7 +41,7 @@ AC_CONFIG_MACRO_DIR([m4])
# 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]), [[-_]],
diff --git a/examples/calc++/local.mk b/examples/calc++/local.mk
index 493b8c78..d920e634 100644
--- a/examples/calc++/local.mk
+++ b/examples/calc++/local.mk
@@ -19,7 +19,7 @@
# 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 $@
@@ -27,14 +27,14 @@ SUFFIXES += .yy .stamp
$(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
## -------------------- ##
@@ -42,35 +42,35 @@ CLEANFILES += \
## -------------------- ##
# 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
diff --git a/examples/local.mk b/examples/local.mk
index c79c8004..9f7863c1 100644
--- a/examples/local.mk
+++ b/examples/local.mk
@@ -13,8 +13,8 @@
# 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)
@@ -24,20 +24,20 @@ AM_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
diff --git a/examples/mfcalc/local.mk b/examples/mfcalc/local.mk
index 10d66966..97ea63b3 100644
--- a/examples/mfcalc/local.mk
+++ b/examples/mfcalc/local.mk
@@ -18,19 +18,15 @@
## -------------------- ##
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
diff --git a/examples/rpcalc/local.mk b/examples/rpcalc/local.mk
index 3ff2f98c..97f35356 100644
--- a/examples/rpcalc/local.mk
+++ b/examples/rpcalc/local.mk
@@ -18,18 +18,15 @@
## -------------------- ##
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
diff --git a/tests/local.mk b/tests/local.mk
index fbf08ba2..394a92e5 100644
--- a/tests/local.mk
+++ b/tests/local.mk
@@ -85,7 +85,7 @@ $(TESTSUITE): $(TESTSUITE_AT)
# 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: