From: Stefano Lattarini Date: Wed, 14 Mar 2012 21:29:59 +0000 (+0100) Subject: Merge branch 'maint' X-Git-Tag: v1.11b~38 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6a6bc51eebe4c702b1ae26acca79c3b865fd8981;p=thirdparty%2Fautomake.git Merge branch 'maint' * maint: tests: avoid spurious failures in get-sysconf.test scripts: bump the depcomp scriptversion sync: some auxiliary files synced from upstream coverage: an empty foo_PRIMARY should create directory $(foodir) coverage: make sure am__py_compile is defined when needed coverage: expose automake bug#10997 coverage: expose automake bug#10975 getopt: relax version requirement for perl + Extra non-trivial edits: * tests/dist-pr109765.test: Use 'configure.ac', not 'configure.in'. * tests/instdir-cond.test: Likewise. * tests/instdir-empty.test: Likewise. Signed-off-by: Stefano Lattarini --- 6a6bc51eebe4c702b1ae26acca79c3b865fd8981 diff --cc lib/depcomp index 793b90237,325713f0c..81e64f6bf --- a/lib/depcomp +++ b/lib/depcomp @@@ -1,9 -1,10 +1,9 @@@ #! /bin/sh # depcomp - compile a program generating dependencies as side-effects - scriptversion=2012-02-03.15; # UTC + scriptversion=2012-03-12.15; # UTC -# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009, 2010, -# 2011, 2012 Free Software Foundation, Inc. +# Copyright (C) 1999-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 diff --cc tests/Makefile.am index c14a3909e,9cac904a1..1126204eb --- a/tests/Makefile.am +++ b/tests/Makefile.am @@@ -15,33 -17,17 +15,35 @@@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +# Run the tests with the shell detected at configure time. +LOG_COMPILER = $(SHELL) + +TEST_EXTENSIONS = .pl .test .tap +TEST_LOG_COMPILER = $(LOG_COMPILER) +TAP_LOG_COMPILER = $(LOG_COMPILER) +PL_LOG_COMPILER = $(PERL) +AM_PL_LOG_FLAGS = -Mstrict -I $(top_builddir)/lib -I $(top_srcdir)/lib -w + +TAP_LOG_DRIVER = AM_TAP_AWK='$(AWK)' $(SHELL) $(top_srcdir)/lib/tap-driver.sh + +AM_TAP_LOG_DRIVER_FLAGS = --merge + +EXTRA_DIST = ax/is ChangeLog-old + +TESTS = ## Will be updated later. + XFAIL_TESTS = \ all.test \ -auxdir2.test \ +yacc-bison-skeleton-cxx.test \ +yacc-bison-skeleton.test \ cond17.test \ -dist-auxfile.test \ -dist-auxfile-2.test \ -dist-pr109765.test \ gcj6.test \ +override-conditional-2.test \ ++dist-pr109765.test \ + instdir-cond.test \ java-nobase.test \ objext-pr10128.test \ +parallel-tests-many.test \ pr8365-remake-timing.test \ lex-subobj-nodep.test \ remake-am-pr10111.test \ diff --cc tests/dist-pr109765.test index 000000000,d656d56f9..f1f97befa mode 000000,100755..100755 --- a/tests/dist-pr109765.test +++ b/tests/dist-pr109765.test @@@ -1,0 -1,44 +1,44 @@@ + #! /bin/sh + # Copyright (C) 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 . + + # Expose automake bug#10975: when several "dist-*" targets are invoked + # on the make command line, the first one ends up removing the distdir, + # so that the latter ones fail. + + required=bzip2 + . ./defs || Exit 1 + + set -e + -echo AC_OUTPUT >> configure.in ++echo AC_OUTPUT >> configure.ac + : > Makefile.am + + $ACLOCAL || fatal_ "aclocal failed" + $AUTOCONF || fatal_ "autoconf failed" + $AUTOMAKE || fatal_ "automake failed" + + ./configure + $MAKE dist-gzip dist-bzip2 + + gzip -dc $distdir.tar.gz | tar tf - > one || { cat one; Exit 1; } + cat one + bzip2 -dc $distdir.tar.gz | tar tf - > two || { cat two; Exit 1; } + cat two + + $FGREP "$distdir/Makefile.am" one + diff one two + + : diff --cc tests/get-sysconf.test index 5b3c9e2cb,cbcf07698..ae3310e5d --- a/tests/get-sysconf.test +++ b/tests/get-sysconf.test @@@ -35,15 -41,17 +34,21 @@@ elif test -f "$top_testsrcdir"/ChangeLo /^[^\t]/ { exit(0); } { print } ' "$top_testsrcdir"/ChangeLog || st=1 + else + # Some non-common but possibly valid setup (see for example the Homebrew + # problem reported in automake bug#10866); so just give an harmless + # warning instead of failing. + warn_ "no .git directory nor ChangeLog file found, some info won't" \ + "be available" fi $PERL -V || st=1 +# It's OK for the user not to have the TAP::Parser module; this can +# happen with older perl installation, or on MinGW/MSYS. +$PERL -e 'use TAP::Parser; print $TAP::Parser::VERSION, "\n"' || : + cat "$top_testbuilddir/config.log" || st=1 -cat "$testbuilddir/aclocal-$APIVERSION" || st=1 -cat "$testbuilddir/automake-$APIVERSION" || st=1 +cat "$testbuilddir/wrap/aclocal-$APIVERSION" || st=1 +cat "$testbuilddir/wrap/automake-$APIVERSION" || st=1 if test $st -eq 0; then # This test SKIPs, so that all the information it has gathered and diff --cc tests/instdir-cond.test index 000000000,8d83f8826..1cbd5bbf5 mode 000000,100644..100644 --- a/tests/instdir-cond.test +++ b/tests/instdir-cond.test @@@ -1,0 -1,49 +1,49 @@@ + #! /bin/sh + # Copyright (C) 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 . + + # Check against automake bug#10997: directories holding only + # conditionally-installed files should not be created unconditionally. + + . ./defs || Exit 1 + + set -e + -cat >> configure.in << 'END' ++cat >> configure.ac << 'END' + AM_CONDITIONAL([ENABLE_FOO], [false]) + AC_OUTPUT + END + + : > foo + : > bar + + cat > Makefile.am << 'END' + if ENABLE_FOO + pkgdata_DATA = foo + pkglibexec_SCRIPTS = bar + endif + END + + $ACLOCAL + $AUTOMAKE + $AUTOCONF + + ./configure --prefix="`pwd`/inst" + + $MAKE install + test ! -d inst/share/instdir-cond + test ! -d inst/libexec/instdir-cond + + : diff --cc tests/instdir-empty.test index 000000000,f69958349..b6eab65d3 mode 000000,100644..100644 --- a/tests/instdir-empty.test +++ b/tests/instdir-empty.test @@@ -1,0 -1,58 +1,58 @@@ + #! /bin/sh + # Copyright (C) 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 . + + # An empty "foo_PRIMARY" declaration should cause "make install" to create + # directory $(foodir). Suggested in discussion on automake bug#10997. + + . ./defs || Exit 1 + + set -e + -echo AC_OUTPUT >> configure.in ++echo AC_OUTPUT >> configure.ac + + cat > Makefile.am << 'END' + pkgdata_DATA = + libexec_SCRIPTS = + END + + $ACLOCAL + $AUTOMAKE + $AUTOCONF + + cwd=`pwd` + ./configure --prefix="$cwd/inst" + + $MAKE install + test -d inst/share/$me + test -d inst/libexec + rm -rf inst + + $MAKE install-exec + test ! -d inst/share + test -d inst/libexec + rm -rf inst + + $MAKE install-data + test -d inst/share/$me + test ! -d inst/libexec + rm -rf inst + + ./configure --prefix=/foo + $MAKE install DESTDIR=$cwd/dest + test -d dest/foo/share/$me + test -d dest/foo/libexec + + : diff --cc tests/list-of-tests.mk index b36d76cfe,0ee07117f..7665db137 --- a/tests/list-of-tests.mk +++ b/tests/list-of-tests.mk @@@ -345,8 -332,7 +345,9 @@@ dist-included-parent-dir.test dist-missing-am.test \ dist-missing-included-m4.test \ dist-missing-m4.test \ +dist-readonly.test \ +dist-repeated.test \ + dist-pr109765.test \ distcleancheck.test \ distcom2.test \ distcom3.test \ diff --cc tests/python.test index 8a39f9f9c,e7a69847d..2200d639f --- a/tests/python.test +++ b/tests/python.test @@@ -24,13 -26,26 +24,30 @@@ cat > Makefile.am << 'END python_PYTHON = foo.py END + cat > Makefile2.am << 'END' + python_PYTHON = a.py + nodist_python_PYTHON = b.py + nobase_python_PYTHON = x/c.py + mydir = ${prefix} + my_PYTHON = d.py + END + $ACLOCAL -$AUTOMAKE -a +AUTOMAKE_fails +grep '^Makefile\.am:1:.* required file.*py-compile' stderr + +$AUTOMAKE -a +grep '^py_compile *=' Makefile.in test -f py-compile + $AUTOMAKE Makefile2 + + grep "py" Makefile.in Makefile2.in # For debugging. + + for f in Makefile.in Makefile2.in; do + test `grep -c '^py_compile =' $f` -eq 1 + test `grep -c '^am__py_compile =' $f` -eq 1 + done + :