Merge branch 'maint'
authorStefano Lattarini <stefano.lattarini@gmail.com>
Wed, 14 Mar 2012 21:29:59 +0000 (22:29 +0100)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Wed, 14 Mar 2012 21:35:29 +0000 (22:35 +0100)
* 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 <stefano.lattarini@gmail.com>
1  2 
lib/depcomp
tests/Makefile.am
tests/dist-pr109765.test
tests/get-sysconf.test
tests/instdir-cond.test
tests/instdir-empty.test
tests/list-of-tests.mk
tests/python.test

diff --combined 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 --combined tests/Makefile.am
@@@ -1,6 -1,8 +1,6 @@@
  ## Process this file with automake to create Makefile.in
  
 -# Copyright (C) 1996, 1997, 1998, 1999, 2001, 2002, 2003, 2004, 2005,
 -# 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation,
 -# Inc.
 +# Copyright (C) 1996-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
  # You should have received a copy of the GNU General Public License
  # along with this program.  If not, see <http://www.gnu.org/licenses/>.
  
 +# 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 \
  remake-m4-pr10111.test \
 -txinfo5.test
 +txinfo5.test \
 +## FIXME: this "expected failures" are in truth an hack used to
 +## FIXME: to verify that some incorrect usages of our perl: libraries
 +## FIXME: raise an error.  We should find a cleaner way to check that.
 +pm/Cond2.pl \
 +pm/Cond3.pl \
 +pm/DisjCon2.pl \
 +pm/DisjCon3.pl \
 +pm/Version2.pl \
 +pm/Version3.pl
 +
 +# Some testsuite-influential variables should be overridable from the
 +# test scripts, but not from the environment.
 +AM_TESTS_ENVIRONMENT = \
 +  for v in \
 +    me \
 +    required \
 +    am_using_tap \
 +    am_parallel_tests \
 +    am_test_prefer_config_shell \
 +    am_original_AUTOMAKE \
 +    am_original_ACLOCAL \
 +  ; do \
 +    eval test x"\$${$$v}" = x || unset $$v; \
 +  done;
 +# The 'AM_TESTS_REEXEC=no' setting tells the tests not to needlessly
 +# re-execute themselves with the shell detected at configure time, since
 +# we are already running them under it explicitly in our setup (see e.g.
 +# the definition of TEST_LOG_COMPILER above).
 +AM_TESTS_ENVIRONMENT += AM_TESTS_REEXEC=no; export AM_TESTS_REEXEC;
 +# We want warning messages and explanations for skipped tests to go to
 +# the console if possible, so set up 'stderr_fileno_' properly.
 +AM_TESTS_FD_REDIRECT = 9>&2
 +AM_TESTS_ENVIRONMENT += stderr_fileno_=9; export stderr_fileno_;
  
 -include $(srcdir)/parallel-tests.am
 +# Hand-written tests.
  
 -$(srcdir)/parallel-tests.am: gen-parallel-tests Makefile.am
 -      $(AM_V_GEN)(cd $(srcdir) && $(SHELL) ./gen-parallel-tests) >$@
 +include $(srcdir)/list-of-tests.mk
  
 -$(parallel_tests): $(parallel_tests:-p.test=.test) Makefile.am
 -      $(AM_V_GEN)input=`echo $@ | sed 's,.*/,,; s,-p.test$$,.test,'` \
 -        && sed 's|^\. \./defs.*|parallel_tests=yes; &|' \
 -             < $(srcdir)/$$input >$@ \
 -        && chmod a+rx $@
 +TESTS += $(handwritten_TESTS)
 +EXTRA_DIST += $(handwritten_TESTS)
  
 -MAINTAINERCLEANFILES = $(parallel_tests)
 +# Automatically-generated tests wrapping hand-written ones.
 +# Also, automatically-computed dependencies for tests.
  
 -# Some testsuite-influential variables should be overridable from the
 -# test scripts, but not from the environment.
 -TESTS_ENVIRONMENT = \
 -  test x"$$me" = x || unset me; \
 -  test x"$$required" = x || unset required; \
 -  test x"$$parallel_tests" = x || unset parallel_tests;
 +include $(srcdir)/testsuite-part.am
  
 -TEST_EXTENSIONS = .pl .test
 +TESTS += $(generated_TESTS)
 +EXTRA_DIST += $(generated_TESTS)
  
 -PL_LOG_COMPILER = $(PERL)
 -AM_PL_LOG_FLAGS = -Mstrict -I $(top_builddir)/lib -I $(top_srcdir)/lib -w
 +$(srcdir)/testsuite-part.am:
 +      $(AM_V_at)rm -f testsuite-part.tmp $@
 +      $(AM_V_GEN)$(PERL) $(srcdir)/gen-testsuite-part \
 +        --srcdir $(srcdir) > testsuite-part.tmp
 +      $(AM_V_at)chmod a-w testsuite-part.tmp
 +      $(AM_V_at)mv -f testsuite-part.tmp $@
 +EXTRA_DIST += gen-testsuite-part
  
 -include $(srcdir)/list-of-tests.mk
 +$(generated_TESTS) $(srcdir)/testsuite-part.am: \
 +  gen-testsuite-part list-of-tests.mk Makefile.am $(handwritten_TESTS)
  
 -TESTS = $(handwritten_TESTS) $(parallel_tests)
 -
 -# FIXME: make these automatically computed once we are merged into
 -# FIXME: the `testsuite-work' branch.
 -ar-lib4.log: libtool-macros.log
 -ar-lib6a.log: libtool-macros.log
 -ar-lib6b.log: libtool-macros.log
 -depcomp4.log: libtool-macros.log
 -depcomp7.log: libtool-macros.log
 -depcomp8b.log: libtool-macros.log
 -extradep2.log: libtool-macros.log
 -fort5.log: libtool-macros.log
 -instdir-ltlib.log: libtool-macros.log
 -instfail-libtool.log: libtool-macros.log
 -ldadd.log: libtool-macros.log
 -ldflags.log: libtool-macros.log
 -libobj13.log: libtool-macros.log
 -libtoo10.log: libtool-macros.log
 -libtoo11.log: libtool-macros.log
 -libtool.log: libtool-macros.log
 -libtool2.log: libtool-macros.log
 -libtool3.log: libtool-macros.log
 -libtool5.log: libtool-macros.log
 -libtool6.log: libtool-macros.log
 -libtool7.log: libtool-macros.log
 -libtool8.log: libtool-macros.log
 -libtool9.log: libtool-macros.log
 -listval.log: libtool-macros.log
 -ltcond.log: libtool-macros.log
 -ltcond2.log: libtool-macros.log
 -ltconv.log: libtool-macros.log
 -ltdeps.log: libtool-macros.log
 -ltinit.log: libtool-macros.log
 -ltinstloc.log: libtool-macros.log
 -ltlibobjs.log: libtool-macros.log
 -ltlibsrc.log: libtool-macros.log
 -ltorder.log: libtool-macros.log
 -nobase-libtool.log: libtool-macros.log
 -pr211.log: libtool-macros.log
 -pr300-ltlib.log: libtool-macros.log
 -pr307.log: libtool-macros.log
 -pr401b.log: libtool-macros.log
 -pr72.log: libtool-macros.log
 -reqd2.log: libtool-macros.log
 -silent3.log: libtool-macros.log
 -silent4.log: libtool-macros.log
 -silent9.log: libtool-macros.log
 -stdlib2.log: libtool-macros.log
 -strip3.log: libtool-macros.log
 -subobj9.log: libtool-macros.log
 -suffix10.log: libtool-macros.log
 -suffix2.log: libtool-macros.log
 -suffix5.log: libtool-macros.log
 -suffix8.log: libtool-macros.log
 -vala.log: libtool-macros.log
 -vala1.log: libtool-macros.log
 -vala2.log: libtool-macros.log
 -vala3.log: libtool-macros.log
 -vala4.log: libtool-macros.log
 -vala5.log: libtool-macros.log
 -
 -# FIXME: make these automatically computed once we are merged into
 -# FIXME: the `testsuite-work' branch.
 -gettext.log: gettext-macros.log
 -gettext2.log: gettext-macros.log
 -gettext3.log: gettext-macros.log
 -subcond.log: gettext-macros.log
 -
 -EXTRA_DIST = ChangeLog-old gen-parallel-tests $(TESTS)
 +# Static dependencies valid for each test case.
 +check_SCRIPTS = wrap/aclocal-$(APIVERSION) wrap/automake-$(APIVERSION)
 +check_DATA = defs defs-static plain-functions.sh tap-functions.sh
 +EXTRA_DIST += tap-functions.sh plain-functions.sh
  
 +# Few more static dependencies.
  distcheck-missing-m4.log distcheck-outdated-m4.log: distcheck-hook-m4.am
  EXTRA_DIST += distcheck-hook-m4.am
  
 -# Each test case depends on defs, aclocal, and automake.
 -check_SCRIPTS = defs aclocal-$(APIVERSION) automake-$(APIVERSION)
 +# Keep in sync with AC_SUBST'd stuff in defs-static.in.
 +do_subst = sed \
 +  -e 's|@abs_srcdir[@]|$(abs_srcdir)|g' \
 +  -e 's|@abs_top_srcdir[@]|$(abs_top_srcdir)|g' \
 +  -e 's|@abs_builddir[@]|$(abs_builddir)|g' \
 +  -e 's|@abs_top_builddir[@]|$(abs_top_builddir)|g' \
 +  -e 's|@prefix[@]|$(prefix)|g' \
 +  -e 's|@amdir[@]|$(amdir)|g' \
 +  -e 's|@bindir[@]|$(bindir)|g' \
 +  -e 's|@datadir[@]|$(datadir)|g' \
 +  -e 's|@docdir[@]|$(docdir)|g' \
 +  -e 's|@automake_acdir[@]|$(automake_acdir)|g' \
 +  -e 's|@system_acdir[@]|$(system_acdir)|g' \
 +  -e 's|@scriptdir[@]|$(scriptdir)|g' \
 +  -e 's|@pkgvdatadir[@]|$(pkgvdatadir)|g' \
 +  -e 's|@host_alias[@]|$(host_alias)|g' \
 +  -e 's|@build_alias[@]|$(build_alias)|g' \
 +  -e 's|@APIVERSION[@]|$(APIVERSION)|g' \
 +  -e 's|@PATH_SEPARATOR[@]|$(PATH_SEPARATOR)|g' \
 +  -e 's|@SHELL[@]|$(SHELL)|g' \
 +  -e 's|@AWK[@]|$(AWK)|g' \
 +  -e 's|@PERL[@]|$(PERL)|g' \
 +  -e 's|@EGREP[@]|$(EGREP)|g' \
 +  -e 's|@FGREP[@]|$(FGREP)|g' \
 +  -e 's|@CPPFLAGS[@]|$(CPPFLAGS)|g' \
 +  -e 's|@CC[@]|$(CC)|g' \
 +  -e 's|@CFLAGS[@]|$(CFLAGS)|g' \
 +  -e 's|@CXX[@]|$(CXX)|g' \
 +  -e 's|@CXXFLAGS[@]|$(CXXFLAGS)|g' \
 +  -e 's|@F77[@]|$(F77)|g' \
 +  -e 's|@FFLAGS[@]|$(FFLAGS)|g' \
 +  -e 's|@FC[@]|$(FC)|g' \
 +  -e 's|@FCFLAGS[@]|$(FCFLAGS)|g' \
 +  -e 's|@GNU_CC[@]|$(GNU_CC)|g' \
 +  -e 's|@GNU_CFLAGS[@]|$(GNU_CFLAGS)|g' \
 +  -e 's|@GNU_CXX[@]|$(GNU_CXX)|g' \
 +  -e 's|@GNU_CXXFLAGS[@]|$(GNU_CXXFLAGS)|g' \
 +  -e 's|@GNU_F77[@]|$(GNU_F77)|g' \
 +  -e 's|@GNU_FFLAGS[@]|$(GNU_FFLAGS)|g' \
 +  -e 's|@GNU_FC[@]|$(GNU_FC)|g' \
 +  -e 's|@GNU_FCFLAGS[@]|$(GNU_FCFLAGS)|g' \
 +  -e 's|@GNU_GCJ[@]|$(GNU_GCJ)|g' \
 +  -e 's|@GNU_GCJFLAGS[@]|$(GNU_GCJFLAGS)|g' \
 +  -e 's|@YACC[@]|$(YACC)|g' \
 +  -e 's|@LEX[@]|$(LEX)|g' \
 +  -e 's|@TEX[@]|$(TEX)|g' \
 +  -e 's|@MODIFICATION_DELAY[@]|$(MODIFICATION_DELAY)|g' \
 +  -e 's|@am_AUTOCONF[@]|$(am_AUTOCONF)|g' \
 +  -e 's|@am_AUTOM4TE[@]|$(am_AUTOM4TE)|g' \
 +  -e 's|@am_AUTORECONF[@]|$(am_AUTORECONF)|g' \
 +  -e 's|@am_AUTOHEADER[@]|$(am_AUTOHEADER)|g' \
 +  -e 's|@am_AUTOUPDATE[@]|$(am_AUTOUPDATE)|g' \
 +  -e 's|@sh_errexit_works[@]|$(sh_errexit_works)|g' \
 +  -e 's|@configure_input[@]|Generated from $@.in.  DO NOT EDIT BY HAND!|'
 +
 +defs-static: defs-static.in
 +      $(AM_V_at)rm -f $@ $@-t
 +      $(AM_V_GEN)$(do_subst) $(srcdir)/defs-static.in >$@-t
 +      $(AM_V_at) : Sanity check on the substitutions; \
 +      if LC_ALL=C grep '@[a-zA-Z0-9_][a-zA-Z0-9_]*@' $@-t; then \
 +        echo "$@ contains unexpanded substitution (see lines above)"; \
 +        exit 1; \
 +      fi
 +      $(AM_V_at)chmod a-w $@-t && mv -f $@-t $@
 +EXTRA_DIST += defs-static.in
 +CLEANFILES = defs-static
 +
 +# If two test scripts have the same basename, they will end up sharing
 +# the same log file, leading to all sort of undefined and undesired
 +# behaviours.
 +check-no-repeated-test-name:
 +      @LC_ALL=C; export LC_ALL; \
 +       lst='$(TEST_LOGS)'; for log in $$lst; do echo $$log; done \
 +         | sort | uniq -c | awk '($$1 > 1) { print }' \
 +         | sed 's/\.log$$//' | grep . >&2 \
 +         && { \
 +           echo $@: test names listed above are duplicated >&2; \
 +           exit 1; \
 +         }; :
 +check-local: check-no-repeated-test-name
 +.PHONY: check-no-repeated-test-name
  
  ## Checking the list of tests.
  test_subdirs = . pm
  include $(srcdir)/CheckListOfTests.am
 -maintainer-check-list-of-tests: $(parallel_tests)
 +
 +# Run the testsuite with the installed aclocal and automake.
 +installcheck-local:
 +      am_running_installcheck=yes $(MAKE) $(AM_MAKEFLAGS) check
  
  clean-local: clean-local-check
  .PHONY: clean-local-check
@@@ -216,86 -152,3 +218,86 @@@ clean-local-check
           find "$$@" -type d ! -perm -700 -exec chmod u+rwx {} ';'; \
           rm -rf "$$@"; \
         fi;
 +
 +## Run the testsuite through the 'prove' utility.  Mostly for maintainers,
 +## and to find out possible incompatibilities between 'prove' and the
 +## Automake own TAP driver.
 +
 +PROVE = prove
 +AM_PROVEFLAGS = --timer
 +AM_PROVECMD = \
 +  test -z "$$tests" || \
 +    { \
 +      $(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) \
 +      $(PROVE) $(AM_PROVEFLAGS) -e $(srcdir)/prove-runner $(PROVEFLAGS) \
 +      $$tests $(AM_TESTS_FD_REDIRECT); \
 +    }
 +
 +EXTRA_DIST += prove-runner
 +
 +.PHONY: prove installprove
 +prove installprove: $(TESTS) prove-runner defs-static
 +      @exit_status=0; \
 +## The testsuite can be run either using the automake build tree or
 +## the already-installed automake package.
 +      case '$@' in \
 +        install*) am_running_installcheck=yes;; \
 +        *) am_running_installcheck=no;; \
 +      esac; \
 +      export am_running_installcheck; \
 +## XXX Our poor-man way to handle inter-tests dependencies without the
 +## XXX help of make.  This is obviously fragile and doesn't scale,
 +## XXX but for now it's good enough since we have only one possible
 +## XXX inter-tests dependency at the moment.
 +      need_tap_common_setup=no; \
 +      lst=' $(TESTS) '; for t in $$lst; do \
 +        case ' $(on_tap_with_common_setup_TESTS) ' in \
 +          *" $$t "*) need_tap_common_setup=yes; break;; \
 +        esac; \
 +      done; \
 +## For VPATH builds.
 +      if test $$need_tap_common_setup = yes; then \
 +        t=tap-common-setup.test; \
 +        if test -f ./$$t; then \
 +          tests=./$$t; \
 +        else \
 +          tests=$(srcdir)/$$t; \
 +        fi; \
 +## Do not stop if there's a failure here, we want to run the following
 +## tests anyway.
 +        echo "$@: running pre-requisite tests ..."; \
 +        $(AM_PROVECMD) || exits_status=$$?; \
 +        echo "$@: done.  We'll shortly run the main testsuite."; \
 +      fi; \
 +## Handle VPATH builds, and ensure that the tests have a properly
 +## qualified path.
 +      tests=`\
 +        for t in $(TESTS); do \
 +## XXX In next line, another hack for inter-tests dependencies: this
 +## XXX can't run concurrently to the tests that use the data files it
 +## XXX generates.
 +          case "$$need_tap_common_setup,/$$t" in \
 +            yes,*/tap-common-setup.test) continue;; \
 +          esac; \
 +          if test -f ./$$t; then \
 +            echo ./$$t; \
 +          else \
 +            echo $(srcdir)/$$t; \
 +          fi; \
 +        done`; \
 +## Extra environment, mostly for use by 'prove-runner'.
 +## XFAIL_TESTS gets normalized to play nicer with VPATH builds.
 +      XFAIL_TESTS=`\
 +        for t in $(XFAIL_TESTS); do \
 +          echo $$t; echo ./$$t; echo $(srcdir)/$$t; \
 +        done | LC_ALL=C sort | uniq`; \
 +      XFAIL_TESTS=`echo $$XFAIL_TESTS`; \
 +      TAP_RUNNER='$(TAP_LOG_COMPILE)' \
 +      TEST_RUNER='$(TEST_LOG_COMPILE)' \
 +      export XFAIL_TESTS TAP_RUNNER TEST_RUNNER; \
 +## For consistency with the Automake testsuite harness, that exports
 +## this unconditionally in the test scripts' environment.
 +      srcdir='$(srcdir)'; export srcdir; \
 +## Here we go.
 +      $(AM_PROVECMD) || exit_status=$$?; \
 +      exit $$exit_status;
diff --combined tests/dist-pr109765.test
index 0000000,d656d56..f1f97be
mode 000000,100755..100755
--- /dev/null
@@@ -1,0 -1,44 +1,44 @@@
 -echo AC_OUTPUT >> configure.in
+ #! /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 <http://www.gnu.org/licenses/>.
+ # 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.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 --combined tests/get-sysconf.test
@@@ -1,5 -1,5 +1,5 @@@
  #! /bin/sh
 -# Copyright (C) 2011 Free Software Foundation, Inc.
 +# Copyright (C) 2011-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
  # along with this program.  If not, see <http://www.gnu.org/licenses/>.
  
  # Dummy test case, aimed at reporting useful system information in the
 -# final `test-suite.log'.  This way, if a user experiences a failure in
 -# the Automake test suite and then only sends us the `test-suite.log',
 +# final 'test-suite.log'.  This way, if a user experiences a failure in
 +# the Automake test suite and then only sends us the 'test-suite.log',
  # we won't have to ask him for more information to start analyzing the
  # failure (that had happened too many times in the past!).
  
  . ./defs || Exit 1
  
 -set -e
 -
 -# FIXME: remove these once we are merged into master.
 -top_testsrcdir=$testsrcdir/..
 -testbuilddir=`(cd .. && pwd)`
 -top_testbuilddir=`(cd $testbuilddir/.. && pwd)`
 -
  st=0
  if test -d "$top_testsrcdir"/.git; then
    # We are running from a git checkout.
-   git log -1 || st=1
- else
-   # We are probably running from a distribution tarball, so
-   # the ChangeLog file must be present.
+   (cd "$top_testsrcdir" && git log -1) || st=1
+ elif test -f "$top_testsrcdir"/ChangeLog; then
+   # We are probably running from a distribution tarball.
    awk '
      BEGIN { first = 1 }
      (first == 1) { print; first = 0; next; }
      /^[^\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
 -  # printed will get unconditionally copied into the `test-suite.log'
 +  # printed will get unconditionally copied into the 'test-suite.log'
    # file.
    Exit 77
  fi
diff --combined tests/instdir-cond.test
index 0000000,8d83f88..1cbd5bb
mode 000000,100644..100644
--- /dev/null
@@@ -1,0 -1,49 +1,49 @@@
 -cat >> configure.in << 'END'
+ #! /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 <http://www.gnu.org/licenses/>.
+ # Check against automake bug#10997: directories holding only
+ # conditionally-installed files should not be created unconditionally.
+ . ./defs || Exit 1
+ set -e
++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 --combined tests/instdir-empty.test
index 0000000,f699583..b6eab65
mode 000000,100644..100644
--- /dev/null
@@@ -1,0 -1,58 +1,58 @@@
 -echo AC_OUTPUT >> configure.in
+ #! /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 <http://www.gnu.org/licenses/>.
+ # 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.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 --combined tests/list-of-tests.mk
@@@ -2,7 -2,7 +2,7 @@@
  ## testsuite.  This fragment is meant to be included by the Makefile.am,
  ## but also to be executed directly by make when bootstrapping automake.
  
 -## Copyright (C) 20112012 Free Software Foundation, Inc.
 +## Copyright (C) 2011-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
  ## along with this program.  If not, see <http://www.gnu.org/licenses/>.
  
  perl_TESTS = \
 +pm/Cond2.pl \
 +pm/Cond3.pl \
  pm/Condition.pl \
  pm/Condition-t.pl \
 +pm/DisjCon2.pl \
 +pm/DisjCon3.pl \
  pm/DisjConditions.pl \
  pm/DisjConditions-t.pl \
  pm/Version.pl \
 +pm/Version2.pl \
 +pm/Version3.pl \
  pm/Wrap.pl
  
  # The order here is mostly alphabetical, with the deliberate exception
@@@ -38,7 -32,9 +38,7 @@@
  handwritten_TESTS = \
  get-sysconf.test \
  $(perl_TESTS) \
 -self-check-env-sanitize.test \
 -self-check-report.test \
 -aclibobj.test \
 +instspc.tap \
  aclocal.test \
  aclocal3.test \
  aclocal4.test \
@@@ -60,7 -56,6 +60,7 @@@ acloca19.test 
  acloca20.test \
  acloca21.test \
  acloca22.test \
 +acloca23.test \
  aclocal-acdir.test \
  aclocal-install-absdir.test \
  aclocal-print-acdir.test \
@@@ -69,11 -64,15 +69,11 @@@ aclocal-path-install.test 
  aclocal-path-install-serial.test \
  aclocal-path-nonexistent.test \
  aclocal-path-precedence.test \
 -acoutnoq.test \
 -acoutpt.test \
 -acoutpt2.test \
 -acoutqnl.test \
 -acoutbs.test \
 -acoutbs2.test \
 +ac-output-old.tap \
  acsilent.test \
  acsubst.test \
  acsubst2.test \
 +add-missing.tap \
  all.test \
  all2.test \
  alloca.test \
@@@ -86,10 -85,19 +86,10 @@@ amhello-binpkg.test 
  amassign.test \
  ammissing.test \
  amopt.test \
 +amopts-location.test \
 +amopts-variable-expansion.test \
  amsubst.test \
 -ansi2knr-deprecation.test \
 -ansi.test \
 -ansi2.test \
 -ansi3.test \
 -ansi3b.test \
 -ansi4.test \
 -ansi5.test \
 -ansi6.test \
 -ansi7.test \
 -ansi8.test \
 -ansi9.test \
 -ansi10.test \
 +ansi2knr-no-more.test \
  ar-lib.test \
  ar-lib2.test \
  ar-lib3.test \
@@@ -121,22 -129,11 +121,22 @@@ autohdr2.test 
  autohdr3.test \
  autohdr4.test \
  autohdrdry.test \
 -automake.test \
 +automake-cmdline.tap \
  auxdir.test \
 -auxdir2.test \
 -auxdir3.test \
 -auxdir4.test \
 +auxdir6.test \
 +auxdir7.test \
 +auxdir8.test \
 +auxdir-autodetect.test \
 +auxdir-computed.tap \
 +auxdir-misplaced.test \
 +auxdir-nonexistent.test \
 +auxdir-unportable.tap \
 +backcompat.test \
 +backcompat2.test \
 +backcompat3.test \
 +backcompat4.test \
 +backcompat5.test \
 +backcompat6.test \
  backsl.test \
  backsl2.test \
  backsl3.test \
@@@ -146,15 -143,11 +146,15 @@@ badopt.test 
  badprog.test \
  block.test \
  bsource.test \
 +candist.test \
  canon.test \
  canon2.test \
  canon3.test \
  canon4.test \
  canon5.test \
 +canon6.test \
 +canon7.test \
 +canon8.test \
  canon-name.test \
  ccnoco.test \
  ccnoco2.test \
@@@ -167,22 -160,20 +167,22 @@@ check5.test 
  check6.test \
  check7.test \
  check8.test \
 -check9.test \
  check10.test \
  check11.test \
  check12.test \
 +check-subst.test \
 +check-subst-prog.test \
  check-exported-srcdir.test \
 +check-fd-redirect.test \
  check-tests-in-builddir.test \
 -check-tests_environment.test \
 +check-no-test-driver.test \
  check-concurrency-bug9245.test \
 -tests-environment-backcompat.test \
  checkall.test \
  clean.test \
  clean2.test \
  colneq.test \
  colneq2.test \
 +colneq3.test \
  colon.test \
  colon2.test \
  colon3.test \
@@@ -212,7 -203,6 +212,7 @@@ compile5.test 
  compile6.test \
  compile_f90_c_cxx.test \
  compile_f_c_cxx.test \
 +cond-basic.test \
  cond.test \
  cond2.test \
  cond3.test \
@@@ -257,13 -247,13 +257,13 @@@ cond42.test 
  cond43.test \
  cond44.test \
  cond45.test \
 +cond46.test \
  condd.test \
  condhook.test \
  condhook2.test \
  condinc.test \
  condinc2.test \
  condlib.test \
 -condman.test \
  condman2.test \
  condman3.test \
  configure.test \
@@@ -286,22 -276,15 +286,22 @@@ confsub.test 
  confvar.test \
  confvar2.test \
  copy.test \
 -ctarget1.test \
 +cscope.tap \
 +cscope2.test \
 +cscope3.test \
  cxx.test \
  cxx2.test \
 -cxxansi.test \
  cxxcpp.test \
  cxxlibobj.test \
  cxxlink.test \
  cxxnoc.test \
  cxxo.test \
 +cygnus-check-without-all.test \
 +cygnus-dependency-tracking.test \
 +cygnus-imply-foreign.test \
 +cygnus-no-dist.test \
 +cygnus-no-installinfo.test \
 +cygnus-requires-maintainer-mode.test \
  cygwin32.test \
  dash.test \
  defun.test \
@@@ -323,38 -306,41 +323,39 @@@ deleted-m4.test 
  depacl2.test \
  depcomp.test \
  depcomp2.test \
 -depcomp3.test \
 -depcomp4.test \
 -depcomp5.test \
 -depcomp6.test \
 -depcomp7.test \
  depcomp8a.test \
  depcomp8b.test \
 -depcomp9.test \
 -depcomp10.test \
  depdist.test \
  depend.test \
 -depend2.test \
  depend3.test \
  depend4.test \
  depend5.test \
  depend6.test \
 +deprecated-acinit.test \
  destdir.test \
  dirlist.test \
  dirlist2.test \
 +dirlist-abspath.test \
  discover.test \
 -dist-auxfile.test \
 +dist-formats.tap \
 +dist-auxdir-many-subdirs.test \
  dist-auxfile-2.test \
 +dist-auxfile.test \
  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 \
  distcom4.test \
  distcom5.test \
 -distcom6.test \
 -distcom7.test \
 +distcom-subdir.test \
  distdir.test \
 +disthook.test \
  distlinks.test \
  distlinksbrk.test \
  distname.test \
@@@ -363,12 -349,11 +364,12 @@@ distcheck-configure-flags-am.test 
  distcheck-configure-flags-subpkg.test \
  distcheck-hook.test \
  distcheck-hook2.test \
 +distcheck-writable-srcdir.test \
  distcheck-missing-m4.test \
  distcheck-outdated-m4.test \
 +distcheck-override-infodir.test \
  distcheck-pr9579.test \
  distcheck-pr10470.test \
 -distcheck-override-infodir.test \
  dmalloc.test \
  doc-parsing-buglets-colneq-subst.test \
  doc-parsing-buglets-tabs.test \
@@@ -392,7 -377,9 +393,7 @@@ exeext4.test 
  exsource.test \
  ext.test \
  ext2.test \
 -extra-portability.test \
 -extra-portability2.test \
 -extra-portability3.test \
 +ext3.test \
  extra.test \
  extra2.test \
  extra3.test \
@@@ -401,11 -388,9 +402,11 @@@ extra5.test 
  extra6.test \
  extra7.test \
  extra8.test \
 +extra9.test \
  extra10.test \
  extra11.test \
  extra12.test \
 +extra-programs-empty.test \
  extra-portability.test \
  extra-portability2.test \
  extra-portability3.test \
@@@ -454,9 -439,11 +455,9 @@@ help-init.test 
  help-lispdir.test \
  help-multilib.test \
  help-python.test \
 -help-regex.test \
  help-silent.test \
  help-upc.test \
  hfs.test \
 -hosts.test \
  implicit.test \
  info.test \
  init.test \
@@@ -464,6 -451,7 +465,6 @@@ init2.test 
  insh2.test \
  install2.test \
  installdir.test \
 -install-info-dir.test \
  instsh.test \
  instsh2.test \
  instsh3.test \
@@@ -471,6 -459,8 +472,8 @@@ instdat.test 
  instdat2.test \
  instdir.test \
  instdir2.test \
+ instdir-cond.test \
+ instdir-empty.test \
  instdir-java.test \
  instdir-lisp.test \
  instdir-ltlib.test \
@@@ -488,75 -478,45 +491,75 @@@ instman2.test 
  instmany.test \
  instmany-mans.test \
  instmany-python.test \
 -instspc.test \
 +install-info-dir.test \
  interp.test \
  interp2.test \
  java.test \
  java2.test \
  java3.test \
 +javadir-undefined.test \
 +javaflags.test \
  java-check.test \
 +java-clean.test \
 +java-compile-install.test \
 +java-compile-run-flat.test \
 +java-compile-run-nested.test \
  java-empty-classpath.test \
 -javadir-undefined.test \
  javaprim.test \
  javasubst.test \
 -java-clean.test \
 +java-extra.test \
 +java-mix.test \
 +java-no-duplicate.test \
  java-nobase.test \
 -java-compile-install.test \
 +java-noinst.test \
 +java-rebuild.test \
  java-sources.test \
 -java-no-duplicate.test \
 -java-mix.test \
 +java-uninstall.test \
  ldadd.test \
  ldflags.test \
  lex.test \
  lex2.test \
  lex3.test \
 -lex4.test \
  lex5.test \
 +lexcpp.test \
 +lexvpath.test \
  lex-subobj-nodep.test \
 +lex-lib.test \
 +lex-lib-external.test \
 +lex-libobj.test \
 +lex-noyywrap.test \
 +lex-clean-cxx.test \
 +lex-clean.test \
 +lex-depend-cxx.test \
 +lex-depend-grep.test \
 +lex-depend.test \
 +lex-line.test \
 +lex-nodist.test \
 +lex-pr204.test \
  lflags.test \
  lflags2.test \
  libexec.test \
 +libobj-basic.test \
  libobj2.test \
  libobj3.test \
  libobj4.test \
  libobj5.test \
  libobj7.test \
 -libobj8.test \
  libobj10.test \
 -libobj11.test \
  libobj12.test \
  libobj13.test \
  libobj14.test \
 +libobj15a.test \
 +libobj15b.test \
 +libobj15c.test \
 +libobj16a.test \
 +libobj16b.test \
 +libobj17.test \
 +libobj18.test \
 +libobj19.test \
 +libobj20a.test \
 +libobj20b.test \
 +libobj20c.test \
  library.test \
  library2.test \
  library3.test \
@@@ -580,7 -540,6 +583,7 @@@ link_fc.test 
  link_fccxx.test \
  link_fcxx.test \
  link_f_only.test \
 +link_override.test \
  lisp2.test \
  lisp3.test \
  lisp4.test \
@@@ -602,6 -561,7 +605,6 @@@ ltinstloc.test 
  ltlibobjs.test \
  ltlibsrc.test \
  ltorder.test \
 -lzip.test \
  lzma.test \
  m4-inclusion.test \
  maintclean.test \
@@@ -613,16 -573,13 +616,16 @@@ makej.test 
  makej2.test \
  maken.test \
  maken3.test \
 -make-dryrun.test \
 +make-dryrun.tap \
  makevars.test \
  man.test \
  man2.test \
  man3.test \
  man4.test \
  man5.test \
 +man6.test \
 +man7.test \
 +man8.test \
  mdate.test \
  mdate2.test \
  mdate3.test \
@@@ -635,15 -592,12 +638,15 @@@ missing3.test 
  missing4.test \
  missing5.test \
  missing6.test \
 +missing-auxfile-stops-makefiles-creation.test \
  mkinstall.test \
  mkinst2.test \
  mkinst3.test \
  mmode.test \
  mmodely.test \
  multlib.test \
 +no-extra-makefile-code.test \
 +no-outdir-option.test \
  nobase.test \
  nobase-libtool.test \
  nobase-python.test \
@@@ -656,6 -610,8 +659,6 @@@ nodepcomp.test 
  nodist.test \
  nodist2.test \
  nodist3.test \
 -nogzip.test \
 -nogzip2.test \
  noinst.test \
  noinstdir.test \
  nolink.test \
@@@ -666,8 -622,8 +669,8 @@@ objc.test 
  objc2.test \
  objext-pr10128.test \
  obsolete.test \
 +oldvars.test \
  order.test \
 -outdir.test \
  output.test \
  output2.test \
  output3.test \
@@@ -682,84 -638,28 +685,84 @@@ output11.test 
  output12.test \
  output13.test \
  output-order.test \
 -overrid.test \
 +override-conditional-1.test \
 +override-conditional-2.test \
 +override-html.test \
 +override-suggest-local.test \
  parallel-am.test \
  parallel-am2.test \
  parallel-am3.test \
 +serial-tests.test \
  parallel-tests.test \
  parallel-tests2.test \
  parallel-tests3.test \
 -parallel-tests4.test \
  parallel-tests5.test \
  parallel-tests6.test \
 -parallel-tests7.test \
  parallel-tests8.test \
  parallel-tests9.test \
  parallel-tests10.test \
 -parallel-tests-dryrun.test \
 -parallel-tests-harderror.test \
 -parallel-tests-unreadable-log.test \
 +parallel-tests-exeext.test \
 +parallel-tests-suffix.test \
 +parallel-tests-suffix-prog.test \
 +parallel-tests-log-compiler-1.test \
 +parallel-tests-log-compiler-2.test \
 +parallel-tests-dry-run-1.test \
 +parallel-tests-dry-run-2.test \
 +parallel-tests-fd-redirect.test \
 +parallel-tests-fd-redirect-exeext.test \
 +parallel-tests-extra-programs.test \
 +parallel-tests-unreadable.test \
  parallel-tests-subdir.test \
 +parallel-tests-interrupt.tap \
 +parallel-tests-reset-term.test \
 +parallel-tests-harderror.test \
  parallel-tests-log-override-1.test \
  parallel-tests-log-override-2.test \
  parallel-tests-log-override-recheck.test \
  parallel-tests-log-compiler-example.test \
 +parallel-tests-cmdline-override.test \
 +parallel-tests-fork-bomb.test \
 +parallel-tests-empty-testlogs.test \
 +parallel-tests-driver-install.test \
 +parallel-tests-no-color-in-log.test \
 +parallel-tests-no-spurious-summary.test \
 +parallel-tests-exit-statuses.test \
 +parallel-tests-console-output.test \
 +parallel-tests-once.test \
 +parallel-tests-trailing-bslash.test \
 +parallel-tests-many.test \
 +tests-environment.test \
 +am-tests-environment.test \
 +tests-environment-backcompat.test \
 +testsuite-summary-color.test \
 +testsuite-summary-count.test \
 +testsuite-summary-count-many.test \
 +testsuite-summary-reference-log.test \
 +test-driver-acsubst.test \
 +test-driver-cond.test \
 +test-driver-custom-no-extra-driver.test \
 +test-driver-custom.test \
 +test-driver-custom-xfail-tests.test \
 +test-driver-custom-multitest.test \
 +test-driver-custom-multitest-recheck.test \
 +test-driver-custom-multitest-recheck2.test \
 +test-driver-create-log-dir.test \
 +test-driver-strip-vpath.test \
 +test-driver-trs-suffix-registered.test \
 +test-driver-fail.test \
 +test-driver-is-distributed.test \
 +test-harness-vpath-rewrite.test \
 +test-log.test \
 +test-logs-repeated.test \
 +test-metadata-global-log.test \
 +test-metadata-global-result.test \
 +test-metadata-recheck.test \
 +test-metadata-results.test \
 +test-missing.test \
 +test-missing2.test \
 +test-trs-basic.test \
 +test-trs-recover.test \
 +test-trs-recover2.test \
  test-extensions.test \
  test-extensions-cond.test \
  parse.test \
@@@ -777,21 -677,13 +780,21 @@@ pluseq8.test 
  pluseq9.test \
  pluseq10.test \
  pluseq11.test \
 +posixsubst-data.test \
 +posixsubst-extradist.test \
 +posixsubst-ldadd.test \
 +posixsubst-libraries.test \
 +posixsubst-ltlibraries.test \
 +posixsubst-programs.test \
 +posixsubst-scripts.test \
 +posixsubst-sources.test \
 +posixsubst-tests.test \
  postproc.test \
  ppf77.test \
  pr2.test \
  pr9.test \
  pr72.test \
  pr87.test \
 -pr204.test \
  pr211.test \
  pr220.test \
  pr224.test \
@@@ -812,13 -704,11 +815,13 @@@ prefix.test 
  primary.test \
  primary2.test \
  primary3.test \
 -primary-prefix-invalid-couples.test \
 +primary-prefix-invalid-couples.tap \
  primary-prefix-valid-couples.test \
  primary-prefix-couples-force-valid.test \
  primary-prefix-couples-documented-valid.test \
 +print-libdir.test \
  proginst.test \
 +programs-primary-rewritten.test \
  py-compile-basic.test \
  py-compile-basic2.test \
  py-compile-basedir.test \
@@@ -831,7 -721,6 +834,7 @@@ python2.test 
  python3.test \
  python4.test \
  python5.test \
 +python5b.test \
  python6.test \
  python7.test \
  python8.test \
@@@ -839,74 -728,33 +842,74 @@@ python9.test 
  python10.test \
  python11.test \
  python12.test \
 +python-dist.test \
 +python-vars.test \
 +python-virtualenv.test \
  recurs.test \
  recurs2.test \
  remake.test \
 +remake1a.test \
  remake2.test \
  remake3.test \
 +remake3a.test \
  remake4.test \
  remake5.test \
  remake6.test \
  remake7.test \
 +remake8a.test \
 +remake8b.test \
 +remake9a.test \
 +remake9b.test \
 +remake9c.test \
 +remake9d.test \
 +remake10a.test \
 +remake10b.test \
 +remake10c.test \
 +remake11.test \
 +remake12.test \
 +remake-all-1.test \
 +remake-all-2.test \
  remake-subdir-from-subdir.test \
  remake-subdir-gnu.test \
  remake-subdir.test \
  remake-subdir2.test \
  remake-subdir-long-time.test \
 +remake-gnulib-add-acsubst.test \
 +remake-gnulib-add-header.test \
 +remake-gnulib-remove-header.test \
 +remake-moved-m4-file.test \
 +remake-deleted-m4-file.test \
 +remake-renamed-m4-file.test \
 +remake-renamed-m4-macro-and-file.test \
 +remake-renamed-m4-macro.test \
  remake-am-pr10111.test \
  remake-m4-pr10111.test \
 -remake-deleted-am.test \
  remake-deleted-am-2.test \
  remake-deleted-am-subdir.test \
 +remake-deleted-am.test \
  remake-renamed-am.test \
  pr8365-remake-timing.test \
 -regex.test \
 -regex-obsolete.test \
  req.test \
  reqd.test \
  reqd2.test \
 +repeated-options.test \
 +rst-formatting.test \
  rulepat.test \
 +self-check-cleanup.tap \
 +self-check-configure-help.test \
 +self-check-dir.tap \
 +self-check-env-sanitize.tap \
 +self-check-exit.tap \
 +self-check-explicit-skips.test \
 +self-check-is_newest.tap \
 +self-check-me.tap \
 +self-check-reexec.tap \
 +self-check-report.test \
 +self-check-sanity.test \
 +self-check-seq.tap \
 +self-check-is-blocked-signal.tap \
 +self-check-tap.test \
 +self-check-unindent.tap \
  sanity.test \
  scripts.test \
  seenc.test \
@@@ -916,21 -764,18 +919,21 @@@ silent3.test 
  silent4.test \
  silent6.test \
  silent7.test \
 +silent8.test \
  silent9.test \
  silentcxx.test \
 +silentcxx-gcc.test \
  silentf77.test \
  silentf90.test \
 +silent-amopts.test \
  silent-many-gcc.test \
  silent-many-generic.test \
 -silent-lex-gcc.test \
 -silent-lex-generic.test \
 -silent-nested-vars.test \
 -silent-yacc-gcc.test \
 -silent-yacc-generic.test \
 +silent-nowarn.test \
  silent-configsite.test \
 +silent-nested-vars.test \
 +silent-lex.test \
 +silent-yacc.test \
 +silent-yacc-headers.test \
  srcsub.test \
  srcsub2.test \
  space.test \
@@@ -948,13 -793,10 +951,13 @@@ spell2.test 
  spell3.test \
  spelling.test \
  spy.test \
 +spy-rm.tap \
  stdinc.test \
  stamph2.test \
  stdlib.test \
  stdlib2.test \
 +strictness-override.test \
 +strictness-precedence.test \
  strip.test \
  strip2.test \
  strip3.test \
@@@ -974,6 -816,7 +977,6 @@@ subcond2.test 
  subcond3.test \
  subobj.test \
  subobj2.test \
 -subobj3.test \
  subobj4.test \
  subobj5.test \
  subobj6.test \
@@@ -991,116 -834,29 +994,116 @@@ subpkg3.test 
  subpkg4.test \
  subpkg-yacc.test \
  subst.test \
 -subst2.test \
  subst3.test \
  subst4.test \
 +subst5.test \
 +subst-no-trailing-empty-line.test \
  substref.test \
  substre2.test \
  substtarg.test \
  suffix.test \
  suffix2.test \
 -suffix3.test \
 +suffix3.tap \
  suffix4.test \
  suffix5.test \
  suffix6.test \
 +suffix6b.test \
 +suffix6c.test \
  suffix7.test \
 -suffix8.test \
 +suffix8.tap \
  suffix9.test \
 -suffix10.test \
 -suffix11.test \
 +suffix10.tap \
 +suffix11.tap \
  suffix12.test \
  suffix13.test \
 +suffix-chain.tap \
  symlink.test \
  symlink2.test \
  syntax.test \
 +tap-ambiguous-directive.test \
 +tap-autonumber.test \
 +tap-bailout.test \
 +tap-bailout-leading-space.test \
 +tap-bailout-and-logging.test \
 +tap-bailout-suppress-badexit.test \
 +tap-bailout-suppress-later-diagnostic.test \
 +tap-bailout-suppress-later-errors.test \
 +tap-color.test \
 +tap-deps.test \
 +tap-diagnostic.test \
 +tap-empty-diagnostic.test \
 +tap-empty.test \
 +tap-escape-directive.test \
 +tap-escape-directive-2.test \
 +tap-exit.test \
 +tap-signal.tap \
 +tap-fancy.test \
 +tap-fancy2.test \
 +tap-global-log.test \
 +tap-global-result.test \
 +tap-log.test \
 +tap-msg0-result.test \
 +tap-msg0-directive.test \
 +tap-msg0-planskip.test \
 +tap-msg0-bailout.test \
 +tap-msg0-misc.test \
 +tap-merge-stdout-stderr.test \
 +tap-no-merge-stdout-stderr.test \
 +tap-no-disable-hard-error.test \
 +tap-no-spurious-summary.test \
 +tap-no-spurious-numbers.test \
 +tap-no-spurious.test \
 +tap-not-ok-skip.test \
 +tap-number-wordboundary.test \
 +tap-numeric-description.test \
 +tap-negative-numbers.test \
 +tap-numbers-leading-zero.test \
 +tap-out-of-order.test \
 +tap-passthrough.test \
 +tap-passthrough-exit.test \
 +tap-plan.test \
 +tap-plan-corner.test \
 +tap-plan-errors.test \
 +tap-plan-middle.test \
 +tap-plan-whitespace.test \
 +tap-plan-leading-zero.test \
 +tap-plan-malformed.test \
 +tap-missing-plan-and-bad-exit.test \
 +tap-planskip.test \
 +tap-planskip-late.test \
 +tap-planskip-and-logging.test \
 +tap-planskip-unplanned.test \
 +tap-planskip-unplanned-corner.test \
 +tap-planskip-case-insensitive.test \
 +tap-planskip-whitespace.test \
 +tap-planskip-badexit.test \
 +tap-planskip-bailout.test \
 +tap-planskip-later-errors.test \
 +tap-realtime.test \
 +tap-test-number-0.test \
 +tap-recheck-logs.test \
 +tap-result-comment.test \
 +tap-todo-skip-together.test \
 +tap-todo-skip-whitespace.test \
 +tap-todo-skip.test \
 +tap-unplanned.test \
 +tap-whitespace-normalization.test \
 +tap-with-and-without-number.test \
 +tap-xfail-tests.test \
 +tap-common-setup.test \
 +tap-bad-prog.tap \
 +tap-basic.test \
 +tap-diagnostic-custom.test \
 +tap-driver-stderr.test \
 +tap-doc.test \
 +tap-doc2.test \
 +tap-more.test \
 +tap-more2.test \
 +tap-recheck.test \
 +tap-summary.test \
 +tap-summary-color.test \
  tags.test \
 +tags2.test \
  tagsub.test \
  tar.test \
  tar2.test \
@@@ -1108,8 -864,6 +1111,8 @@@ tar3.test 
  tar-override.test \
  target-cflags.test \
  targetclash.test \
 +tests-environment-fd-redirect.test \
 +tests-environment-and-log-compiler.test \
  txinfo.test \
  txinfo2.test \
  txinfo3.test \
@@@ -1140,12 -894,10 +1143,12 @@@ txinfo30.test 
  txinfo31.test \
  txinfo32.test \
  txinfo33.test \
 +txinfo-unrecognized-extension.test \
  transform.test \
  transform2.test \
 -uninstall-pr9578.test \
 +transform3.test \
  uninstall-fail.test \
 +uninstall-pr9578.test \
  unused.test \
  upc.test \
  upc2.test \
@@@ -1162,8 -914,6 +1165,8 @@@ vala-mix2.test 
  vars.test \
  vars3.test \
  vartar.test \
 +vartypos.test \
 +vartypo2.test \
  version.test \
  version2.test \
  version3.test \
@@@ -1176,59 -926,26 +1179,59 @@@ vtexi.test 
  vtexi2.test \
  vtexi3.test \
  vtexi4.test \
 +warnings-override.test \
 +warnings-precedence.test \
 +warnings-strictness-interactions.test \
 +warnings-unknown.test \
  warnopts.test \
 +warnings-win-over-strictness.test \
 +warning-groups-win-over-strictness.test \
  werror.test \
  werror2.test \
  werror3.test \
 +werror4.test \
  whoami.test \
  xsource.test \
 -xz.test \
  yacc.test \
  yacc2.test \
 -yacc3.test \
  yacc4.test \
  yacc5.test \
 -yacc6.test \
  yacc7.test \
  yacc8.test \
  yaccdry.test \
  yaccpp.test \
  yaccvpath.test \
 +yacc-auxdir.test \
 +yacc-basic.test \
 +yacc-cxx.test \
 +yacc-bison-skeleton-cxx.test \
 +yacc-bison-skeleton.test \
 +yacc-clean.test \
 +yacc-clean-cxx.test \
 +yacc-d-basic.test \
 +yacc-d-cxx.test \
 +yacc-d-vpath.test \
 +yacc-deleted-headers.test \
 +yacc-depend.test \
 +yacc-depend2.test \
  yacc-dist-nobuild-subdir.test \
 +yacc-dist-nobuild.test \
 +yacc-line.test \
 +yacc-mix-c-cxx.test \
 +yacc-nodist.test \
 +yacc-pr204.test \
 +yacc-weirdnames.test \
  yflags.test \
  yflags2.test \
 +yflags-cmdline-override.test \
 +yflags-conditional.test \
 +yflags-d-false-positives.test \
 +yflags-force-conditional.test \
 +yflags-force-override.test \
 +yflags-var-expand.test \
  libtool-macros.test \
  gettext-macros.test
 +
 +print-list-of-tests:
 +      @echo $(handwritten_TESTS)
 +.PHONY: print-list-of-tests
diff --combined tests/python.test
@@@ -1,5 -1,5 +1,5 @@@
  #! /bin/sh
 -# Copyright (C) 2001, 2002, 2012 Free Software Foundation, Inc.
 +# 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
  # 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 py_compile is defined.
+ # Test to make sure py_compile and am__py_compile are correctly defined.
  
  . ./defs || Exit 1
  
 -set -e
 -
 -echo 'AM_PATH_PYTHON' >> configure.in
 +echo 'AM_PATH_PYTHON' >> configure.ac
  
  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
  :