automake-commit
[Top][All Lists]
Advanced

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

[Automake-commit] [SCM] GNU Automake branch, micro, updated. v1.14-23-g1


From: Stefano Lattarini
Subject: [Automake-commit] [SCM] GNU Automake branch, micro, updated. v1.14-23-g16d8cb0
Date: Sat, 02 Nov 2013 02:45:59 +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=16d8cb026a41d9344b1d0cf291b663fd48fa0f45

The branch, micro has been updated
       via  16d8cb026a41d9344b1d0cf291b663fd48fa0f45 (commit)
       via  e5eb95ce956adc428b65414ebf28bb5b96d74b9f (commit)
       via  52e6404590f0a8824cf5f9522a2dc3151c2af9f3 (commit)
       via  073b1fe85068620eb6c06432b1be13c40394a177 (commit)
       via  9b156829b0ffac5e657b801b1f852608cfe8fc97 (commit)
       via  608d1a7908893b2896f5efd2a4ed22d7901262ed (commit)
      from  8a310a5fa5a908cf8771e44431e5743fb0e8b026 (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 16d8cb026a41d9344b1d0cf291b663fd48fa0f45
Author: Stefano Lattarini <address@hidden>
Date:   Sat Nov 2 02:33:33 2013 +0000

    cosmetics: fix typo in a user-facing message in tests
    
    * t/lex-header.sh: A "skip" message in this test, precisely.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit e5eb95ce956adc428b65414ebf28bb5b96d74b9f
Merge: 8a310a5 9b15682 52e6404
Author: Stefano Lattarini <address@hidden>
Date:   Fri Nov 1 22:41:23 2013 +0000

    Merge branches 'fix-pr14991' and 'fix-pr14891' into micro
    
    * fix-pr14991:
      distcheck: don't allow overriding of --prefix and --srcdir by the user
      tests: expose bug#14991 (relates to 'distcheck')
    
    * fix-pr14891:
      automake: account for perl hash order randomization
      tests: avoid use of intervals to capitalize letters

commit 52e6404590f0a8824cf5f9522a2dc3151c2af9f3
Author: Stefano Lattarini <address@hidden>
Date:   Sun Jul 21 17:58:05 2013 +0100

    automake: account for perl hash order randomization
    
    Try to explicitly order the keys of some perl hashes when looping
    on them to do sanity/correctness checks and possibly display warning
    messages; this should ensure a more reproducible output.  Not really
    a big deal, but I prefer to keep the order of such output reproducible
    if possible.
    
    Issue revealed by spurious testsuite failures with perl 5.18, as
    reported in automake bug#14891.  See also:
    
<http://search.cpan.org/dist/perl-5.18.0/pod/perldelta.pod#Hash_randomization>
    
<http://onionstand.blogspot.ie/2012/12/are-you-relying-on-hash-keys-being.html>
    
    * lib/Automake/Variable.pm (variables): Explicitly order the values of
    the returned Automake::Variable instances.
    (variables_dump): Simplify, using the knowledge that 'variables()' now
    sorts its output.
    * t/preproc-errmsg.sh: Adjust.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 073b1fe85068620eb6c06432b1be13c40394a177
Author: Stefano Lattarini <address@hidden>
Date:   Sun Jul 21 17:15:38 2013 +0100

    tests: avoid use of intervals to capitalize letters
    
    It was causing spurious failures with with Solaris 8 'tr'.
    See automake bug#14891.
    
    * t/test-extensions.sh: Adjust.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 9b156829b0ffac5e657b801b1f852608cfe8fc97
Author: Stefano Lattarini <address@hidden>
Date:   Wed Oct 30 21:41:39 2013 +0000

    distcheck: don't allow overriding of --prefix and --srcdir by the user
    
    Not through AM_DISTCHECK_FLAGS, nor through DISTCHECK_FLAGS.  Apparently,
    some packages got in the habit of relaying all the options passed to the
    original ./configure invocation through to the configure invocations
    in "make distcheck".  This was causing problems, because it also passed
    through the original --srcdir and --prefix options.
    
    Fixes: expose bug#14991 (relates to 'distcheck')
    
    * lib/am/distdir.am (distcheck): Pass the hard-coded --srcdir and
    --prefix options *after* both the developer-defined options in
    $(AM_DISTCHECK_FLAGS) and the user-defined options in $(DISTCHECK_FLAGS).
    * t/list-of-tests.mk (XFAIL_TESTS): Remove the now-passing test
    'distcheck-no-destdist-or-srcdir-override.sh'.
    * doc/automake.texi (Checking the Distribution): Update.
    * NEWS: Likewise.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 608d1a7908893b2896f5efd2a4ed22d7901262ed
Author: Stefano Lattarini <address@hidden>
Date:   Wed Oct 30 21:02:14 2013 +0000

    tests: expose bug#14991 (relates to 'distcheck')
    
    * t/distcheck-no-prefix-or-srcdir-override.sh: New, expose the bug.
    * t/list-of-tests.mk (handwritten_TESTS, XFAIL_TESTS): Add it.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

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

Summary of changes:
 NEWS                                        |    7 +++
 doc/automake.texi                           |   17 +++++--
 lib/Automake/Variable.pm                    |   14 +++---
 lib/am/distdir.am                           |   11 +++--
 t/distcheck-no-prefix-or-srcdir-override.sh |   60 +++++++++++++++++++++++++++
 t/lex-header.sh                             |    2 +-
 t/list-of-tests.mk                          |    1 +
 t/preproc-errmsg.sh                         |    4 +-
 t/test-extensions.sh                        |    2 +-
 9 files changed, 98 insertions(+), 20 deletions(-)
 create mode 100644 t/distcheck-no-prefix-or-srcdir-override.sh

diff --git a/NEWS b/NEWS
index aaec7c0..614eba6 100644
--- a/NEWS
+++ b/NEWS
@@ -108,12 +108,19 @@ New in 1.14.1:
 
 * Bugs fixed:
 
+  - The user is no longer allowed to override the --srcdir nor the --prefix
+    configure options used by "make distcheck" (bug#14991).
+
   - Fixed a gross inefficiency in the recipes for installing byte-compiled
     python files, that was causing an O(N^2) performance on the number N of
     files, instead of the expected O(N) performance.  Note that this bug
     was only relevant when the number of python files was high (which is
     unusual in practice).
 
+  - Automake try to offer a more reproducible output for warning messages,
+    in the face of the newly-introduced randomization for hash keys order
+    in Perl 5.18.
+
   - The 'test-driver' script now actually error out with a clear error
     message on the most common invalid usages.
 
diff --git a/doc/automake.texi b/doc/automake.texi
index 62728d4..cd33ad7 100644
--- a/doc/automake.texi
+++ b/doc/automake.texi
@@ -8556,11 +8556,18 @@ to supply additional flags to @command{configure}, 
define them in the
 @file{Makefile.am}.  The user can still extend or override the flags
 provided there by defining the @code{DISTCHECK_CONFIGURE_FLAGS} variable,
 on the command line when invoking @command{make}.
-
-Still, developers are encouraged to strive to make their code buildable
-without requiring any special configure option; thus, in general, you
-shouldn't define @code{AM_DISTCHECK_CONFIGURE_FLAGS}. However, there
-might be few scenarios in which the use of this variable is justified.
address@hidden See automake bug#14991 for more details about how the following 
holds.
+It's worth nothing that @command{make distcheck} needs complete control
+over the @command{configure} options @option{--srcdir} and
address@hidden, so those options cannot be overridden by
address@hidden nor by
address@hidden
+
+Also note that developers are encouraged to strive to make their code
+buildable without requiring any special configure option; thus, in
+general, you shouldn't define @code{AM_DISTCHECK_CONFIGURE_FLAGS}.
+However, there might be few scenarios in which the use of this variable
+is justified.
 GNU @command{m4} offers an example.  GNU @command{m4} configures by
 default with its experimental and seldom used "changeword" feature
 disabled; so in its case it is useful to have @command{make distcheck}
diff --git a/lib/Automake/Variable.pm b/lib/Automake/Variable.pm
index f1559f5..4751563 100644
--- a/lib/Automake/Variable.pm
+++ b/lib/Automake/Variable.pm
@@ -317,21 +317,21 @@ use vars '%_variable_dict', '%_primary_dict';
 sub variables (;$)
 {
   my ($suffix) = @_;
+  my @vars = ();
   if ($suffix)
     {
       if (exists $_primary_dict{$suffix})
        {
-         return values %{$_primary_dict{$suffix}};
-       }
-      else
-       {
-         return ();
+         @vars = values %{$_primary_dict{$suffix}};
        }
     }
   else
     {
-      return values %_variable_dict;
+      @vars = values %_variable_dict;
     }
+  # The behaviour of the 'sort' built-in is undefined in scalar
+  # context, hence we need an ad-hoc handling for such context.
+  return wantarray ? sort { $a->name cmp $b->name } @vars : scalar @vars;
 }
 
 =item C<Automake::Variable::reset>
@@ -1080,7 +1080,7 @@ For debugging.
 sub variables_dump ()
 {
   my $text = "all variables:\n{\n";
-  foreach my $var (sort { $a->name cmp $b->name } variables)
+  foreach my $var (variables())
     {
       $text .= $var->dump;
     }
diff --git a/lib/am/distdir.am b/lib/am/distdir.am
index f354987..a8ad63c 100644
--- a/lib/am/distdir.am
+++ b/lib/am/distdir.am
@@ -452,13 +452,16 @@ distcheck: dist
 ## so be sure to 'cd' back to the original directory after this.
          && am__cwd=`pwd` \
          && $(am__cd) $(distdir)/_build \
-         && ../configure --srcdir=.. --prefix="$$dc_install_base" \
+         && ../configure \
 ?GETTEXT?          --with-included-gettext \
-## Additional flags for configure.  Keep this last in the configure
-## invocation so the developer and user can override previous options,
-## and let the user's flags take precedence over the developer's ones.
+## Additional flags for configure.
            $(AM_DISTCHECK_CONFIGURE_FLAGS) \
            $(DISTCHECK_CONFIGURE_FLAGS) \
+## At the moment, the code doesn't actually support changes in these --srcdir
+## and --prefix values, so don't allow them to be overridden by the user or
+## the developer.  That used to be allowed, and caused issues in practice
+## (in corner-case usages); see automake bug#14991.
+           --srcdir=.. --prefix="$$dc_install_base" \
          && $(MAKE) $(AM_MAKEFLAGS) \
          && $(MAKE) $(AM_MAKEFLAGS) dvi \
          && $(MAKE) $(AM_MAKEFLAGS) check \
diff --git a/t/distcheck-no-prefix-or-srcdir-override.sh 
b/t/distcheck-no-prefix-or-srcdir-override.sh
new file mode 100644
index 0000000..9b9a56f
--- /dev/null
+++ b/t/distcheck-no-prefix-or-srcdir-override.sh
@@ -0,0 +1,60 @@
+#! /bin/sh
+# Copyright (C) 2013 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 that "make distcheck" overrides any --srcdir or --prefix flag
+# (mistakenly) defined in $(AM_DISTCHECK_CONFIGURE_FLAGS) or
+# $(DISTCHECK_CONFIGURE_FLAGS).  See automake bug#14991.
+
+. test-init.sh
+
+echo AC_OUTPUT >> configure.ac
+
+orig_cwd=$(pwd); export orig_cwd
+
+cat > Makefile.am << 'END'
+# configure should choke on non-absolute prefix or non-existent
+# srcdir.  We'll sanity-check that later.
+AM_DISTCHECK_CONFIGURE_FLAGS = --srcdir am-src --prefix am-pfx
+END
+
+# Same comments as above applies.
+DISTCHECK_CONFIGURE_FLAGS='--srcdir user-src --prefix user-pfx'
+export DISTCHECK_CONFIGURE_FLAGS
+
+$ACLOCAL
+$AUTOMAKE
+$AUTOCONF
+
+# Sanity check: configure should choke on non-absolute prefix
+# or non-existent srcdir.
+./configure --prefix foobar 2>stderr && { cat stderr >&2; exit 99; }
+cat stderr >&2
+grep "expected an absolute directory name for --prefix" stderr || exit 99
+./configure --srcdir foobar 2>stderr && { cat stderr >&2; exit 99; }
+cat stderr >&2
+grep "cannot find sources.* in foobar" stderr || exit 99
+
+./configure
+run_make -E -O distcheck
+test ! -s stderr
+# Sanity check: the flags have been actually seen.
+$PERL -e 'undef $/; $_ = <>; s/ \\\n/ /g; print;' <stdout >t
+grep '/configure .* --srcdir am-src'   t || exit 99
+grep '/configure .* --prefix am-pfx'   t || exit 99
+grep '/configure .* --srcdir user-src' t || exit 99
+grep '/configure .* --prefix user-pfx' t || exit 99
+
+:
diff --git a/t/lex-header.sh b/t/lex-header.sh
index 0789af4..1ba81dd 100644
--- a/t/lex-header.sh
+++ b/t/lex-header.sh
@@ -24,7 +24,7 @@ required='cc flex'
 # 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"
+  || skip_ "flex doesn't support the '--header-file' option"
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/list-of-tests.mk b/t/list-of-tests.mk
index 9069b08..75f303a 100644
--- a/t/list-of-tests.mk
+++ b/t/list-of-tests.mk
@@ -422,6 +422,7 @@ t/distcheck-hook2.sh \
 t/distcheck-writable-srcdir.sh \
 t/distcheck-missing-m4.sh \
 t/distcheck-outdated-m4.sh \
+t/distcheck-no-prefix-or-srcdir-override.sh \
 t/distcheck-override-infodir.sh \
 t/distcheck-pr9579.sh \
 t/distcheck-pr10470.sh \
diff --git a/t/preproc-errmsg.sh b/t/preproc-errmsg.sh
index 704562d..87bcf81 100644
--- a/t/preproc-errmsg.sh
+++ b/t/preproc-errmsg.sh
@@ -58,11 +58,11 @@ Makefile.am:2: 'sub/local.mk' included from here
 sub/local.mk:3: 'sub-two.a' is not a standard library name
 sub/local.mk:3: did you mean 'libsub-two.a'?
 Makefile.am:2: 'sub/local.mk' included from here
-Makefile.am:1: variable 'x1_SOURCES' is defined but no program or
-Makefile.am:1: library has 'x1' as canonical name (possible typo)
 sub/local.mk:4: variable 'sub_x2_SOURCES' is defined but no program or
 sub/local.mk:4: library has 'sub_x2' as canonical name (possible typo)
 Makefile.am:2: 'sub/local.mk' included from here
+Makefile.am:1: variable 'x1_SOURCES' is defined but no program or
+Makefile.am:1: library has 'x1' as canonical name (possible typo)
 END
 
 # We need to break these substitutions into multiple sed invocations
diff --git a/t/test-extensions.sh b/t/test-extensions.sh
index 0700991..ca7c5ec 100644
--- a/t/test-extensions.sh
+++ b/t/test-extensions.sh
@@ -39,7 +39,7 @@ $AUTOMAKE -a
 grep -i 'log' Makefile.in # For debugging.
 
 for lc in $valid_extensions; do
-  uc=$(echo $lc | tr '[a-z]' '[A-Z]')
+  uc=$(echo $lc | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ)
   $FGREP "\$(${uc}_LOG_COMPILER)" Makefile.in
   grep "^${uc}_LOG_COMPILE =" Makefile.in
   grep "^\.${lc}\.log:" Makefile.in


hooks/post-receive
-- 
GNU Automake



reply via email to

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