From: Stefano Lattarini Date: Fri, 2 Sep 2011 19:57:03 +0000 (+0200) Subject: Merge branch 'maint' X-Git-Tag: ng-0.5a~130 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7ce19f110c1420531ff39a97ce710bad972f776d;p=thirdparty%2Fautomake.git Merge branch 'maint' * maint: tests: simplify wrapper for aclocal --- 7ce19f110c1420531ff39a97ce710bad972f776d diff --cc ChangeLog index 5991304ee,70410d1d4..68db5c4be --- a/ChangeLog +++ b/ChangeLog @@@ -1,107 -1,14 +1,118 @@@ + 2011-09-02 Stefano Lattarini + + tests: simplify wrapper for aclocal + * tests/aclocal.in: Remove use of $ACLOCAL_TESTSUITE_FLAGS and + extra `-I' flags; they are not really required, since the file + `m4/amversion.m4' is generated in the srcdir anyway. + * tests/acloca10.test: Remove use of $ACLOCAL_TESTSUITE_FLAGS. + * tests/acloca18.test: Likewise. + * tests/defs.in: Don't nullify $ACLOCAL_TESTSUITE_FLAGS, and do + not export it. + +2011-09-01 Stefano Lattarini + + automake: fix regression due to de-ansification support removal + The last change `v1.11-947-g136b489' removed code that automake + was using to decide whether binary objects were built by the + generated Makefile.in, so that it could avoid to emit unneeded + code when this was not the case. Re-introduce such code in a + less-obfuscated form, and add a test to ensure we don't regress + again. + * automake.in ($must_handle_compiled_objects): New global + variable, telling whether the generated Makefile has to build + compiled objects. + (initialize_per_input): Reset it. + (handle_programs, handle_libraries, handle_ltlibraries): Set + it to a true value when required. + (handle_compile): Don't generate any code if the variable + `$must_handle_compiled_objects' is not set to a true value. + * tests/no-extra-makefile-code.test: New test. + * tests/Makefile.am (TESTS): Add it. + +2011-08-28 Stefano Lattarini + + automake: cleanups after de-ansification support removal (2) + * automake.in ($get_object_extension_was_run): Remove, it's not + really needed anymore. + (&get_object_extension): Remove, it's a no-op now. + All callers adjusted. + +2011-08-28 Stefano Lattarini + + automake: cleanups after de-ansification support removal (1) + * automake.in (lang_c_rewrite, handle_single_transform): Rename + variable `$nonansi_obj' to `$obj'. + +2011-08-28 Stefano Lattarini + + ansi: remove obsolete code/files for de-ANSI-fication support + * lib/ansi2knr.1, lib/ansi2knr.c: Deleted. + * lib/Makefile.am (dist_pkgvdata_DATA): Do not list them anymore. + * lib/am/ansi2knr.am: Delete. + * lib/am/Makefile.am (dist_am_DATA): Do not list it anymore. + * lib/Automake/Variable.pm (%_am_macro_for_var): Remove entries for + `ANSI2KNR' and `U'. + * m4/depout.m4 (_AM_OUTPUT_DEPENDENCY_COMMANDS): Don't care anymore + about possible definition of the `$U' variable. + * automake.in (@common_files): Drop `ansi2knr.1' and `ansi2knr.c'. + (struct): Remove scalar field `ansi'. + All callers adjusted. + (&lang_c_finish, %de_ansi_files): Remove, they're not required + anymore. + All callers adjusted. + ($get_object_extension_was_run): Fix typo in comment. + (&get_object_extension): Drop code dealing with de-ansification; + this function basically a no-op now, but is required to properly + initialize `$get_object_extension_was_run' variable. + (&handle_languages, &handle_compile, &lang_c_rewrite): Drop code + dealing with de-ansification. + +2011-08-28 Stefano Lattarini + + ansi: reject attempts to use automatic de-ANSI-fication support + * tests/protos.m4 (AM_C_PROTOTYPES): Error out whenever called. + * lib/Automake/Options.pm (_process_option_list ): Error out + with a proper error message when the `ansi2knr' option is used. + Related updates to comments. + * tests/depacl2.test: Update. + * tests/ansi2knr-no-more.test: New test. + * tests/Makefile.am (TESTS): Add it. + * NEWS: Update. + +2011-08-28 Stefano Lattarini + + tests: remove tests about obsolete de-ANSI-fication support + * tests/ansi.test: Delete. + * tests/ansi10.test: Likewise. + * tests/ansi2.test: Likewise. + * tests/ansi2knr-deprecation.test: Likewise. + * tests/ansi3.test: Likewise. + * tests/ansi3b.test: Likewise. + * tests/ansi4.test: Likewise. + * tests/ansi5.test: Likewise. + * tests/ansi6.test: Likewise. + * tests/ansi7.test: Likewise. + * tests/ansi8.test: Likewise. + * tests/ansi9.test: Likewise. + * tests/cxxansi.test: Likewise. + * tests/libobj8.test: Likewise. + * tests/subobj3.test: Likewise. + * tests/Makefile.am (TESTS): Update. + +2011-08-28 Stefano Lattarini + + docs: remove description of de-ANSI-fication support from manual + * doc/automake.texi (Auxiliary Programs): Remove mention of + `ansi2knr.c' and `ansi2knr.1'. + (Obsolete Macros): Remove mention of `AM_C_PROTOTYPES'. Do not + index it nor variables `ANSI2KNR' and `U' anymore. + (List of Automake options): Remove mention of `ansi2knr' option, + and obsolete entries for concept and option indexes. + (Optional): Remove entry about `AM_C_PROTOTYPES'. + (@c LocalWords): Remove `ansi' and `knr'. + (@menu, @detailmenu): Remove entries about de-ANSI-fication + support. + 2011-09-02 Stefano Lattarini coverage: vala support failing for VPATH from-scratch builds diff --cc tests/acloca10.test index 2501d516d,d7a058f60..df7da0e0f --- a/tests/acloca10.test +++ b/tests/acloca10.test @@@ -64,9 -65,7 +64,8 @@@ grep MACRO3 aclocal.m test ! -f m4_1/macro.m4 test ! -f m4_2/macro.m4 +$sleep - ACLOCAL_TESTSUITE_FLAGS='-I m4_1 -I m4_2' - $ACLOCAL --install + $ACLOCAL -I m4_1 -I m4_2 --install $AUTOCONF ./configure grep macro11 foo @@@ -77,9 -76,8 +76,9 @@@ test -f m4_1/macro.m test ! -f m4_2/macro.m4 cp aclocal.m4 copy.m4 +$sleep echo '#GREPME' >>dirlist-test/macro.m4 - $ACLOCAL --install + $ACLOCAL -I m4_1 -I m4_2 --install $AUTOCONF ./configure grep macro11 foo diff --cc tests/acloca18.test index 2b26d3f23,5032a8d9e..a7a6e2e2e --- a/tests/acloca18.test +++ b/tests/acloca18.test @@@ -52,69 -53,45 +52,63 @@@ cat >4/mumble.m4 <> foo]) EOF +cat >5/ill-formed.m4 <> foo]) +EOF + +cat >6/after-def.m4 <> foo]) +#serial 1 +EOF + - ACLOCAL_TESTSUITE_FLAGS='-I 1 -I 2 -I 3 -I 4' - - $ACLOCAL + $ACLOCAL -I 1 -I 2 -I 3 -I 4 $AUTOCONF ./configure grep macro11 foo grep macro21 foo +$sleep rm -f foo - $ACLOCAL --install + $ACLOCAL -I 1 -I 2 -I 3 -I 4 --install $AUTOCONF ./configure grep macro12 foo grep macro23 foo +$sleep - ACLOCAL_TESTSUITE_FLAGS='-I 4 -I 1 -I 2 -I 3' rm -f foo - $ACLOCAL --install --dry-run + $ACLOCAL -I 4 -I 1 -I 2 -I 3 --install --dry-run $AUTOCONF ./configure grep macro12 foo grep macro23 foo +$sleep rm -f foo - $ACLOCAL --install + $ACLOCAL -I 4 -I 1 -I 2 -I 3 --install $AUTOCONF ./configure grep macro14 foo grep macro23 foo +$sleep - ACLOCAL_TESTSUITE_FLAGS='-I 4 -I 1 -I 2' rm -f foo - $ACLOCAL --install 2>stderr && { cat stderr >&2; Exit 1; } + $ACLOCAL -I 4 -I 1 -I 2 --install 2>stderr && { cat stderr >&2; Exit 1; } cat stderr >&2 grep 'macro.*AM_MACRO2.*not found' stderr +$sleep - ACLOCAL_TESTSUITE_FLAGS='-I 4 -I 1' rm -f foo - $ACLOCAL --install + $ACLOCAL -I 4 -I 1 --install $AUTOCONF ./configure grep macro14 foo grep macro21 foo - +$sleep mkdir dirlist-test cat >dirlist-test/m1.m4 <. + +# 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="@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