automake-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Automake-commit] [SCM] GNU Automake branch, ng/master, updated. v1.12.5


From: Stefano Lattarini
Subject: [Automake-commit] [SCM] GNU Automake branch, ng/master, updated. v1.12.5-905-gc95017c
Date: Sat, 24 Nov 2012 13:13:13 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Automake".

http://git.sv.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=c95017c8a2ebf9afcd63892d50ca51503a17c4a3

The branch, ng/master has been updated
       via  c95017c8a2ebf9afcd63892d50ca51503a17c4a3 (commit)
       via  d396d841c5e172eb5cc852ccfb36c2a7624c8e53 (commit)
       via  fe1625a4b00b402d6333be0d7999a41ed4983204 (commit)
       via  411ada9995cb7d66ea2ede4334172fb9be39ae94 (commit)
       via  6d1fe29e2c844fe3d50267af02ae69e687fd5e37 (commit)
       via  cb6a19d9d0c46ddf03b2494333bed2c3d7dc1e15 (commit)
       via  8d1a542296ca5d9137644387ebe1611239e41018 (commit)
       via  1d73b276595cd1c6d57998e4148601dbf2844425 (commit)
       via  e1acf4a06f5a8d9e861455ac29abb4944a446494 (commit)
       via  3fea76478eb1364093804365904fdb3c1e5c93d2 (commit)
       via  ab49d2bc115ba121b00ac06229d4044a004f67e9 (commit)
       via  3e6643af3c1d4ae729c59ed6d2b803767a03e3c3 (commit)
       via  18143e7cfe66eaddffa481211ad4e340a11a22f4 (commit)
       via  2f584fa4f117c5d745b0b7b4f57686f2f83424b0 (commit)
       via  d85a97bd08ddbb224124ae3a6cc27930b8db55ec (commit)
       via  2383b2c99b4f12e09beea42ca2d8758c4b24c3a9 (commit)
       via  228258cc8779575e9539ab0936b9e64be6318cf5 (commit)
       via  1efb88cadad61a031d1c297310bc2634562f2e87 (commit)
       via  b1e58545f392151970f930be4c89b75b47c087a5 (commit)
       via  b1a0ec539943d176a21b647c63a7d36921d63c13 (commit)
       via  eff0e07327d9c37bbda3e2ea385f33d1e9ec9f5b (commit)
       via  4872dfe765470157af6276f7e9bd8c5d3f0e34eb (commit)
       via  e0a0fbf00414e26bf9869c2d82177fd9426887b2 (commit)
       via  db036841cca7c784033ee624c7a8b261f25a76ed (commit)
       via  cae0d860a5bce1593d1be0ce22f3dae81c825230 (commit)
       via  c3dc900373daa90464d3f16598f941c5a564c3b5 (commit)
       via  2ccd405661bf7f49d14c5be54d4adacb046d521c (commit)
       via  b2d3483c33079b333d96d1c8ee893c17974ae666 (commit)
       via  e0e99eda367180a73403e3d016e2255bc278e42e (commit)
      from  b64c1f41633729250d2b7184359b673f17ce29b2 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit c95017c8a2ebf9afcd63892d50ca51503a17c4a3
Merge: d396d84 b64c1f4
Author: Stefano Lattarini <address@hidden>
Date:   Sat Nov 24 14:08:46 2012 +0100

    Merge branch 'origin/ng/master' into 'ng/master'.
    
    Hmph, I did a merge of 'master' into 'ng/master' without pulling first,
    so I missed earlier changes to 'ng/master' that were in the central
    repository but not in my local repository.  Since that merge required
    some non-trivial conflicts resolutions, I don't want to redo it; I'm
    thus merging the 'ng/master' from the central repository to the local
    one "after the fact".

commit d396d841c5e172eb5cc852ccfb36c2a7624c8e53
Merge: 84a6d59 fe1625a
Author: Stefano Lattarini <address@hidden>
Date:   Sat Nov 24 13:20:59 2012 +0100

    Merge branch 'master' into ng/master
    
    * master: (38 commits)
      tests: fix a spurious failure with older flex versions
      tests: avoid a failure due to m4 builtin 'sinclude' in package name
      tests: fix a spurious failure when $PYTHON is in the environment
      python tests: support PEP-3147 installation layout
      python: uninstall cater to PEP-3147
      tests: more explicative names for few aclocal tests
      tests: improve coverage on Texinfo + silent rules
      build: fix rebuild rules for Makefile.in and aclocal.m4
      hacking: release procedure: fix order of some steps
      maint: post-release minor version bump
      release: stable release 1.12.5
      maintcheck: avoid failures, sync with 'ng/master' more
      maintcheck: remove 'sc_perl_syntax'
      sync: update files from upstream with "make fetch"
      maint: get rid of $perllibdir environment variable hack
      configure: respect the '-q' option better
      cosmetics: de-tabify configure.ac
      fixup: Automake installation works again
      tests: AC_CONFIG_MACRO_DIRS: ignore inevitable failures with old autoconf
      recursion: remove _AM_EXTRA_RECURSIVE_TARGETS indirection
      ...
    
    Signed-off-by: Stefano Lattarini <address@hidden>

-----------------------------------------------------------------------

Summary of changes:
 HACKING                                            |   12 +-
 NEWS                                               |   22 ++++-
 aclocal.in                                         |    5 +-
 automake.in                                        |    5 +-
 configure.ac                                       |   23 ++---
 lib/am/python.am                                   |   14 ++-
 lib/config.sub                                     |    6 +-
 lib/py-compile                                     |   18 +++-
 lib/texinfo.tex                                    |   37 ++++++--
 m4/python.m4                                       |    2 +-
 syntax-checks.mk                                   |   12 +--
 t/{aclocal9.sh => aclocal-I-order-1.sh}            |    0
 t/{acloca11.sh => aclocal-I-order-2.sh}            |    1 +
 t/{acloca12.sh => aclocal-I-order-3.sh}            |    2 +-
 t/{acloca21.sh => aclocal-comments-respected.sh}   |    0
 ...h => aclocal-deleted-header-aclocal-amflags.sh} |    3 +-
 t/{acloca22.sh => aclocal-deleted-header.sh}       |    0
 t/{aclocal5.sh => aclocal-deps-subdir.sh}          |    0
 t/{aclocal4.sh => aclocal-deps.sh}                 |    0
 ...ocal-m4-include-are-scanned-aclocal-amflags.sh} |    0
 ...loca14.sh => aclocal-m4-include-are-scanned.sh} |    0
 t/{acloca13.sh => aclocal-m4-sinclude.sh}          |    5 +-
 t/{aclocal3.sh => aclocal-missing-macros.sh}       |    0
 t/{acloca16.sh => aclocal-no-extra-scan.sh}        |    3 +-
 t/{aclocal7.sh => aclocal-no-force.sh}             |    0
 ...loca20.sh => aclocal-no-symlinked-overwrite.sh} |    0
 t/{aclocal8.sh => aclocal-no-unused-required.sh}   |    0
 t/{acloca19.sh => aclocal-pr450.sh}                |    0
 t/{aclocal6.sh => aclocal-remake-misc.sh}          |    0
 ...oca15.sh => aclocal-scan-configure-ac-pr319.sh} |    0
 t/{acloca18.sh => aclocal-serial.sh}               |    0
 t/{acloca23.sh => aclocal-underquoted-defun.sh}    |    0
 t/ax/am-test-lib.sh                                |   66 ++++++++++++-
 t/lex-header.sh                                    |    6 +
 t/nobase-python.sh                                 |   50 ++++++----
 t/py-compile-basedir.sh                            |   18 ++--
 t/py-compile-basic.sh                              |   19 +++-
 t/py-compile-basic2.sh                             |   70 --------------
 t/py-compile-destdir.sh                            |   22 +++--
 t/py-compile-option-terminate.sh                   |   20 ++--
 t/python-pr10995.sh                                |    8 +-
 t/python-too-old.sh                                |    3 +-
 t/python-vars.sh                                   |    2 -
 t/python-virtualenv.sh                             |  101 +++++++++++---------
 t/python10.sh                                      |   36 ++++----
 t/python11.sh                                      |    3 +
 t/python12.sh                                      |   14 ++--
 t/python3.sh                                       |    6 +-
 t/wrap/aclocal.in                                  |    6 +-
 t/wrap/automake.in                                 |    6 +-
 50 files changed, 353 insertions(+), 273 deletions(-)
 rename t/{aclocal9.sh => aclocal-I-order-1.sh} (100%)
 rename t/{acloca11.sh => aclocal-I-order-2.sh} (95%)
 rename t/{acloca12.sh => aclocal-I-order-3.sh} (95%)
 rename t/{acloca21.sh => aclocal-comments-respected.sh} (100%)
 rename t/{acloca22b.sh => aclocal-deleted-header-aclocal-amflags.sh} (94%)
 rename t/{acloca22.sh => aclocal-deleted-header.sh} (100%)
 rename t/{aclocal5.sh => aclocal-deps-subdir.sh} (100%)
 rename t/{aclocal4.sh => aclocal-deps.sh} (100%)
 rename t/{acloca14b.sh => aclocal-m4-include-are-scanned-aclocal-amflags.sh} 
(100%)
 rename t/{acloca14.sh => aclocal-m4-include-are-scanned.sh} (100%)
 rename t/{acloca13.sh => aclocal-m4-sinclude.sh} (93%)
 rename t/{aclocal3.sh => aclocal-missing-macros.sh} (100%)
 rename t/{acloca16.sh => aclocal-no-extra-scan.sh} (93%)
 rename t/{aclocal7.sh => aclocal-no-force.sh} (100%)
 rename t/{acloca20.sh => aclocal-no-symlinked-overwrite.sh} (100%)
 rename t/{aclocal8.sh => aclocal-no-unused-required.sh} (100%)
 rename t/{acloca19.sh => aclocal-pr450.sh} (100%)
 rename t/{aclocal6.sh => aclocal-remake-misc.sh} (100%)
 rename t/{acloca15.sh => aclocal-scan-configure-ac-pr319.sh} (100%)
 rename t/{acloca18.sh => aclocal-serial.sh} (100%)
 rename t/{acloca23.sh => aclocal-underquoted-defun.sh} (100%)
 delete mode 100755 t/py-compile-basic2.sh

diff --git a/HACKING b/HACKING
index baa5747..5b725c6 100644
--- a/HACKING
+++ b/HACKING
@@ -253,12 +253,6 @@
   locations.  In case you need to sign with a non-default key, you can
   use "make GNUPLOADFLAGS='--user KEY' git-upload-release".
 
-* Update version number in configure.ac to next alpha number.
-  Re-run ./bootstrap.sh and commit.
-
-* Don't forget to "git push" your changes so they appear in the public
-  git tree.
-
 * For stable releases, update the manuals at www.gnu.org:
   - Generate manuals:
     cd doc
@@ -270,6 +264,12 @@
   - Check for link errors, fix them, recheck until convergence:
     <http://validator.w3.org/checklink>
 
+* Update version number in configure.ac to next alpha number.
+  Re-run ./bootstrap.sh and commit.
+
+* Don't forget to "git push" your changes so they appear in the public
+  git tree.
+
 * Send the announcement at least to <address@hidden> and
   <address@hidden>.  If the release is a stable one, the announcement
   must also go to <address@hidden>; if it is an alpha or beta release,
diff --git a/NEWS b/NEWS
index 7fa94d0..e672ad1 100644
--- a/NEWS
+++ b/NEWS
@@ -150,7 +150,7 @@ New in 1.13:
 
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-New in 1.12.5:
+New in 1.12.6:
 
 * WARNING: Future backward-incompatibilities!
 
@@ -213,6 +213,17 @@ New in 1.12.5:
     giving more useful warnings than a bare "command not found" from a
     make recipe would.
 
+Bugs fixed in 1.12.6:
+
+* Bugs introduced in 1.12.5:
+
+  - The maintainer rebuild rules for Makefiles and aclocal.m4 in Automake's
+    own build system works correctly again.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+New in 1.12.5:
+
 * Vala support:
 
   - The AM_PROG_VALAC macro has been enhanced to takes two further
@@ -237,6 +248,12 @@ New in 1.12.5:
     the error possibly going unnoticed or triggering harder-to-diagnose
     fallout failures in later steps.
 
+* Miscellaneous changes:
+
+  - automake and aclocal no longer honours the 'perllibdir' environment
+    variable.  That had always been intended only as an hack required in
+    the testsuite, not meant for any use beyond that.
+
 Bugs fixed in 1.12.5:
 
 * Long-standing bugs:
@@ -249,6 +266,9 @@ Bugs fixed in 1.12.5:
     finding classic 'libname.a' style libraries when 'name.lib' and
     'name.dll.lib' aren't available.
 
+  - Python byte-compilation supports the new layout mandated by PEP-3147,
+    with its __pycache__ directory (automake bug#8847).
+
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 New in 1.12.4:
diff --git a/aclocal.in b/aclocal.in
index 1098f63..653528a 100644
--- a/aclocal.in
+++ b/aclocal.in
@@ -27,8 +27,9 @@ eval 'case $# in 0) exec @PERL@ -S "$0";; *) exec @PERL@ -S 
"$0" "$@";; esac'
 
 BEGIN
 {
-  my $perllibdir = $ENV{'perllibdir'} || 
'@datadir@/@address@hidden@APIVERSION@';
-  unshift @INC, (split '@PATH_SEPARATOR@', $perllibdir);
+  @Aclocal::perl_libdirs = ('@datadir@/@address@hidden@APIVERSION@')
+    unless @Aclocal::perl_libdirs;
+  unshift @INC, @Aclocal::perl_libdirs;
 }
 
 use strict;
diff --git a/automake.in b/automake.in
index 1b4d375..5820c51 100644
--- a/automake.in
+++ b/automake.in
@@ -29,8 +29,9 @@ package Language;
 
 BEGIN
 {
-  my $perllibdir = $ENV{'perllibdir'} || 
'@datadir@/@address@hidden@APIVERSION@';
-  unshift @INC, (split '@PATH_SEPARATOR@', $perllibdir);
+  @Automake::perl_libdirs = ('@datadir@/@address@hidden@APIVERSION@')
+    unless @Automake::perl_libdirs;
+  unshift @INC, @Automake::perl_libdirs;
 }
 
 use Class::Struct ();
diff --git a/configure.ac b/configure.ac
index 8c19d10..9cd6aeb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -62,16 +62,12 @@ AC_SUBST([amdir], ["\${pkgvdatadir}/am"])
 AC_SUBST([automake_acdir], ["\${datadir}/aclocal-$APIVERSION"])
 AC_SUBST([system_acdir], ["\${datadir}/aclocal"])
 
-# $AUTOMAKE and $ACLOCAL are always run after a "cd $top_srcdir",
-# hence '.' is really what we want for perllibdir, libdir, and acdir.
-# Use '-I' with aclocal so that our own *.m4 files in m4/ gets included,
-# not copied, in aclocal.m4.
-ACLOCAL="\
-  perllibdir=\"`pwd`/lib$PATH_SEPARATOR./lib\" \"`pwd`/aclocal\" \
-  --automake-acdir=m4 --system-acdir=m4/acdir -I m4"
-AUTOMAKE="\
-  perllibdir=\"`pwd`/lib$PATH_SEPARATOR./lib\" \"`pwd`/automake\" \
-  --libdir=lib"
+# Our build system is bootstrapped with the bleeding-edge versions of
+# aclocal and automake, hence the remake rules must use those versions
+# as well.  The extra quoting is to cater to cases when the build
+# directory contains whitespace or shell metacharacters.
+ACLOCAL="\"`pwd`/t/wrap/aclocal-$APIVERSION\""
+AUTOMAKE="\"`pwd`/t/wrap/automake-$APIVERSION\""
 
 AC_PATH_PROG([PERL], [perl])
 if test -z "$PERL"; then
@@ -580,10 +576,10 @@ AC_CONFIG_LINKS([GNUmakefile:GNUmakefile])
 
 AC_CONFIG_FILES([t/wrap/aclocal-${APIVERSION}:t/wrap/aclocal.in],
                 [chmod +x t/wrap/aclocal-${APIVERSION}],
-               [APIVERSION=$APIVERSION])
+                [APIVERSION=$APIVERSION])
 AC_CONFIG_FILES([t/wrap/automake-${APIVERSION}:t/wrap/automake.in],
                 [chmod +x t/wrap/automake-${APIVERSION}],
-               [APIVERSION=$APIVERSION])
+                [APIVERSION=$APIVERSION])
 
 AC_OUTPUT
 
@@ -601,7 +597,8 @@ am_release_type=`AS_ECHO(["$PACKAGE_VERSION"]) | LC_ALL=C 
awk ["
   /^$am_beta_version_rx$/ { print \"beta version\"; exit(0); }
   { print \"development snapshot\"; }"]`
 
-test "$am_release_type" = stable || cat <<EOF
+# '$silent' is set to yes if configure is passed the '--quiet' option.
+test "$am_release_type" = stable || test "$silent" = yes || cat <<EOF
 
 WARNING: You are about to use a $am_release_type of Automake-NG.
 WARNING: It might easily suffer from new bugs or regressions.
diff --git a/lib/am/python.am b/lib/am/python.am
index fb5ae50..3be4be5 100644
--- a/lib/am/python.am
+++ b/lib/am/python.am
@@ -79,11 +79,15 @@ if %?INSTALL%
 uninstall-%DIR%PYTHON:
        @$(NORMAL_UNINSTALL)
        $(call am.uninst.cmd,$(%NDIR%dir), \
-         $(foreach i,\
-?BASE?     $(notdir $(%DIR%_PYTHON)), \
-?!BASE?            $(patsubst $(srcdir)/%,%,$(%DIR%_PYTHON)), \
-## Also remove the '.pyc' and '.py'o byte-compiled versions.
-             $(i) $(i)c $(i)o))
+         $(strip $(foreach i, $(patsubst %.py,%, \
+?BASE?     $(notdir $(%DIR%_PYTHON))), \
+?!BASE?            $(patsubst $(srcdir)/%,%,$(%DIR%_PYTHON))), \
+             $i.py \
+## Also remove the '.pyc' and '.pyo' byte-compiled versions, catering
+## to PEP-3147.   Note that installation of '.py' files is *not*
+## influenced by that PEP.
+             $(foreach e, pyc pyo, \
+               $i.$e $(dir $i)__pycache__/$(notdir $i).*.$e))))
 endif %?INSTALL%
 
 
diff --git a/lib/config.sub b/lib/config.sub
index 826e4c6..89b1286 100755
--- a/lib/config.sub
+++ b/lib/config.sub
@@ -259,8 +259,10 @@ case $basic_machine in
        | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
        | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | 
alpha64pca5[67] \
        | am33_2.0 \
-       | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | 
avr32 \
-        | be32 | be64 \
+       | arc \
+       | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
+       | avr | avr32 \
+       | be32 | be64 \
        | bfin \
        | c4x | clipper \
        | d10v | d30v | dlx | dsp16xx \
diff --git a/lib/py-compile b/lib/py-compile
index d712811..8a564cc 100755
--- a/lib/py-compile
+++ b/lib/py-compile
@@ -116,7 +116,7 @@ else
 fi
 
 $PYTHON -c "
-import sys, os, py_compile
+import sys, os, py_compile, imp
 
 files = '''$files'''
 
@@ -129,12 +129,19 @@ for file in files.split():
            continue
     sys.stdout.write(file)
     sys.stdout.flush()
-    py_compile.compile(filepath, filepath + 'c', path)
+    if hasattr(imp, 'get_tag'):
+        py_compile.compile(filepath, imp.cache_from_source(filepath), path)
+    else:
+        py_compile.compile(filepath, filepath + 'c', path)
 sys.stdout.write('\n')" || exit $?
 
 # this will fail for python < 1.5, but that doesn't matter ...
 $PYTHON -O -c "
-import sys, os, py_compile
+import sys, os, py_compile, imp
+
+# pypy does not use .pyo optimization
+if hasattr(sys, 'pypy_translation_info'):
+    sys.exit(0)
 
 files = '''$files'''
 sys.stdout.write('Byte-compiling python modules (optimized versions) ...\n')
@@ -146,7 +153,10 @@ for file in files.split():
            continue
     sys.stdout.write(file)
     sys.stdout.flush()
-    py_compile.compile(filepath, filepath + 'o', path)
+    if hasattr(imp, 'get_tag'):
+        py_compile.compile(filepath, imp.cache_from_source(filepath, False), 
path)
+    else:
+        py_compile.compile(filepath, filepath + 'o', path)
 sys.stdout.write('\n')" 2>/dev/null || :
 
 # Local Variables:
diff --git a/lib/texinfo.tex b/lib/texinfo.tex
index f3093d0..b5f3141 100644
--- a/lib/texinfo.tex
+++ b/lib/texinfo.tex
@@ -3,7 +3,7 @@
 % Load plain if necessary, i.e., if running under initex.
 \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
 %
-\def\texinfoversion{2012-09-12.16}
+\def\texinfoversion{2012-11-08.11}
 %
 % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
 % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
@@ -6559,16 +6559,9 @@ end
 \makedispenvdef{quotation}{\quotationstart}
 %
 \def\quotationstart{%
-  {\parskip=0pt \aboveenvbreak}% because \aboveenvbreak inserts \parskip
-  \parindent=0pt
-  %
-  % @cartouche defines \nonarrowing to inhibit narrowing at next level down.
+  \indentedblockstart % same as \indentedblock, but increase right margin too.
   \ifx\nonarrowing\relax
-    \advance\leftskip by \lispnarrowing
     \advance\rightskip by \lispnarrowing
-    \exdentamount = \lispnarrowing
-  \else
-    \let\nonarrowing = \relax
   \fi
   \parsearg\quotationlabel
 }
@@ -6594,6 +6587,32 @@ end
   \fi
 }
 
+% @indentedblock is like @quotation, but indents only on the left and
+% has no optional argument.
+% 
+\makedispenvdef{indentedblock}{\indentedblockstart}
+%
+\def\indentedblockstart{%
+  {\parskip=0pt \aboveenvbreak}% because \aboveenvbreak inserts \parskip
+  \parindent=0pt
+  %
+  % @cartouche defines \nonarrowing to inhibit narrowing at next level down.
+  \ifx\nonarrowing\relax
+    \advance\leftskip by \lispnarrowing
+    \exdentamount = \lispnarrowing
+  \else
+    \let\nonarrowing = \relax
+  \fi
+}
+
+% Keep a nonzero parskip for the environment, since we're doing normal filling.
+%
+\def\Eindentedblock{%
+  \par
+  {\parskip=0pt \afterenvbreak}%
+}
+\def\Esmallindentedblock{\Eindentedblock}
+
 
 % LaTeX-like @address@hidden verbatim and @verb{<char>...<char>}
 % If we want to allow any <char> as delimiter,
diff --git a/m4/python.m4 b/m4/python.m4
index a247818..50213a9 100644
--- a/m4/python.m4
+++ b/m4/python.m4
@@ -37,7 +37,7 @@ AC_DEFUN([AM_PATH_PYTHON],
   dnl Find a Python interpreter.  Python versions prior to 2.0 are not
   dnl supported. (2.0 was released on October 16, 2000).
   m4_define_default([_AM_PYTHON_INTERPRETER_LIST],
-[python python2 python3 python3.2 python3.1 python3.0 python2.7 dnl
+[python python2 python3 python3.3 python3.2 python3.1 python3.0 python2.7 dnl
  python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0])
 
   AC_ARG_VAR([PYTHON], [the Python interpreter])
diff --git a/syntax-checks.mk b/syntax-checks.mk
index c6d5521..bc2faf8 100644
--- a/syntax-checks.mk
+++ b/syntax-checks.mk
@@ -45,7 +45,6 @@ syntax_check_rules = \
 $(sc_tests_plain_check_rules) \
 sc_diff_automake \
 sc_diff_aclocal \
-sc_perl_syntax \
 sc_no_brace_variable_expansions \
 sc_rm_minus_f \
 sc_no_for_variable_in_macro \
@@ -92,10 +91,10 @@ sc_at_in_texi
 
 ## These check avoids accidental configure substitutions in the source.
 ## There are exactly 8 lines that should be modified from automake.in to
-## automake, and 10 lines that should be modified from aclocal.in to
+## automake, and 9 lines that should be modified from aclocal.in to
 ## aclocal.
-automake_diff_no = 8
-aclocal_diff_no = 10
+automake_diff_no = 7
+aclocal_diff_no = 9
 sc_diff_automake sc_diff_aclocal: sc_diff_% :
        @set +e; tmp=$*-diffs.tmp; \
         diff -u $(srcdir)/$*.in $* > $$tmp; test $$? -eq 1 || exit 1; \
@@ -111,11 +110,6 @@ sc_diff_automake sc_diff_aclocal: sc_diff_% :
          } >&1; \
        rm -f $$tmp
 
-## Syntax check with default Perl (on my machine, Perl 5).
-sc_perl_syntax:
-       @perllibdir="./lib$(PATH_SEPARATOR)$(srcdir)/lib" $(PERL) -c -w automake
-       @perllibdir="./lib$(PATH_SEPARATOR)$(srcdir)/lib" $(PERL) -c -w aclocal
-
 ## Expect no instances of '${...}'.  However, $${...} is ok, since that
 ## is a shell construct, not a Makefile construct.
 sc_no_brace_variable_expansions:
diff --git a/t/aclocal9.sh b/t/aclocal-I-order-1.sh
similarity index 100%
rename from t/aclocal9.sh
rename to t/aclocal-I-order-1.sh
diff --git a/t/acloca11.sh b/t/aclocal-I-order-2.sh
similarity index 95%
rename from t/acloca11.sh
rename to t/aclocal-I-order-2.sh
index f24d4ed..721b8ec 100755
--- a/t/acloca11.sh
+++ b/t/aclocal-I-order-2.sh
@@ -16,6 +16,7 @@
 
 # Make sure that when two files define the same macro in the same
 # directory, the macro from the lexically greatest file is used.
+# See also sister test 'aclocal-I-ordering-2.sh'.
 
 am_create_testdir=empty
 . test-init.sh
diff --git a/t/acloca12.sh b/t/aclocal-I-order-3.sh
similarity index 95%
rename from t/acloca12.sh
rename to t/aclocal-I-order-3.sh
index d0d4016..c98841b 100755
--- a/t/acloca12.sh
+++ b/t/aclocal-I-order-3.sh
@@ -16,7 +16,7 @@
 
 # Make sure that when two files define the same macro in the same
 # directory, the macro from the lexically greatest file is used.
-# Same as acloca11.sh, but without calling MACRO2.
+# Same as acloca-I-ordering.sh, but without calling MACRO2.
 
 am_create_testdir=empty
 . test-init.sh
diff --git a/t/acloca21.sh b/t/aclocal-comments-respected.sh
similarity index 100%
rename from t/acloca21.sh
rename to t/aclocal-comments-respected.sh
diff --git a/t/acloca22b.sh b/t/aclocal-deleted-header-aclocal-amflags.sh
similarity index 94%
rename from t/acloca22b.sh
rename to t/aclocal-deleted-header-aclocal-amflags.sh
index f280699..ea47635 100755
--- a/t/acloca22b.sh
+++ b/t/aclocal-deleted-header-aclocal-amflags.sh
@@ -17,7 +17,8 @@
 # Make sure the "deleted header file" issue is fixed wrt. aclocal.m4
 # dependencies.
 # NOTE: this test works by using the obsolete 'ACLOCAL_AMFLAGS' make
-# variable; see sister test 'acloca22.test' for a modern equivalent.
+# variable; see sister test 'aclocal-deleted-header.sh' for a modern
+# equivalent.
 
 . test-init.sh
 
diff --git a/t/acloca22.sh b/t/aclocal-deleted-header.sh
similarity index 100%
rename from t/acloca22.sh
rename to t/aclocal-deleted-header.sh
diff --git a/t/aclocal5.sh b/t/aclocal-deps-subdir.sh
similarity index 100%
rename from t/aclocal5.sh
rename to t/aclocal-deps-subdir.sh
diff --git a/t/aclocal4.sh b/t/aclocal-deps.sh
similarity index 100%
rename from t/aclocal4.sh
rename to t/aclocal-deps.sh
diff --git a/t/acloca14b.sh 
b/t/aclocal-m4-include-are-scanned-aclocal-amflags.sh
similarity index 100%
rename from t/acloca14b.sh
rename to t/aclocal-m4-include-are-scanned-aclocal-amflags.sh
diff --git a/t/acloca14.sh b/t/aclocal-m4-include-are-scanned.sh
similarity index 100%
rename from t/acloca14.sh
rename to t/aclocal-m4-include-are-scanned.sh
diff --git a/t/acloca13.sh b/t/aclocal-m4-sinclude.sh
similarity index 93%
rename from t/acloca13.sh
rename to t/aclocal-m4-sinclude.sh
index cb4c8f6..e7e7e96 100755
--- a/t/acloca13.sh
+++ b/t/aclocal-m4-sinclude.sh
@@ -18,8 +18,11 @@
 
 . test-init.sh
 
-cat >> configure.ac << 'END'
+cat > configure.ac << 'END'
+AC_INIT([m4sinclude], [1.0])
+AM_INIT_AUTOMAKE
 m4_include([somefile.m4])
+AC_CONFIG_FILES([Makefile])
 AC_OUTPUT
 END
 
diff --git a/t/aclocal3.sh b/t/aclocal-missing-macros.sh
similarity index 100%
rename from t/aclocal3.sh
rename to t/aclocal-missing-macros.sh
diff --git a/t/acloca16.sh b/t/aclocal-no-extra-scan.sh
similarity index 93%
rename from t/acloca16.sh
rename to t/aclocal-no-extra-scan.sh
index 8387439..34f66b1 100755
--- a/t/acloca16.sh
+++ b/t/aclocal-no-extra-scan.sh
@@ -21,6 +21,7 @@ am_create_testdir=empty
 . test-init.sh
 
 cat > configure.ac << 'END'
+AC_INIT([x], [0])
 AC_SUBST([POM])
 END
 
@@ -31,6 +32,6 @@ AC_DEFUN([AM_SOME_MACRO],
 EOF
 
 $ACLOCAL -I m4
-grep m4/some.m4 aclocal.m4 && exit 1
+$EGREP 'some.m4|GREPME' aclocal.m4 && exit 1
 
 :
diff --git a/t/aclocal7.sh b/t/aclocal-no-force.sh
similarity index 100%
rename from t/aclocal7.sh
rename to t/aclocal-no-force.sh
diff --git a/t/acloca20.sh b/t/aclocal-no-symlinked-overwrite.sh
similarity index 100%
rename from t/acloca20.sh
rename to t/aclocal-no-symlinked-overwrite.sh
diff --git a/t/aclocal8.sh b/t/aclocal-no-unused-required.sh
similarity index 100%
rename from t/aclocal8.sh
rename to t/aclocal-no-unused-required.sh
diff --git a/t/acloca19.sh b/t/aclocal-pr450.sh
similarity index 100%
rename from t/acloca19.sh
rename to t/aclocal-pr450.sh
diff --git a/t/aclocal6.sh b/t/aclocal-remake-misc.sh
similarity index 100%
rename from t/aclocal6.sh
rename to t/aclocal-remake-misc.sh
diff --git a/t/acloca15.sh b/t/aclocal-scan-configure-ac-pr319.sh
similarity index 100%
rename from t/acloca15.sh
rename to t/aclocal-scan-configure-ac-pr319.sh
diff --git a/t/acloca18.sh b/t/aclocal-serial.sh
similarity index 100%
rename from t/acloca18.sh
rename to t/aclocal-serial.sh
diff --git a/t/acloca23.sh b/t/aclocal-underquoted-defun.sh
similarity index 100%
rename from t/acloca23.sh
rename to t/aclocal-underquoted-defun.sh
diff --git a/t/ax/am-test-lib.sh b/t/ax/am-test-lib.sh
index e1b3c02..2ff8283 100644
--- a/t/ax/am-test-lib.sh
+++ b/t/ax/am-test-lib.sh
@@ -333,6 +333,65 @@ fetch_tap_driver ()
 # use the perl implementation by default for the moment.
 am_tap_implementation=${am_tap_implementation-shell}
 
+# $PYTHON and support for PEP-3147.  Needed to check our python-related
+# install rules.
+python_has_pep3147 ()
+{
+  if test -z "$am_pep3147_tag"; then
+    am_pep3147_tag=$($PYTHON -c 'import imp; print(imp.get_tag())') \
+      || am_pep3147_tag=none
+  fi
+  test $am_pep3147_tag != none
+}
+am_pep3147_tag=
+
+# pyc_location [-p] [FILE]
+# ------------------------
+# Determine what the actual location of the given '.pyc' or '.pyo'
+# byte-compiled file should be, taking into account PEP-3147.  Save
+# the location in the '$am_pyc_file' variable.  If the '-p' option
+# is given, print the location on the standard output as well.
+pyc_location ()
+{
+  case $#,$1 in
+    2,-p) am_pyc_print=yes; shift;;
+     1,*) am_pyc_print=no;;
+       *) fatal_ "pyc_location: invalid usage";;
+  esac
+  if python_has_pep3147; then
+    case $1 in
+      */*) am_pyc_dir=${1%/*} am_pyc_base=${1##*/};;
+        *) am_pyc_dir=. am_pyc_base=$1;;
+    esac
+    am_pyc_ext=${am_pyc_base##*.}
+    am_pyc_base=${am_pyc_base%.py?}
+    
am_pyc_file=$am_pyc_dir/__pycache__/$am_pyc_base.$am_pep3147_tag.$am_pyc_ext
+  else
+    am_pyc_file=$1
+  fi
+  test $am_pyc_print = no || printf '%s\n' "$am_pyc_file"
+}
+
+# py_installed [--not] FILE
+# --------------------------
+# Check that the given python FILE has been installed (resp. *not*
+# installed, if the '--not' option is specified).  If FILE is a
+# byte-compiled '.pyc' file, the new installation layout specified
+# by PEP-3147 will be taken into account.
+py_installed ()
+{
+  case $#,$1 in
+        1,*) am_test_py_file='test -f';;
+    2,--not) am_test_py_file='test ! -e'; shift;;
+          *) fatal_ "pyc_installed: invalid usage";;
+  esac
+  case $1 in
+    *.py[co]) pyc_location "$1"; am_target_py_file=$am_pyc_file;;
+           *) am_target_py_file=$1;;
+  esac
+  $am_test_py_file "$am_target_py_file"
+}
+
 # Usage: require_compiler_ {cc|c++|fortran|fortran77}
 require_compiler_ ()
 {
@@ -526,9 +585,10 @@ require_tool ()
       ! cross_compiling || skip_all_ "doesn't work in cross-compile mode"
       ;;
     python)
-      # Python doesn't support --version, it has -V
-      echo "$me: running python -V"
-      python -V || skip_all_ "python interpreter not available"
+      PYTHON=${PYTHON-python}
+      # Older python versions don't support --version, they have -V.
+      echo "$me: running $PYTHON -V"
+      $PYTHON -V || skip_all_ "python interpreter not available"
       ;;
     ro-dir)
       # Skip this test case if read-only directories aren't supported
diff --git a/t/lex-header.sh b/t/lex-header.sh
index a684889..c6b53f5 100755
--- a/t/lex-header.sh
+++ b/t/lex-header.sh
@@ -20,6 +20,12 @@
 required='cc flex'
 . test-init.sh
 
+# Here, we need to use the use flex option '--header-file', but some
+# older flex versions don't support is (see automake bug#11524 and
+# bug#12836).  Skip this test if such an old flex version is detected.
+$LEX --help | grep '.*--header-file' \
+  || skip_ "flex doesn't support the --header-file' option"
+
 cat >> configure.ac << 'END'
 AC_PROG_CC
 AC_PROG_LEX
diff --git a/t/nobase-python.sh b/t/nobase-python.sh
index d38c695..de640f3 100755
--- a/t/nobase-python.sh
+++ b/t/nobase-python.sh
@@ -28,21 +28,31 @@ cat > Makefile.am <<'END'
 mydir=$(prefix)/my
 my_PYTHON = one.py sub/base.py
 nobase_my_PYTHON = two.py sub/nobase.py
-
-test-install-data: install-data
-       find inst -print # For debugging.
-       test   -f inst/my/one.py
-       test   -f inst/my/one.pyc
-       test   -f inst/my/two.py
-       test   -f inst/my/two.pyc
-       test   -f inst/my/base.py
-       test   -f inst/my/base.pyc
-       test   -f inst/my/sub/nobase.py
-       test   -f inst/my/sub/nobase.pyc
-       test ! -f inst/my/nobase.py
-       test ! -f inst/my/nobase.pyc
 END
 
+test_install()
+{
+  $MAKE install-data
+  find inst -print # For debugging.
+  py_installed inst/my/one.py
+  py_installed inst/my/one.pyc
+  py_installed inst/my/two.py
+  py_installed inst/my/two.pyc
+  py_installed inst/my/base.py
+  py_installed inst/my/base.pyc
+  py_installed inst/my/sub/nobase.py
+  py_installed inst/my/sub/nobase.pyc
+  py_installed --not inst/my/nobase.py
+  py_installed --not inst/my/nobase.pyc
+}
+
+test_uninstall()
+{
+  $MAKE uninstall
+  test -d inst/my
+  ! find inst/my -type f -print | grep .
+}
+
 mkdir sub
 
 for file in one.py sub/base.py two.py sub/nobase.py; do
@@ -56,23 +66,19 @@ $AUTOMAKE --add-missing
 ./configure --prefix "$(pwd)/inst" --program-prefix=p
 
 $MAKE
-$MAKE test-install-data
-$MAKE uninstall
-
-find inst/my -type f -print | grep . && exit 1
+test_install
+test_uninstall
 
 $MAKE install-strip
+test_uninstall
 
 # Likewise, in a VPATH build.
 
-$MAKE uninstall
 $MAKE distclean
 mkdir build
 cd build
 ../configure --prefix "$(pwd)/inst" --program-prefix=p
-$MAKE
-$MAKE test-install-data
-$MAKE uninstall
-find inst/my -type f -print | grep . && exit 1
+test_install
+test_uninstall
 
 :
diff --git a/t/py-compile-basedir.sh b/t/py-compile-basedir.sh
index 8abad87..05e1159 100755
--- a/t/py-compile-basedir.sh
+++ b/t/py-compile-basedir.sh
@@ -38,13 +38,17 @@ for d in foo foo/bar "$(pwd)/foo" . .. ../foo ''; do
   : > "$d2/$f.py"
   : > "$d2/sub/$f.py"
   ./py-compile --basedir "$d" "$f.py" "sub/$f.py"
-  ls -l "$d2" "$d2/sub" # For debugging.
-  test -f "$d2/$f.pyc"
-  test -f "$d2/$f.pyo"
-  test -f "$d2/sub/$f.pyc"
-  test -f "$d2/sub/$f.pyo"
-  rm -f "$d2/$f.pyc" "$d2/$f.pyo" "$d2/sub/$f.pyc" "$d2/sub/$f.pyo"
-  find . | grep '\.py[co]$' && exit 1
+  find "$d2" # For debugging.
+  py_installed "$d2/$f.pyc"
+  py_installed "$d2/$f.pyo"
+  py_installed "$d2/sub/$f.pyc"
+  py_installed "$d2/sub/$f.pyo"
+  files=$(find "$d2" | grep '\.py[co]$')
+  test $(echo "$files" | wc -l) -eq 4
+  case $d2 in
+    .|..) rm -f $files;;
+       *) rm -rf "$d2";;
+  esac
 done
 
 :
diff --git a/t/py-compile-basic.sh b/t/py-compile-basic.sh
index d80ef89..d846c1e 100755
--- a/t/py-compile-basic.sh
+++ b/t/py-compile-basic.sh
@@ -46,7 +46,8 @@ class Foo:
 bar = baz = (1, (2,), [3, 4]); zardoz = 0;
 END
 
-cat > bar.py <<'END'
+mkdir sub
+cat > sub/bar.py <<'END'
 # Import of non-existent modules, or assertion of false conditions,
 # shouldn't cause problems, as it should be enough for the code to
 # be syntactically correct.
@@ -54,10 +55,16 @@ import Automake.No.Such.Module
 assert False
 END
 
-./py-compile foo.py bar.py
-test -f foo.pyc
-test -f foo.pyo
-test -f bar.pyc
-test -f bar.pyo
+# An empty file in a more deeply-nested directory should be ok as well.
+mkdir -p 1/_/2/_/3/_
+: > 1/_/2/_/3/_/0.py
+
+./py-compile foo.py sub/bar.py 1/_/2/_/3/_/0.py
+py_installed foo.pyc
+py_installed foo.pyo
+py_installed sub/bar.pyc
+py_installed sub/bar.pyo
+py_installed 1/_/2/_/3/_/0.pyc
+py_installed 1/_/2/_/3/_/0.pyo
 
 :
diff --git a/t/py-compile-basic2.sh b/t/py-compile-basic2.sh
deleted file mode 100755
index 8100e98..0000000
--- a/t/py-compile-basic2.sh
+++ /dev/null
@@ -1,70 +0,0 @@
-#! /bin/sh
-# 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
-# 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 more basic functionalities of the 'py-compile' script, with
-# dummy python sources, but more complex directory layouts.  See also
-# related test 'py-compile-basic.sh'.
-
-required=python
-. test-init.sh
-
-ocwd=$(pwd) || fatal_ "getting current working directory"
-
-pyfiles="
-  foo.py
-  ./foo1.py
-  ../foo2.py
-  ../dir/foo3.py
-  $ocwd/foo4.py
-  sub/bar.py
-  sub/subsub/barbar.py
-  __init__.py
-  sub/__init__.py
-  1.py
-  .././_.py
-"
-
-lst='
-  dir/foo
-  dir/foo1
-  foo2
-  dir/foo3
-  foo4
-  dir/sub/bar
-  dir/sub/subsub/barbar
-  dir/__init__
-  dir/sub/__init__
-  dir/1
-  _
-'
-
-mkdir dir
-cd dir
-cp "$am_scriptdir/py-compile" . \
-  || fatal_ "failed to fetch auxiliary script py-compile"
-mkdir sub sub/subsub
-touch $pyfiles
-./py-compile $pyfiles
-cd "$ocwd"
-
-for x in $lst; do echo $x.pyc; echo $x.pyo; done | sort > exp
-find . -name '*.py[co]' | sed 's|^\./||' | sort > got
-
-cat exp
-cat got
-diff exp got
-
-:
diff --git a/t/py-compile-destdir.sh b/t/py-compile-destdir.sh
index 71f3f7a..c26175f 100755
--- a/t/py-compile-destdir.sh
+++ b/t/py-compile-destdir.sh
@@ -1,4 +1,4 @@
-#! /bin/sh
+    #! /bin/sh
 # Copyright (C) 2011-2012 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
@@ -31,13 +31,17 @@ echo 'def foo (): return "foo"' > $destdir/foo.py
 echo 'def bar (): return "bar"' > $destdir/sub/bar.py
 
 ./py-compile --destdir $destdir foo.py sub/bar.py
-ls -l $destdir $destdir/sub # For debugging.
-ls . sub | grep '\.py[co]$' && exit 1
-test -f $destdir/foo.pyc
-test -f $destdir/foo.pyo
-test -f $destdir/sub/bar.pyc
-test -f $destdir/sub/bar.pyo
-strings $destdir/*.py[co] $destdir/sub/*.py[co] || : # For debugging.
-$FGREP $destdir $destdir/*.py[co] $destdir/sub/*.py[co] && exit 1
+
+find $destdir # For debugging.
+st=0
+for x in c o; do
+  for b in foo sub/bar; do
+    f=$(pyc_location -p "$destdir/$b.py$x")
+    test -f "$f"
+    strings "$f" || : # For debugging.
+    $FGREP $destdir $f && { echo BAD: $f; st=1; }
+  done
+done
+exit $st
 
 :
diff --git a/t/py-compile-option-terminate.sh b/t/py-compile-option-terminate.sh
index 9af5e13..a14c5ad 100755
--- a/t/py-compile-option-terminate.sh
+++ b/t/py-compile-option-terminate.sh
@@ -26,18 +26,18 @@ cp "$am_scriptdir/py-compile" . \
 : > ./-o.py
 : > ./--foo.py
 ./py-compile -- -o.py --foo.py
-test -f ./-o.pyc
-test -f ./-o.pyo
-test -f ./--foo.pyc
-test -f ./--foo.pyo
+py_installed ./-o.pyc
+py_installed ./-o.pyo
+py_installed ./--foo.pyc
+py_installed ./--foo.pyo
 rm -f ./-*.py[co]
 : > x.py
 ./py-compile x.py -o.py --foo.py
-test -f ./x.pyc
-test -f ./x.pyo
-test -f ./-o.pyc
-test -f ./-o.pyo
-test -f ./--foo.pyc
-test -f ./--foo.pyo
+py_installed ./x.pyc
+py_installed ./x.pyo
+py_installed ./-o.pyc
+py_installed ./-o.pyo
+py_installed ./--foo.pyc
+py_installed ./--foo.pyo
 
 :
diff --git a/t/python-pr10995.sh b/t/python-pr10995.sh
index 4075a37..60ebd67 100755
--- a/t/python-pr10995.sh
+++ b/t/python-pr10995.sh
@@ -46,10 +46,10 @@ test -f py-compile
 
 ./configure --prefix="$(pwd)/inst"
 $MAKE install
-test -f inst/py/yes.py
-test -f inst/py/yes.pyc
-test ! -e inst/py/no.py
-test ! -e inst/py/no.pyc
+test -f            inst/py/yes.py
+test ! -e          inst/py/no.py
+py_installed       inst/py/yes.pyc
+py_installed --not inst/py/no.pyc
 
 $MAKE disttest
 
diff --git a/t/python-too-old.sh b/t/python-too-old.sh
index 24ee584..e7d9234 100755
--- a/t/python-too-old.sh
+++ b/t/python-too-old.sh
@@ -34,6 +34,7 @@ py_too_old ()
   grep '[Pp]ython interpreter is too old' stderr
 }
 
+saved_PYTHON=$PYTHON; export saved_PYTHON
 PYTHON=; unset PYTHON
 
 cat > configure.ac <<END
@@ -50,7 +51,7 @@ py_too_old python
 mkdir bin
 cat > bin/my-python << 'END'
 #! /bin/sh
-exec python ${1+"$@"}
+exec $saved_PYTHON ${1+"$@"}
 END
 chmod a+x bin/my-python
 PATH=$(pwd)/bin$PATH_SEPARATOR$PATH
diff --git a/t/python-vars.sh b/t/python-vars.sh
index eec07ae..24d274d 100755
--- a/t/python-vars.sh
+++ b/t/python-vars.sh
@@ -23,8 +23,6 @@ required=python
 # In case the user's config.site defines pythondir or pyexecdir.
 CONFIG_SITE=/dev/null; export CONFIG_SITE
 
-PYTHON=python
-
 # Update the definition below if the documentation changes.
 # Note that the value of the 'pythondir' and 'pyexecdir' variables can
 # vary among different python installations, so we need more relaxed
diff --git a/t/python-virtualenv.sh b/t/python-virtualenv.sh
index e16ee2b..dad88a6 100755
--- a/t/python-virtualenv.sh
+++ b/t/python-virtualenv.sh
@@ -23,9 +23,11 @@ required='cc python virtualenv'
 # In case the user's config.site defines pythondir or pyexecdir.
 CONFIG_SITE=/dev/null; export CONFIG_SITE
 
+py_version_pre=$($PYTHON -V)
+
 # Skip the test if a proper virtualenv cannot be created.
-virtualenv --verbose virtenv && test -f virtenv/bin/activate \
-  || skip_ "coulnd't create python virtual environment"
+virtualenv -p"$PYTHON" --verbose virtenv && py_installed virtenv/bin/activate \
+  || skip_ "couldn't create python virtual environment"
 
 # Activate the virtualenv.
 . ./virtenv/bin/activate
@@ -34,16 +36,29 @@ if test -z "$VIRTUAL_ENV"; then
   framework_failure_ "can't activate python virtual environment"
 fi
 
+py_version_post=$(python -V)
+
+# Sanity check.
+test "$py_version_pre" = "$py_version_post"
+
 cwd=$(pwd) || fatal_ "getting current working directory"
 py_version=$(python -c 'import sys; print("%u.%u" % 
tuple(sys.version_info[:2]))')
 py_site=$VIRTUAL_ENV/lib/python$py_version/site-packages
 
+# We need to do do this early, just to set some cache variables properly,
+# since because we're going to unset $PYTHON next.
+if python_has_pep3147; then
+  : PEP 3147 will be used in installation of ".pyc" files
+fi
+# We don't want our original python to be picked up by configure
+# invocations.
+unset PYTHON
+
 # We need control over the package name.
 cat > configure.ac << END
 AC_INIT([am_virtenv], [1.0])
 AM_INIT_AUTOMAKE
 AC_CONFIG_FILES([Makefile])
-AC_SUBST([MY_VIRTENV], ['$cwd/virtenv'])
 AC_PROG_CC
 AM_PROG_AR
 AC_PROG_RANLIB
@@ -59,9 +74,7 @@ libquux_a_SOURCES = foo.c
 pkgpyexec_LIBRARIES = libzardoz.a
 libzardoz_a_SOURCES = foo.c
 
-py_site = $(MY_VIRTENV)/lib/python$(PYTHON_VERSION)/site-packages
-
-.PYTHON: debug test-run test-install test-uninstall
+.PYTHON: debug test-run
 debug:
        @echo PYTHON: $(PYTHON)
        @echo PYTHON_VERSION: $(PYTHON_VERSION)
@@ -85,24 +98,6 @@ test-run:
        ## available.
        python -c 'from am_foo import foo_func; assert (foo_func () == 12345)'
        python -c 'from am_virtenv import old_am; assert (old_am () == 
"AutoMake")'
-test-install:
-       test -f $(py_site)/am_foo.py
-       test -f $(py_site)/am_foo.pyc
-       test -f $(py_site)/am_foo.pyo
-       test -f $(py_site)/am_virtenv/__init__.py
-       test -f $(py_site)/am_virtenv/__init__.pyc
-       test -f $(py_site)/am_virtenv/__init__.pyo
-       test -f $(py_site)/libquux.a
-       test -f $(py_site)/am_virtenv/libzardoz.a
-test-uninstall:
-       test ! -f $(py_site)/am_foo.py
-       test ! -f $(py_site)/am_foo.pyc
-       test ! -f $(py_site)/am_foo.pyo
-       test ! -f $(py_site)/am_virtenv/__init__.py
-       test ! -f $(py_site)/am_virtenv/__init__.pyc
-       test ! -f $(py_site)/am_virtenv/__init__.pyo
-       test ! -f $(py_site)/libquux.a
-       test ! -f $(py_site)/am_virtenv/libzardoz.a
 all-local: debug
 END
 
@@ -123,6 +118,34 @@ int foo (void)
 }
 END
 
+check_install ()
+{
+  $MAKE install ${1+"$@"}
+
+  test -f      "$py_site"/am_foo.py
+  py_installed "$py_site"/am_foo.pyc
+  py_installed "$py_site"/am_foo.pyo
+  py_installed "$py_site"/am_virtenv/__init__.py
+  py_installed "$py_site"/am_virtenv/__init__.pyc
+  py_installed "$py_site"/am_virtenv/__init__.pyo
+  test -f      "$py_site"/libquux.a
+  test -f      "$py_site"/am_virtenv/libzardoz.a
+}
+
+check_uninstall ()
+{
+  $MAKE uninstall ${1+"$@"}
+
+  test ! -e          "$py_site"/am_foo.py
+  py_installed --not "$py_site"/am_foo.pyc
+  py_installed --not "$py_site"/am_foo.pyo
+  test ! -e          "$py_site"/am_virtenv/__init__.py
+  py_installed --not "$py_site"/am_virtenv/__init__.pyc
+  py_installed --not "$py_site"/am_virtenv/__init__.pyo
+  test ! -e          "$py_site"/libquux.a
+  test ! -e          "$py_site"/am_virtenv/libzardoz.a
+}
+
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE --add-missing
@@ -131,47 +154,35 @@ $AUTOMAKE --add-missing
 mkdir build
 cd build
 ../configure --prefix="$VIRTUAL_ENV"
-$MAKE install
-$MAKE test-install
+check_install
 $MAKE test-run
-$MAKE uninstall
-$MAKE test-uninstall
+check_uninstall
 cd ..
 
 # Try an in-tree build.
 ./configure --prefix="$VIRTUAL_ENV"
-$MAKE install
-$MAKE test-install
+check_install
 $MAKE test-run
-$MAKE uninstall
-$MAKE test-uninstall
+check_uninstall
 
 $MAKE distclean
 
 # Overriding pythondir and pyexecdir with cache variables should work.
 ./configure am_cv_python_pythondir="$py_site" \
             am_cv_python_pyexecdir="$py_site"
-$MAKE install
-$MAKE test-install
+check_install
 $MAKE test-run
-$MAKE uninstall
-$MAKE test-uninstall
+check_uninstall
 
 $MAKE distclean
 
 # Overriding pythondir and pyexecdir at make time should be enough.
 ./configure --prefix="$cwd/bad-prefix"
 
-xMAKE () { $MAKE pythondir="$py_site" pyexecdir="$py_site" "$@"; }
-
-export pythondir pyexecdir
-xMAKE install
+check_install pythondir="$py_site" pyexecdir="$py_site"
 test ! -e bad-prefix
-xMAKE test-install
-xMAKE test-run
-xMAKE uninstall
-xMAKE test-uninstall
-unset pythondir pyexecdir
+$MAKE test-run pythondir="$py_site" pyexecdir="$py_site"
+check_uninstall pythondir="$py_site" pyexecdir="$py_site"
 
 # Also check that the distribution is self-contained, for completeness.
 $MAKE distcheck
diff --git a/t/python10.sh b/t/python10.sh
index c4a0ab4..9ee8cad 100755
--- a/t/python10.sh
+++ b/t/python10.sh
@@ -58,29 +58,29 @@ cwd=$(pwd) || fatal_ "getting current working directory"
 
 ../configure --prefix="$cwd/$inst" one=0
 $MAKE install
-test -f "$inst/your/two.py"
-test -f "$inst/your/two.pyc"
-test -f "$inst/your/two.pyo"
-test ! -e "$inst/my/one.py"
-test ! -e "$inst/my/one.pyc"
-test ! -e "$inst/my/one.pyo"
+test -f            "$inst/your/two.py"
+py_installed       "$inst/your/two.pyc"
+py_installed       "$inst/your/two.pyo"
+py_installed --not "$inst/my/one.py"
+py_installed --not "$inst/my/one.pyc"
+py_installed --not "$inst/my/one.pyo"
 $MAKE uninstall
-test ! -e "$inst/your/two.py"
-test ! -e "$inst/your/two.pyc"
-test ! -e "$inst/your/two.pyo"
+py_installed --not "$inst/your/two.py"
+py_installed --not "$inst/your/two.pyc"
+py_installed --not "$inst/your/two.pyo"
 
 ../configure --prefix=$cwd/"$inst" one=1
 $MAKE install
-test ! -e "$inst/your/two.py"
-test ! -e "$inst/your/two.pyc"
-test ! -e "$inst/your/two.pyo"
-test -f "$inst/my/one.py"
-test -f "$inst/my/one.pyc"
-test -f "$inst/my/one.pyo"
+py_installed --not "$inst/your/two.py"
+py_installed --not "$inst/your/two.pyc"
+py_installed --not "$inst/your/two.pyo"
+test -f            "$inst/my/one.py"
+py_installed       "$inst/my/one.pyc"
+py_installed       "$inst/my/one.pyo"
 $MAKE uninstall
-test ! -e "$inst/my/one.py"
-test ! -e "$inst/my/one.pyc"
-test ! -e "$inst/my/one.pyo"
+py_installed --not "$inst/my/one.py"
+py_installed --not "$inst/my/one.pyc"
+py_installed --not "$inst/my/one.pyo"
 
 $MAKE disttest
 
diff --git a/t/python11.sh b/t/python11.sh
index e3e29e5..a648c7b 100755
--- a/t/python11.sh
+++ b/t/python11.sh
@@ -19,6 +19,9 @@
 # Python is not required for this test.
 . test-init.sh
 
+# We don't want to allow user overrides in this test.
+PYTHON=; unset PYTHON
+
 cat >>configure.ac <<'EOF'
 m4_define([_AM_PYTHON_INTERPRETER_LIST], [IShouldNotExist1 IShouldNotExist2])
 AM_PATH_PYTHON
diff --git a/t/python12.sh b/t/python12.sh
index 3fd4030..1939833 100755
--- a/t/python12.sh
+++ b/t/python12.sh
@@ -36,19 +36,19 @@ $ACLOCAL
 $AUTOCONF
 $AUTOMAKE --add-missing
 
-instdir=$(pwd)/inst
+destdir=$(pwd)/inst
 mkdir inst build
 cd build
 ../configure --prefix="/usr"
-$MAKE install DESTDIR=$instdir
+$MAKE install DESTDIR=$destdir
 
 # Perfunctory test that the files were created.
-test -f "$instdir/usr/share/my/my.py"
-test -f "$instdir/usr/share/my/my.pyc"
-test -f "$instdir/usr/share/my/my.pyo"
+test -f "$destdir/usr/share/my/my.py"
+pyo=$(pyc_location -p "$destdir/usr/share/my/my.pyo")
+pyc=$(pyc_location -p "$destdir/usr/share/my/my.pyc")
 
 # If DESTDIR has made it into the byte compiled files, fail the test.
-$FGREP "$instdir" "$instdir/usr/share/my/my.pyo" \
-                  "$instdir/usr/share/my/my.pyc" && exit 1
+st=0; $FGREP "$destdir" "$pyc" "$pyo" || st=$?
+test $st -eq 1
 
 :
diff --git a/t/python3.sh b/t/python3.sh
index f749f9f..e57868b 100755
--- a/t/python3.sh
+++ b/t/python3.sh
@@ -40,8 +40,8 @@ mkdir build
 cd build
 ../configure --prefix="$(pwd)/inst"
 $MAKE install
-test -f inst/my/one.py
-test -f inst/my/one.pyc
-test -f inst/my/one.pyo
+py_installed inst/my/one.py
+py_installed inst/my/one.pyc
+py_installed inst/my/one.pyo
 
 :
diff --git a/t/wrap/aclocal.in b/t/wrap/aclocal.in
index a3defa9..ea3819a 100644
--- a/t/wrap/aclocal.in
+++ b/t/wrap/aclocal.in
@@ -19,11 +19,9 @@
 BEGIN
 {
   use strict;
-  my $libdir;
-  $libdir = '@abs_top_srcdir@/lib';
-  $libdir = '@abs_top_builddir@/lib' . '@PATH_SEPARATOR@' . $libdir
+  @Aclocal::perl_libdirs = ('@abs_top_srcdir@/lib');
+  unshift @Aclocal::perl_libdirs, '@abs_top_builddir@/lib'
     if '@srcdir@' ne '.';
-  $ENV{perllibdir} = $libdir;
   unshift @ARGV,
     'address@hidden@/m4',
     'address@hidden@/m4/acdir';
diff --git a/t/wrap/automake.in b/t/wrap/automake.in
index 8417360..3302b3f 100644
--- a/t/wrap/automake.in
+++ b/t/wrap/automake.in
@@ -19,11 +19,9 @@
 BEGIN
 {
   use strict;
-  my $libdir;
-  $libdir = '@abs_top_srcdir@/lib';
-  $libdir = '@abs_top_builddir@/lib' . '@PATH_SEPARATOR@' . $libdir
+  @Automake::perl_libdirs = ('@abs_top_srcdir@/lib');
+  unshift @Automake::perl_libdirs, '@abs_top_builddir@/lib'
     if '@srcdir@' ne '.';
-  $ENV{perllibdir} = $libdir;
   unshift @ARGV, 'address@hidden@/lib';
 }
 require '@abs_top_builddir@/automake';


hooks/post-receive
-- 
GNU Automake



reply via email to

[Prev in Thread] Current Thread [Next in Thread]