From ef7869eb56c9ab716dd55788d0efb32a621f32d0 Mon Sep 17 00:00:00 2001 From: Ralf Wildenhues Date: Sat, 14 Nov 2009 21:57:37 +0100 Subject: [PATCH] Coverage: warn about substitutions that need EXTRA_PRIMARY. * tests/extra9.test: New test. * tests/Makefile.am: Adjust. Signed-off-by: Ralf Wildenhues --- ChangeLog | 4 ++++ tests/Makefile.am | 1 + tests/Makefile.in | 1 + tests/extra9.test | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 52 insertions(+) create mode 100755 tests/extra9.test diff --git a/ChangeLog b/ChangeLog index bdd7ba092..9370392b0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2009-11-14 Ralf Wildenhues + Coverage: warn about substitutions that need EXTRA_PRIMARY. + * tests/extra9.test: New test. + * tests/Makefile.am: Adjust. + Coverage: warn about configure substitution in EXTRA_PRIMARY. * tests/subst5.test: New test. * tests/Makefile.am: Update. diff --git a/tests/Makefile.am b/tests/Makefile.am index 2d012934d..03b04facc 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -289,6 +289,7 @@ extra5.test \ extra6.test \ extra7.test \ extra8.test \ +extra9.test \ f90only.test \ flavor.test \ flibs.test \ diff --git a/tests/Makefile.in b/tests/Makefile.in index f827a46ea..e4525e9f7 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -523,6 +523,7 @@ extra5.test \ extra6.test \ extra7.test \ extra8.test \ +extra9.test \ f90only.test \ flavor.test \ flibs.test \ diff --git a/tests/extra9.test b/tests/extra9.test new file mode 100755 index 000000000..fefd385a8 --- /dev/null +++ b/tests/extra9.test @@ -0,0 +1,46 @@ +#!/bin/sh +# Copyright (C) 2009 Free Software Foundation, Inc. +# +# This file is part of GNU Automake. +# +# GNU Automake is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# GNU Automake is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Automake; see the file COPYING. If not, write to +# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +# Boston, MA 02110-1301, USA. + +# Ensure we warn about substitutions in bin_PROGRAMS if EXTRA_PROGRAMS +# are missing; but only if the former is not AC_SUBSTed itself +# (lib_LIBRARIES is in the same boat here). + +. ./defs || Exit 1 + +set -e + +cat >>configure.in <<'END' +AC_PROG_CC +AC_PROG_RANLIB +AC_SUBST([lib_LIBRARIES]) +AC_SUBST([bins]) +AC_OUTPUT +END + +cat >Makefile.am <<'END' +bin_PROGRAMS = @bins@ +END + +$ACLOCAL +AUTOMAKE_fails +grep 'bin_PROGRAMS.*contains configure substitution' stderr +grep 'lib_LIBRARIES.*contains configure substitution' stderr && Exit 1 + +Exit 0 -- 2.47.2