From: Ralf Wildenhues Date: Sat, 14 Nov 2009 20:57:11 +0000 (+0100) Subject: Coverage: warn about configure substitution in EXTRA_PRIMARY. X-Git-Tag: ng-0.5a~458^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b0b4caccba63b9b7b5d5516f2b23e66ac5215847;p=thirdparty%2Fautomake.git Coverage: warn about configure substitution in EXTRA_PRIMARY. * tests/subst5.test: New test. * tests/Makefile.am: Update. Signed-off-by: Ralf Wildenhues --- diff --git a/ChangeLog b/ChangeLog index adab68a84..bdd7ba092 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2009-11-14 Ralf Wildenhues + Coverage: warn about configure substitution in EXTRA_PRIMARY. + * tests/subst5.test: New test. + * tests/Makefile.am: Update. + Coverage for syntax errors with conditionals in included fragments. * tests/condinc2.test: Amend test. diff --git a/tests/Makefile.am b/tests/Makefile.am index fe16314a2..2d012934d 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -642,6 +642,7 @@ subst.test \ subst2.test \ subst3.test \ subst4.test \ +subst5.test \ substref.test \ substre2.test \ substtarg.test \ diff --git a/tests/Makefile.in b/tests/Makefile.in index be3f2a703..f827a46ea 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -876,6 +876,7 @@ subst.test \ subst2.test \ subst3.test \ subst4.test \ +subst5.test \ substref.test \ substre2.test \ substtarg.test \ diff --git a/tests/subst5.test b/tests/subst5.test new file mode 100755 index 000000000..7ffa1adeb --- /dev/null +++ b/tests/subst5.test @@ -0,0 +1,42 @@ +#! /bin/sh +# Copyright (C) 2009 Free Software Foundation, Inc. +# +# This program 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. +# +# This program 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 this program. If not, see . + +# Complain about configure substitutions in EXTRA_PRIMARY variables. +# Rationale: we need to know the literal values of, say, PROGRAMS. +# Thus, we allow substitutions in bin_PROGRAMS, but then EXTRA_PROGRAMS +# needs to list possible values of that substitution, literally. + +. ./defs || Exit 1 + +set -e + +cat >>configure.in <<'END' +AC_PROG_CC +AC_SUBST([substed1]) +AC_SUBST([substed2]) +END + +cat > Makefile.am <<'END' +bin_PROGRAMS = @substed1@ +EXTRA_PROGRAMS = @substed2@ +END + +$ACLOCAL +AUTOMAKE_fails +grep 'bin_PROGRAMS.*contains configure substitution' stderr && Exit 1 +grep 'EXTRA_PROGRAMS.*contains configure substitution' stderr + +Exit 0