* t/subdir3.sh: Rename ... * t/sourcefile-in-subdir.sh: ... like this. * t/subdir4.sh: Rename ... * t/depcomp-implicit-auxdir.sh: ... like this. * t/subdir6.sh: Rename ... * t/confh-subdir-clean.sh: ... like this. * t/subdir7.sh: Renamed ... * t/dir-named-obj-is-bad.sh: ... like this, and enhance. * t/srcsub.sh, t/srcsub2.sh: Unify ... * t/src-acsubst.sh: ... as this test. * t/list-of-tests.mk: Adjust.
Signed-off-by: Stefano Lattarini <stefano.lattar...@gmail.com> --- t/{subdir6.sh => confh-subdir-clean.sh} | 0 t/{subdir4.sh => depcomp-implicit-auxdir.sh} | 0 t/{subdir7.sh => dir-named-obj-is-bad.sh} | 22 +++++++++++++--- t/list-of-tests.mk | 11 ++++---- t/{subdir3.sh => sourcefile-in-subdir.sh} | 0 t/{srcsub.sh => src-acsubst.sh} | 25 +++++++++++++----- t/srcsub2.sh | 36 -------------------------- 7 files changed, 42 insertions(+), 52 deletions(-) rename t/{subdir6.sh => confh-subdir-clean.sh} (100%) rename t/{subdir4.sh => depcomp-implicit-auxdir.sh} (100%) rename t/{subdir7.sh => dir-named-obj-is-bad.sh} (71%) rename t/{subdir3.sh => sourcefile-in-subdir.sh} (100%) rename t/{srcsub.sh => src-acsubst.sh} (58%) delete mode 100755 t/srcsub2.sh diff --git a/t/subdir6.sh b/t/confh-subdir-clean.sh similarity index 100% rename from t/subdir6.sh rename to t/confh-subdir-clean.sh diff --git a/t/subdir4.sh b/t/depcomp-implicit-auxdir.sh similarity index 100% rename from t/subdir4.sh rename to t/depcomp-implicit-auxdir.sh diff --git a/t/subdir7.sh b/t/dir-named-obj-is-bad.sh similarity index 71% rename from t/subdir7.sh rename to t/dir-named-obj-is-bad.sh index a2c47a1..e422f19 100755 --- a/t/subdir7.sh +++ b/t/dir-named-obj-is-bad.sh @@ -26,12 +26,12 @@ AC_OUTPUT END : > obj/Makefile.am -echo 'SUBDIRS = obj' >Makefile.am +echo 'SUBDIRS = obj' > Makefile.am $ACLOCAL AUTOMAKE_fails -grep 'Makefile.am:1:.*obj.*BSD' stderr +grep "^Makefile\.am:1:.*'obj'.*BSD make" stderr cat >Makefile.am <<'END' SUBDIRS = @STH@ @@ -40,6 +40,22 @@ DIST_SUBDIRS = $(FOO) END AUTOMAKE_fails -grep 'Makefile.am:2:.*obj.*BSD' stderr +grep "^Makefile\\.am:2:.*'obj'.*BSD make" stderr + +rm -rf autom4te*.cache + +cat >configure.ac << 'END' +AC_INIT([x], [1.0]) +AC_CONFIG_AUX_DIR([obj]) +AM_INIT_AUTOMAKE +AC_CONFIG_FILES([Makefile]) +END + +rm -f obj/Makefile.am +: > Makefile.am + +$ACLOCAL +AUTOMAKE_fails -a +grep "^configure\.ac:2:.*'obj'.*BSD make" stderr : diff --git a/t/list-of-tests.mk b/t/list-of-tests.mk index 4e07a19..c73afda 100644 --- a/t/list-of-tests.mk +++ b/t/list-of-tests.mk @@ -316,6 +316,7 @@ t/confh5.sh \ t/confh6.sh \ t/confh7.sh \ t/confh8.sh \ +t/confh-subdir-clean.sh \ t/confincl.sh \ t/conflnk.sh \ t/conflnk2.sh \ @@ -368,6 +369,7 @@ t/depcomp.sh \ t/depcomp2.sh \ t/depcomp8a.sh \ t/depcomp8b.sh \ +t/depcomp-implicit-auxdir.sh \ t/depdist.sh \ t/depend.sh \ t/depend3.sh \ @@ -376,6 +378,7 @@ t/depend5.sh \ t/depend6.sh \ t/deprecated-acinit.sh \ t/destdir.sh \ +t/dir-named-obj-is-bad.sh \ t/dirlist.sh \ t/dirlist2.sh \ t/dirlist-abspath.sh \ @@ -989,8 +992,8 @@ t/silent-nested-vars.sh \ t/silent-lex.sh \ t/silent-yacc.sh \ t/silent-yacc-headers.sh \ -t/srcsub.sh \ -t/srcsub2.sh \ +t/src-acsubst.sh \ +t/sourcefile-in-subdir.sh \ t/space.sh \ t/specflg.sh \ t/specflg2.sh \ @@ -1026,10 +1029,6 @@ t/subdir-cond-gettext.sh \ t/subdir-order.sh \ t/subdir-with-slash.sh \ t/subdir-subsub.sh \ -t/subdir3.sh \ -t/subdir4.sh \ -t/subdir6.sh \ -t/subdir7.sh \ t/subdir10.sh \ t/subdir-distclean.sh \ t/subdirbuiltsources.sh \ diff --git a/t/subdir3.sh b/t/sourcefile-in-subdir.sh similarity index 100% rename from t/subdir3.sh rename to t/sourcefile-in-subdir.sh diff --git a/t/srcsub.sh b/t/src-acsubst.sh similarity index 58% rename from t/srcsub.sh rename to t/src-acsubst.sh index 978a105..97d536c 100755 --- a/t/srcsub.sh +++ b/t/src-acsubst.sh @@ -14,20 +14,31 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -# Test to make sure config sub in _SOURCES fails. +# Test to make sure config substitution in _SOURCES fails. . ./defs || Exit 1 -cat >> configure.ac << 'END' -AC_PROG_CC -END +echo AC_PROG_CC >> configure.ac cat > Makefile.am << 'END' -bin_PROGRAMS = x +bin_PROGRAMS = x y x_SOURCES = x.c @FOO@ -EXTRA_x_SOURCES = y.c +bar = @FOO@ +foo = $(bar) +EXTRA_y_SOURCES = $(foo) y.c END $ACLOCAL AUTOMAKE_fails -grep 'Makefile.am:2:.*x_SOURCES.*substitution' stderr + +cat > exp-err << 'END' +Makefile.am:2: error: 'x_SOURCES' includes configure substitution '@FOO@'; +Makefile.am:2: configure substitutions are not allowed in _SOURCES variables +Makefile.am:3: error: 'bar' includes configure substitution '@FOO@' +Makefile.am:3: and is referred to from 'EXTRA_y_SOURCES'; +Makefile.am:3: configure substitutions are not allowed in _SOURCES variables +END + +diff exp-err stderr + +: diff --git a/t/srcsub2.sh b/t/srcsub2.sh deleted file mode 100755 index 2d6da97..0000000 --- a/t/srcsub2.sh +++ /dev/null @@ -1,36 +0,0 @@ -#! /bin/sh -# Copyright (C) 2001-2012 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 2, 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 <http://www.gnu.org/licenses/>. - -# Test to make sure config sub in _SOURCES fails. - -. ./defs || Exit 1 - -cat >> configure.ac << 'END' -AC_PROG_CC -END - -cat > Makefile.am << 'END' -bin_PROGRAMS = x -bar = @FOO@ -foo = $(bar) -x_SOURCES = x.c $(foo) -EXTRA_x_SOURCES = y.c -END - -$ACLOCAL -AUTOMAKE_fails -grep 'Makefile.am:2:.*bar.*substitution' stderr -grep 'Makefile.am:2:.*x_SOURCES' stderr -- 1.7.9.5