Merge branch 'maint'
authorStefano Lattarini <stefano.lattarini@gmail.com>
Thu, 16 Jun 2011 14:56:36 +0000 (16:56 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Thu, 16 Jun 2011 14:58:20 +0000 (16:58 +0200)
* maint:
  news: update w.r.t. introduction of AM_DISTCHECK_CONFIGURE_FLAGS
  tests: optimize tests on primary/prefix mismatch for speed
  Warnings about primary/prefix mismatch fixed and extended.
  maintcheck: DISTCHECK_CONFIGURE_FLAGS can be defined on make cmdline
  distcheck: add support for AM_DISTCHECK_CONFIGURE_FLAGS
  docs: better documentation for silent make rules

1  2 
ChangeLog
Makefile.am
Makefile.in
NEWS
automake.in
doc/automake.texi
lib/am/distdir.am
tests/Makefile.am
tests/Makefile.in
tests/defs
tests/java3.test

diff --cc ChangeLog
+++ b/ChangeLog
@@@ -1,13 -1,88 +1,98 @@@
+ 2011-06-13  Stefano Lattarini  <stefano.lattarini@gmail.com>
+       tests: optimize tests on primary/prefix mismatch for speed
+       * tests/primary-prefix-invalid-couples.test: Partial rewrite, in
+       order to use just a single automake invocation rather than one
+       invocation for each invalid primary/prefix couple.  This improves
+       the test script execution time by an order of magnitude.
+       Since we are at it, throw in some other improvements to avoid
+       unrelated automake warnings and failures that could potentially
+       cause false positives w.r.t. the automake exit status.
+ 2011-06-13  Stefano Lattarini  <stefano.lattarini@gmail.com>
+       news: update w.r.t. introduction of AM_DISTCHECK_CONFIGURE_FLAGS
+       * NEWS (Miscellaneous changes): Update.
+ 2011-06-10  Stefano Lattarini  <stefano.lattarini@gmail.com>
+       maintcheck: DISTCHECK_CONFIGURE_FLAGS can be defined on make cmdline
+       * Makefile.am (sc_tests_overriding_macros_on_cmdline): It's now
+       acceptable that the test scripts override DISTCHECK_CONFIGURE_FLAGS
+       on the make command line.  Update comments accordingly.  Since we
+       are at it, make the relevant grepping rules slightly tighter.
+ 2011-06-10  Stefano Lattarini  <stefano.lattarini@gmail.com>
+       distcheck: add support for AM_DISTCHECK_CONFIGURE_FLAGS
+       * doc/automake.texi (Checking the Distribution): Suggest to use
+       AM_DISTCHECK_CONFIGURE_FLAGS, not DISTCHECK_CONFIGURE_FLAGS, to
+       define (in the top-level Makefile.am) extra flags to be passed
+       to configure at "make distcheck" time; DISTCHECK_CONFIGURE_FLAGS
+       should be reserved for the user.  Add proper `@vindex' directive.
+       Document that AM_DISTCHECK_CONFIGURE_FLAGS is not honoured in a
+       subpackage Makefile.am, but the flags in it are passed down to
+       the configure script of the subpackage.
+       * lib/am/distdir.am (distcheck): Also pass the flags in
+       $(AM_DISTCHECK_CONFIGURE_FLAGS) to the configure invocation.
+       Update comments.
+       * tests/defs.in.test (AM_DISTCHECK_CONFIGURE_FLAGS,
+       DISTCHECK_CONFIGURE_FLAGS): Unset in case they are exported in
+       the environment, they might improperly influence our testsuite.
+       * tests/distcheck-configure-flags.test: New test.
+       * tests/distcheck-configure-flags-am.test: Likewise.
+       * tests/distcheck-configure-flags-subpkg.test: Likewise.
+       * distcheck-hook.test: Likewise.
+       * distcheck-hook2.test: Likewise.
+       * tests/Makefile.am (TESTS): Update.
+       Closes automake bug#8784.
+ 2010-06-09  Stefano Lattarini  <stefano.lattarini@gmail.com>
+       docs: better documentation for silent make rules
+       * doc/automake.texi (Options): Detailed description of the
+       automake option `silent-rules' moved from here ...
+       (Silent Make): ... into this new chapter, expanded, improved,
+       and subdivided into ...
+       (Make verbosity, Tricks For Silencing Make,
+       Automake silent-rules Option): ... these new sections.
+       (@menu, @detailmenu): Update.
+       * tests/silent-configsite.test: New test, checking that the
+       user can control default mode of silent-rules from config.site,
+       as is documented in the manual.
+       * tests/Makefile.am (TESTS): Updated.
+ 2011-06-11  Stefano Lattarini  <stefano.lattarini@gmail.com>
+       Warnings about primary/prefix mismatch fixed and extended.
+       * automake.in (%standard_prefix): Add `doc' and `locale'.
+       Rename `pkgdatadir' to `pkgdata'.  Similarly for`pkglibdir',
+       `pkgincludedir' and `pkglibexecdir'.
+       (handle_programs): List `pkglibexec', not `pkglib', among the
+       prefixes valid for the `PROGRAMS' primary.
+       (handle_data): List also `doc' among the prefixes valid for
+       the `DATA' primary.  This is required by automake's own build
+       system.
+       * tests/dirforbid.test: Test removed, superseded by ...
+       * tests/primary-prefix-invalid-couples.test: ... this new test.
+       * tests/primary-prefix-valid-couples.test: New test.
+       * tests/primary-prefix-couples-documented-valid.test: Likewise.
+       * tests/primary-prefix-couples-force-valid.test: Likewise.
+       * tests/java3.test: Adjusted, and extended a bit.
+       * tests/Makefile.am (TESTS): Updated.
+       * NEWS: Updated.
+       From a report by Eric Blake.
 +2011-06-14  Stefano Lattarini  <stefano.lattarini@gmail.com>
 +
 +      tests: check portable fd redirection in TESTS_ENVIRONMENT
 +      * tests/tests-environment-fd-redirect.test: New test.
 +      * tests/Makefile.am (TESTS): Update.
 +      Motivated by coreutils bug#8846:
 +       <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=8846>
 +      See also following CC:ed thread on bug-autoconf list:
 +       <http://lists.gnu.org/archive/html/bug-autoconf/2011-06/msg00002.html>
 +
  2011-06-08  Stefano Lattarini  <stefano.lattarini@gmail.com>
  
        test defs: new function 'fatal_', for hard errors
diff --cc Makefile.am
Simple merge
diff --cc Makefile.in
Simple merge
diff --cc NEWS
--- 1/NEWS
--- 2/NEWS
+++ b/NEWS
@@@ -18,35 -5,15 +18,43 @@@ New in 1.11a
    - The `lzma' compression scheme and associated automake option `dist-lzma'
      is obsoleted by `xz' and `dist-xz' due to upstream changes.
  
 -Bugs fixed in 1.11.0a:
 +  - "make dist" can now create lzip-compressed tarballs.
 +
 +  - You may adjust the compression options used in dist-xz and dist-bzip2.
 +    The default is still -9 for each, but you may specify a different
 +    level via the XZ_OPT and BZIP2 envvars respectively.  E.g.,
 +    "make dist-xz XZ_OPT=-7" or "make dist-xz BZIP2=-5"
 +
 +  - Messages of types warning or error from `automake' and `aclocal' are now
 +    prefixed with the respective type, and presence of -Werror is noted.
 +
 +  - The `compile' script now converts some options for MSVC for a better
 +    user experience.  Similarly, the new `ar-lib' script wraps Microsoft lib.
 +
 +  - Automake's early configure-time sanity check now tries to avoid sleeping
 +    for a second, which slowed down cached configure runs noticeably.  In that
 +    case, it will check back at the end of the configure script to ensure that
 +    at least one second has passed, to avoid time stamp issues with makefile
 +    rules rerunning autotools programs.
 +
 +  - For programs and libraries, automake now detects EXTRA_foo_DEPENDENCIES and
 +    adds them to the normal list of dependencies, but without overwriting the
 +    foo_DEPENDENCIES variable, which is normally computed by automake.
 +
 +  - C source and header files derived from non-distributed Yacc sources are
 +    now removed by "make clean", not only by "make maintainer-clean".
 +
+   - A developer that needs to pass specific flags to configure at "make
+     distcheck" time can now, and indeed he's advised to, do so by defining
+     the developer-reserved makefile variable AM_DISTCHECK_CONFIGURE_FLAGS,
+     instead of the old DISTCHECK_CONFIGURE_FLAGS.
+     The DISTCHECK_CONFIGURE_FLAGS variable should now be reserved for the
+     user; still, the old Makefile.am files that used to define it should
+     still continue to work as before.
 +Bugs fixed in 1.11a:
 +
 +  - Lots of minor bugfixes.
  
  * Bugs introduced by 1.11:
  
diff --cc automake.in
index 3d6993a,93f4ae4..7827680
mode 100644,100755..100644
Simple merge
Simple merge
@@@ -390,9 -296,7 +390,8 @@@ depend3.test 
  depend4.test \
  depend5.test \
  depend6.test \
 +deprecated-acinit.test \
  destdir.test \
- dirforbid.test \
  dirlist.test \
  dirlist2.test \
  discover.test \
@@@ -856,7 -691,7 +864,8 @@@ silent-lex-gcc.test 
  silent-lex-generic.test \
  silent-yacc-gcc.test \
  silent-yacc-generic.test \
 +silent-nowarn.test \
+ silent-configsite.test \
  srcsub.test \
  srcsub2.test \
  space.test \
@@@ -657,9 -567,7 +657,8 @@@ depend3.test 
  depend4.test \
  depend5.test \
  depend6.test \
 +deprecated-acinit.test \
  destdir.test \
- dirforbid.test \
  dirlist.test \
  dirlist2.test \
  discover.test \
@@@ -1123,7 -962,7 +1131,8 @@@ silent-lex-gcc.test 
  silent-lex-generic.test \
  silent-yacc-gcc.test \
  silent-yacc-generic.test \
 +silent-nowarn.test \
+ silent-configsite.test \
  srcsub.test \
  srcsub2.test \
  space.test \
diff --cc tests/defs
@@@ -58,50 -46,83 +58,52 @@@ nl=
  # is defined initially, so that saving and restoring $IFS works.
  IFS=$sp$tab$nl
  
 -# Ensure we are running from the right directory.
 -test -f ./defs || {
 -   echo "defs: not found in current directory" 1>&2
 -   exit 1
 +# Ensure $testsrcdir is set correctly.
 +test -f "$testsrcdir/defs-static.in" || {
 +   echo "$me: $testsrcdir/defs-static.in not found, check \$testsrcdir" >&2
 +   exit 99
  }
  
 -if test -z "$srcdir"; then
 -   # compute $srcdir.
 -   srcdir=`echo "$0" | sed -e 's,/[^\\/]*$,,'`
 -   test "$srcdir" = $0 && srcdir=.
 -else :; fi
 -
 -# Ensure $srcdir is set correctly.
 -test -f "$srcdir/defs.in" || {
 -   echo "$srcdir/defs.in not found, check \$srcdir" 1>&2
 -   exit 1
 +# Ensure $testbuilddir is set correctly.
 +test -f "$testbuilddir/defs-static" || {
 +   echo "$me: $testbuilddir/defs-static not found, check \$testbuilddir" >&2
 +   exit 99
  }
  
 -# The name of the current test (without the `.test' suffix).
 -# Test scripts can override it if they need to (but this should
 -# be done carefully, and *before* including ./defs).
 -if test -z "$me"; then
 -  me=`echo "$0" | sed -e 's,.*[\\/],,;s/\.test$//'`
 -elif env | grep '^me=' >/dev/null; then
 -  echo "$0: variable \`me' is set in the environment: this is unsafe" >&2
 -  exit 99
 -fi
 -
 -# Check that the environment is properly sanitized.
 -for var in required parallel_tests; do
 -  if env | grep "^$var=" >/dev/null; then
 -    echo "$me: variable \`$var' is set in the environment:" \
 -         "this is unsafe" >&2
 -    exit 99
 -  fi
 -done
 -unset var
 +# Unset some MAKE... variables that may cause $MAKE to act like a
 +# recursively invoked sub-make.  Any $MAKE invocation in a test is
 +# conceptually an independent invocation, not part of the main
 +# 'automake' build.
 +unset MFLAGS MAKEFLAGS AM_MAKEFLAGS MAKELEVEL __MKLVL__ MAKE_JOBS_FIFO
 +# Unset verbosity flag.
 +unset V
 +# Also unset variables that will let `make -e install' divert
 +# files into unwanted directories.
 +unset DESTDIR
 +unset prefix exec_prefix bindir datarootdir datadir docdir dvidir
 +unset htmldir includedir infodir libdir libexecdir localedir mandir
 +unset oldincludedir pdfdir psdir sbindir sharedstatedir sysconfdir
++# Unset variables that might change the "make distcheck" behaviour.
++unset DISTCHECK_CONFIGURE_FLAGS AM_DISTCHECK_CONFIGURE_FLAGS
 +# The tests call `make -e' but we do not want $srcdir from the environment
 +# to override the definition from the Makefile.
 +unset srcdir
 +# Also unset variables that control our test driver.  While not
 +# conceptually independent, they cause some changed semantics we
 +# need to control (and test for) in some of the tests to ensure
 +# backward-compatible behavior.
 +unset TESTS_ENVIRONMENT
 +unset DISABLE_HARD_ERRORS
 +unset TESTS
 +unset TEST_LOG_COMPILER
 +unset TEST_LOGS
 +unset RECHECK_LOGS
 +unset VERBOSE
  
 -# This might be used in testcases checking distribution-related features.
 -# Test scripts are free to override this if they need to.
 -distdir=$me-1.0
  
 -APIVERSION='@APIVERSION@'
 -PATH_SEPARATOR='@PATH_SEPARATOR@'
 -
 -# Make sure we override the user shell.
 -SHELL='@SHELL@'
 -export SHELL
 -# User can override various tools used.
 -test -z "$PERL" && PERL='@PERL@'
 -test -z "$MAKE" && MAKE=make
 -test -z "$AUTOCONF" && AUTOCONF="@am_AUTOCONF@"
 -test -z "$AUTOM4TE" && AUTOM4TE="@am_AUTOM4TE@"
 -test -z "$AUTORECONF" && AUTORECONF="@am_AUTORECONF@"
 -test -z "$AUTOHEADER" && AUTOHEADER="@am_AUTOHEADER@"
 -test -z "$AUTOUPDATE" && AUTOUPDATE="@am_AUTOUPDATE@"
 -test -z "$MISSING" && MISSING=`pwd`/../lib/missing
 -# Use -Werror because this also turns some Perl warnings into error.
 -# (Tests for which this is inappropriate should use -Wno-error.)
 -test -z "$ACLOCAL" && ACLOCAL="aclocal-$APIVERSION -Werror"
 -# Extra flags to pass to aclocal before all other flags added by this script.
 -ACLOCAL_TESTSUITE_FLAGS=
 -export ACLOCAL_TESTSUITE_FLAGS
 -
 -# See how Automake should be run.  We put --foreign as the default
 -# strictness to avoid having to create lots and lots of files.  A test
 -# can override this by specifying a different strictness.  Use -Wall
 -# -Werror by default.  Tests for which this is inappropriate
 -# (e.g. when testing that a warning is enabled by a specific switch)
 -# should use -Wnone or/and -Wno-error
 -test -z "$AUTOMAKE" && AUTOMAKE="automake-$APIVERSION --foreign -Werror -Wall"
 -
 -PATH="`pwd`$PATH_SEPARATOR$PATH"
 -echo "$PATH"
 -# Some shells forget to export modified environment variables.
 -# (See note about `export' in the Autoconf manual.)
 -export PATH
 +## ---------------------------- ##
 +##  Auxiliary shell functions.  ##
 +## ---------------------------- ##
  
  # We use a trap below for cleanup.  This requires us to go through
  # hoops to get the right exit status transported through the signal.
  
  . ./defs || Exit 1
  
 -set -e
 -
  cat >> configure.in << 'END'
- AM_CONDITIONAL([WHO_CARES], false)
+ AM_CONDITIONAL([WHO_CARES], [false])
  AC_OUTPUT
  END