From: Stefano Lattarini Date: Tue, 31 May 2011 16:03:48 +0000 (+0200) Subject: Merge branch 'maint' X-Git-Tag: v1.11b~341 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3eb059190213c60a9f201f671f1c69d6eed6bd7d;p=platform%2Fupstream%2Fautomake.git Merge branch 'maint' * maint: automake, aclocal: honour configure-time AUTOCONF and AUTOM4TE build: the user can override AUTOM4TE, AUTORECONF and AUTOUPDATE too tests/README: fix example about `make -e' usage --- 3eb059190213c60a9f201f671f1c69d6eed6bd7d diff --cc ChangeLog index 8e77e2a,cd0f593..cb8adbc --- a/ChangeLog +++ b/ChangeLog @@@ -1,9 -1,53 +1,59 @@@ + 2011-05-29 Stefano Lattarini + + automake, aclocal: honour configure-time AUTOCONF and AUTOM4TE + Currently, the Automake's own configure script allow definition + of AUTOCONF and AUTOM4TE, expected to point respectively to an + autoconf and autom4te programs. But while these definitions are + honoured in the Automake's build systems and test suite, they + were *not* honoured in the generated `automake' and `aclocal' + scripts. This behaviour, apart from being wrong in that it does + not allow the user enough freedom in choosing his tools, also + caused inconsistencies in the test suite, brining to spurious + failures. + Problem reported by Graham Reitz on the automake list; see thread: + + * automake.in ($traces): Use `@am_AUTOCONF', not simply `autoconf'. + * aclocal.in ($traces): Use `@am_AUTOM4TE', not simply `autom4te'. + * Makefile.am (do_subst): Substitute also `@am_AUTOCONF' and + `@am_AUTOM4TE'. + * NEWS: Update. + * THANKS: Update. + + 2011-05-29 Stefano Lattarini + + build: the user can override AUTOM4TE, AUTORECONF and AUTOUPDATE too + Our build system allows the user to override AUTOCONF and AUTOHEADER + at configure time, and honours these overrides in our testsuite. + But it didn't do the same with AUTOM4TE, AUTORECONF and AUTOUPDATE. + This change fixes that inconsistency. + * configure.ac (am_AUTOM4TE, am_AUTOUPDATE, am_AUTORECONF): New + AC_SUBSTitutions. Update comments. + * tests/defs.in ($AUTOUPDATE): Default to `@am_AUTOUPDATE@' now. + ($AUTOM4TE): New variable, defaulting to `@am_AUTOM4TE@'. + ($AUTORECONF): New variable, defaulting to `@am_AUTORECONF@'. + * doc/Makefile.am ($(srcdir)/amhello-1.0.tar.gz): Update. + + 2011-05-22 Ralf Wildenhues + Stefano Lattarini + + tests/README: fix example about `make -e' usage + * tests/README (Section "Writing test cases" subsection "Do"): When + some variable is never initialized in the Makefile, `-e' is not + necessary in order to override it. DESTDIR is such a variable: we + ensure that we do not ever initialize it. And as such, it is quite + portable to use: + $ make DESTDIR=/foo/bar install + and in fact, quite widely used. + So our example about when `make -e' is required, which references + the `DESTDIR' variable, is poorly chosen, if not downright wrong. + Rewrite it to use `prefix' as the overridden variable instead. + +2011-05-27 Stefano Lattarini + + testsuite: each test case depends on `defs-static' + * tests/Makefile.am ($(TEST_LOGS)): Depends on `defs-static' too. + Simplify comments. + 2011-05-20 Stefano Lattarini testsuite: avoid re-running few tests with 'parallel-tests' option diff --cc automake.in index a1c6f30,2669418..3d6993a mode 100644,100755..100644 --- a/automake.in +++ b/automake.in diff --cc configure index e2add32,5044112..c302483 --- a/configure +++ b/configure @@@ -1784,13 -1777,20 +1787,20 @@@ case $build_os in *\ *) build_os=`echo # Save the AUTOCONF setting before AM_INIT_AUTOMAKE overrides it; this # way we can run Autoconf tests from configure (or from the test - # suite) without being bothered by `missing'. Likewise for autoheader. + # suite) without being bothered by `missing'. Likewise for autom4te, + # autoreconf, autoheader, and autoupdate. am_AUTOCONF="${AUTOCONF-autoconf}" + am_AUTOM4TE="${AUTOM4TE-autom4te}" + + am_AUTORECONF="${AUTORECONF-autoreconf}" + am_AUTOHEADER="${AUTOHEADER-autoheader}" + am_AUTOUPDATE="${AUTOUPDATE-autoupdate}" + -am__api_version='1.11' +am__api_version='1.11a' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or diff --cc configure.ac index 577541c,f804d18..437ce9f --- a/configure.ac +++ b/configure.ac @@@ -28,12 -28,15 +28,16 @@@ AC_CANONICAL_BUIL # Save the AUTOCONF setting before AM_INIT_AUTOMAKE overrides it; this # way we can run Autoconf tests from configure (or from the test - # suite) without being bothered by `missing'. Likewise for autoheader. + # suite) without being bothered by `missing'. Likewise for autom4te, + # autoreconf, autoheader, and autoupdate. AC_SUBST([am_AUTOCONF], ["${AUTOCONF-autoconf}"]) + AC_SUBST([am_AUTOM4TE], ["${AUTOM4TE-autom4te}"]) + AC_SUBST([am_AUTORECONF], ["${AUTORECONF-autoreconf}"]) AC_SUBST([am_AUTOHEADER], ["${AUTOHEADER-autoheader}"]) + AC_SUBST([am_AUTOUPDATE], ["${AUTOUPDATE-autoupdate}"]) -AM_INIT_AUTOMAKE([1.10a dist-bzip2 filename-length-max=99 color-tests parallel-tests]) +AM_INIT_AUTOMAKE([1.10a dist-bzip2 filename-length-max=99 color-tests + parallel-tests silent-rules]) # The API version is the base version. We must guarantee # compatibility for all releases with the same API version. diff --cc doc/Makefile.am index 01cf663,f4f76c6..ae4016c --- a/doc/Makefile.am +++ b/doc/Makefile.am @@@ -70,11 -70,17 +70,17 @@@ dist_doc_DATA = $(srcdir)/amhello-1.0.t # aclocal-$(APIVERSION) and automake-$(APIVERSION) are generated by # configure in tests/. $(srcdir)/amhello-1.0.tar.gz: $(amhello_sources) $(top_srcdir)/configure.ac - PATH="`pwd`/../tests$(PATH_SEPARATOR)$$PATH" && \ + $(AM_V_GEN)PATH="`pwd`/../tests$(PATH_SEPARATOR)$$PATH" && \ export PATH && \ cd $(srcdir)/amhello && \ - ACLOCAL=aclocal-$(APIVERSION) AUTOMAKE=automake-$(APIVERSION) \ - autoreconf -vfi && \ + ACLOCAL=aclocal-$(APIVERSION) && export ACLOCAL && \ + AUTOMAKE=automake-$(APIVERSION) && export AUTOMAKE && \ + AUTOCONF='$(am_AUTOCONF)' && export AUTOCONF && \ + AUTOM4TE='$(am_AUTOM4TE)' && export AUTOM4TE && \ + AUTORECONF='$(am_AUTORECONF)' && export AUTORECONF && \ + AUTOHEADER='$(am_AUTOHEADER)' && export AUTOHEADER && \ + AUTOUPDATE='$(am_AUTOUPDATE)' && export AUTOUPDATE && \ + $(am_AUTORECONF) -vfi && \ ./configure && \ $(MAKE) $(AM_MAKEFLAGS) distcheck && \ $(MAKE) $(AM_MAKEFLAGS) distclean && \ diff --cc doc/Makefile.in index 7bc40a6,3034dcb..ff01625 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@@ -857,11 -817,17 +860,17 @@@ $(srcdir)/automake-$(APIVERSION).1: $(s # aclocal-$(APIVERSION) and automake-$(APIVERSION) are generated by # configure in tests/. $(srcdir)/amhello-1.0.tar.gz: $(amhello_sources) $(top_srcdir)/configure.ac - PATH="`pwd`/../tests$(PATH_SEPARATOR)$$PATH" && \ + $(AM_V_GEN)PATH="`pwd`/../tests$(PATH_SEPARATOR)$$PATH" && \ export PATH && \ cd $(srcdir)/amhello && \ - ACLOCAL=aclocal-$(APIVERSION) AUTOMAKE=automake-$(APIVERSION) \ - autoreconf -vfi && \ + ACLOCAL=aclocal-$(APIVERSION) && export ACLOCAL && \ + AUTOMAKE=automake-$(APIVERSION) && export AUTOMAKE && \ + AUTOCONF='$(am_AUTOCONF)' && export AUTOCONF && \ + AUTOM4TE='$(am_AUTOM4TE)' && export AUTOM4TE && \ + AUTORECONF='$(am_AUTORECONF)' && export AUTORECONF && \ + AUTOHEADER='$(am_AUTOHEADER)' && export AUTOHEADER && \ + AUTOUPDATE='$(am_AUTOUPDATE)' && export AUTOUPDATE && \ + $(am_AUTORECONF) -vfi && \ ./configure && \ $(MAKE) $(AM_MAKEFLAGS) distcheck && \ $(MAKE) $(AM_MAKEFLAGS) distclean && \ diff --cc tests/defs-static.in index 45f08bf,0000000..6d82956 mode 100644,000000..100644 --- a/tests/defs-static.in +++ b/tests/defs-static.in @@@ -1,153 -1,0 +1,155 @@@ +# -*- shell-script -*- +# @configure_input@ +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005, 2006, 2007, 2008, 2009, 2010, 2011 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 . + +# Defines and minimal setup for Automake testing environment. +# Multiple inclusions of this file should be idempotent! +# This code needs to be 'set -e' clean. + +# Be more Bourne compatible. +# (Snippet inspired to configure's initialization in Autoconf 2.64) +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST + # If Zsh is not started directly in Bourne-compatibility mode, it has + # some incompatibilities in the handling of `$0' that conflict with + # our usage: i.e., `$0' inside a file sourced with the `.' builtin is + # temporarily set to the name of the sourced file. + # Work around this when possible, otherwise abort the script. + # Note that a bug in some versions of Zsh prevents us from resetting $0 + # in a sourced script, so the use of $argv0. For more info see: + # + # Note: the apparently useless 'eval' below are needed by at least + # dash 0.5.2, to prevent it from bailing out with an error like + # "Syntax error: Bad substitution" + if eval '[[ "$0" = *."test" ]]'; then + # Good, FUNCTION_ARGZERO option was already off when this file was + # sourced. Thus we've nothing to do. + argv0=$0 + elif eval 'test -n "${functrace[-1]}"'; then + # FUNCTION_ARGZERO option was on, but we have a easy workaround. + eval 'argv0=${functrace[-1]%:*}' + else + # Give up. + echo "$0: cannot determine the path of running test script" >&2 + echo "$0: test was running with Zsh version $ZSH_VERSION" >&2 + echo "$0: did you enable the NO_FUNCTION_ARGZERO option?" >&2 + exit 99 + fi +else + argv0=$0 + # Avoid command substitution failure, for Tru64 sh -e and instspc*.test. + case `(set -o) 2>/dev/null || :` in *posix*) set -o posix;; esac +fi + +# Check that the environment is properly sanitized. +# Having variables exported to the empty string is OK, since our code +# treats such variables as if they were unset. +for var in me required parallel_tests original_AUTOMAKE original_ACLOCAL; do + if eval "test x\"\$$var\" != x" && env | grep "^$var=" >/dev/null; then + echo "$argv0: variable \`$var' is set in the environment:" \ + "this is unsafe" >&2 + exit 99 + fi +done +unset var + +testsrcdir='@abs_srcdir@' +top_testsrcdir='@abs_top_srcdir@' +testbuilddir='@abs_builddir@' +testprefix='@prefix@' + +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=autoupdate ++test -z "$AUTOUPDATE" && AUTOUPDATE="@am_AUTOUPDATE@" +test -z "$MISSING" && MISSING=$top_testsrcdir/lib/missing + +# Use -Werror because this also turns some Perl warnings into error. +# Tests for which this is inappropriate should use -Wno-error. +# Tests who want complete control over aclocal command-line options +# should use $original_ACLOCAL. +# Note: the first `test -z' conditional below is to ensure defs-static +# really remains idempotent. +if test -z "$original_ACLOCAL"; then + original_ACLOCAL=${ACLOCAL-"aclocal-$APIVERSION"} +fi +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. Tests who want complete control over +# automake command-line options should use $original_AUTOMAKE. +# Note: the first `test -z' conditional below is to ensure defs-static +# really remains idempotent. +if test -z "$original_AUTOMAKE"; then + original_AUTOMAKE=${AUTOMAKE-"automake-$APIVERSION"} +fi +test -z "$AUTOMAKE" && AUTOMAKE="automake-$APIVERSION --foreign -Werror -Wall" + +# POSIX no longer requires 'egrep' and 'fgrep', +# but some hosts lack 'grep -E' and 'grep -F'. +EGREP='@EGREP@' +FGREP='@FGREP@' + +# No all versions of Tex support `--version', so we use a configure +# check to decide if tex is available. This decision is embodied in +# this variable. +TEX='@TEX@' + +# Whether /bin/sh has working 'set -e' with exit trap. +sh_errexit_works='@sh_errexit_works@' + +# The amount we should wait after modifying files depends on the platform. +# For instance, Windows '95, '98 and ME have 2-second granularity +# and can be up to 3 seconds in the future w.r.t. the system clock. +sleep='sleep @MODIFICATION_DELAY@' + +# An old timestamp that can be given to a file, in "touch -t" format. +# The time stamp should be portable to all file systems of interest. +# Just for fun, choose the exact time of the announcement of the GNU project +# in UTC; see . +old_timestamp=198309271735.59 + +# Make our wrapper scripts accessible by default. And avoid to uselessly +# extend $PATH multiple times if this file is sourced multiple times. +case $PATH in + "$testbuilddir$PATH_SEPARATOR"*) ;; + *) PATH="$testbuilddir$PATH_SEPARATOR$PATH";; +esac +export PATH