Merge branch 'maint'
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Sun, 11 Apr 2010 18:04:01 +0000 (20:04 +0200)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Sun, 11 Apr 2010 18:04:01 +0000 (20:04 +0200)
12 files changed:
ChangeLog
Makefile.in
NEWS
THANKS
lib/Automake/Channels.pm
lib/am/distdir.am
tests/Makefile.am
tests/Makefile.in
tests/aclocal3.test
tests/confh5.test
tests/distlinks.test [new file with mode: 0755]
tests/werror3.test [new file with mode: 0755]

index f1e3958..19b7772 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,42 @@
+2010-04-11  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       Fix per-Makefile.am setting of -Werror.
+       Before this patch, 'AUTOMAKE_OPTIONS = -Werror' in one
+       Makefile.am would carry over to other Makefile.am files
+       treated afterwards by the same thread, causing inconsistent
+       and unstable exit status values.
+       * lib/Automake/Channels.pm (dup_channel_setup)
+       (drop_channel_setup): Save and restore the setting of
+       $warnings_are_errors.
+       * tests/werror3.test: New test.
+       * tests/Makefile.am: Adjust.
+       * NEWS: Update.
+
+2010-04-11  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Avoid possible false negatives in cond46.test.
+       * tests/cond46.test: Enable shell `errexit' flag (and bumped
+       copyright years).  Due to this change, the testcase should now
+       fail on unexpected failures in calls to $ACLOCAL/$AUTOMAKE (whose
+       outcomes were previously unchecked), and on failures in grepping
+       the expected diagnostic in Automake stderr.
+
+       Make test `aclocal3.test' stricter.
+       * tests/aclocal3.test: Add call to `set -e'.  Fail if $ACLOCAL
+       succeds unexpectedly.
+
+       Add tests checking that symlinks are resolved by `make dist'.
+       * tests/distlinks.test: New test.
+       * tests/Makefile.am (TESTS): Updated accordingly.
+       Suggested by observations from Ralf Wildenhues.
+
+2010-04-11  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       Use -9 for maximum xz compression with dist-xz.
+       * lib/am/distdir.am (dist-xz, dist, dist-all): Pass -9 to xz.
+       * NEWS, THANKS: Update.
+       Report by Pavel Sanda.
+
 2010-04-11  Stefano Lattarini  <stefano.lattarini@gmail.com>
 
        Avoid possible false negatives in cond46.test.
index d4aa111..d8e60c0 100644 (file)
@@ -658,7 +658,7 @@ dist-lzma: distdir
        $(am__post_remove_distdir)
 
 dist-xz: distdir
-       tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz
+       tardir=$(distdir) && $(am__tar) | xz -9 -c >$(distdir).tar.xz
        $(am__post_remove_distdir)
 
 dist-tarZ: distdir
diff --git a/NEWS b/NEWS
index 4f8f8bb..74887fb 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -31,6 +31,8 @@ Bugs fixed in 1.11a:
     `make' does not contain spurious extra lines with only a backslash in them
     any more; it now again matches that from pre-1.11 Automake.
 
+  - The `dist-xz' option now uses `xz -9' for maximum compression.
+
 * Long standing bugs:
 
   - On Darwin 9, `pythondir' and `pyexecdir' pointed below `/Library/Python'
@@ -53,6 +55,8 @@ Bugs fixed in 1.11a:
   - Several scripts as well as the parallel-tests testsuite driver now
     exit with the right exit status upon receiving a signal.
 
+  - A per-Makefile.am setting of -Werror does not carry over to the
+    handling of other Makefile.am files any more.
 \f
 New in 1.11:
 
diff --git a/THANKS b/THANKS
index 06c892c..91d0f4b 100644 (file)
--- a/THANKS
+++ b/THANKS
@@ -262,6 +262,7 @@ Paul Lunau          temp@lunau.me.uk
 Paul Martinolich       martinol@datasync.com
 Paul Thomas            PTHOMAS@novell.com
 Pavel Roskin           pavel_roskin@geocities.com
+Pavel Sanda            ps@twin.jikos.cz
 Per Bothner            bothner@cygnus.com
 Per Cederqvist         ceder@lysator.liu.se
 Per Oyvind Hvidsten    poeh@enter.vg
index 223d8d2..050ba05 100644 (file)
@@ -710,8 +710,9 @@ entry, while C<drop_channel_setup ()> just deletes it.
 
 =cut
 
-use vars qw (@_saved_channels);
+use vars qw (@_saved_channels @_saved_werrors);
 @_saved_channels = ();
+@_saved_werrors = ();
 
 sub dup_channel_setup ()
 {
@@ -721,12 +722,14 @@ sub dup_channel_setup ()
       $channels_copy{$k1} = {%{$channels{$k1}}};
     }
   push @_saved_channels, \%channels_copy;
+  push @_saved_werrors, $warnings_are_errors;
 }
 
 sub drop_channel_setup ()
 {
   my $saved = pop @_saved_channels;
   %channels = %$saved;
+  $warnings_are_errors = pop @_saved_werrors;
 }
 
 =item C<buffer_messages (@types)>, C<flush_messages ()>
index 9459e75..fd82838 100644 (file)
@@ -363,7 +363,7 @@ dist-lzma: distdir
 ?XZ?DIST_ARCHIVES += $(distdir).tar.xz
 .PHONY: dist-xz
 dist-xz: distdir
-       tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz
+       tardir=$(distdir) && $(am__tar) | xz -9 -c >$(distdir).tar.xz
        $(am__post_remove_distdir)
 
 ?COMPRESS?DIST_ARCHIVES += $(distdir).tar.Z
index 62ad6aa..f51ebd7 100644 (file)
@@ -284,6 +284,7 @@ distcom5.test \
 distcom6.test \
 distcom7.test \
 distdir.test \
+distlinks.test \
 distname.test \
 dollar.test \
 dollarvar.test \
@@ -761,6 +762,7 @@ vtexi2.test \
 warnopts.test \
 werror.test \
 werror2.test \
+werror3.test \
 whoami.test \
 xsource.test \
 xz.test \
index 295d259..387af70 100644 (file)
@@ -524,6 +524,7 @@ distcom5.test \
 distcom6.test \
 distcom7.test \
 distdir.test \
+distlinks.test \
 distname.test \
 dollar.test \
 dollarvar.test \
@@ -1001,6 +1002,7 @@ vtexi2.test \
 warnopts.test \
 werror.test \
 werror2.test \
+werror3.test \
 whoami.test \
 xsource.test \
 xz.test \
index a550e50..a6aee0f 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1998, 2002, 2004  Free Software Foundation, Inc.
+# Copyright (C) 1998, 2002, 2004, 2010 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
@@ -17,6 +17,8 @@
 # Test to make sure include of include detects missing macros
 . ./defs || Exit 1
 
+set -e
+
 echo GNOME_X_CHECKS >> configure.in
 
 mkdir macros
@@ -27,6 +29,6 @@ AC_DEFUN([GNOME_X_CHECKS], [
 ])
 END
 
-$ACLOCAL -I macros 2>stderr
+$ACLOCAL -I macros 2>stderr && { cat stderr >&2; Exit 1; }
 cat stderr
 grep 'macros/gnome.m4:2:.*AM_PATH_GTK.*not found' stderr
index 15593c8..52a3054 100755 (executable)
@@ -30,7 +30,9 @@ cat > Makefile.am << 'END'
 test: distdir
        test -f $(distdir)/config.h.in
        test -f $(distdir)/include/config.h.in.in
-       test ! -e $(distdir)/include/config.h.in
+       : # Solarish Sh do not support 'test -e'
+       test ! -f $(distdir)/include/config.h.in
+       test ! -r $(distdir)/include/config.h.in
 END
 
 mkdir include
diff --git a/tests/distlinks.test b/tests/distlinks.test
new file mode 100755 (executable)
index 0000000..41a783d
--- /dev/null
@@ -0,0 +1,73 @@
+#! /bin/sh
+# Copyright (C) 2010 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 distributed symlinks in the source tree will be expanded
+# as regular files in $(distdir).
+
+. ./defs || Exit 1
+
+set -e
+
+echo text > file
+
+ln -s file lnk || {
+  echo "$me: cannot create symlinks to files" >&2
+  Exit 77
+}
+
+mkdir A
+mkdir B
+echo aaa > A/aaa
+cd B
+ln -s ../A/aaa bbb
+cd ..
+
+echo FooBarBaz > foo
+
+ln -s foo  bar1
+ln -s bar1 bar2
+ln -s bar2 bar3
+
+ln -s "`pwd`/foo" quux
+
+echo AC_OUTPUT >>configure.in
+
+echo "me = $me" > Makefile.am  # for better failure messages
+cat >> Makefile.am << 'END'
+EXTRA_DIST = lnk B/bbb bar1 bar2 bar3 quux
+.PHONY: test
+test: distdir
+       ls -l $(distdir) $(distdir)/B
+       fail() { echo "$(me): $$*" >&2; e=1; }; \
+       e=0; \
+       set file lnk A/aaa B/bbb foo quux foo bar1 foo bar2 foo bar3; \
+       while test $$# -ge 2; do \
+         file=$$1; shift; link=$(distdir)/$$1; shift; \
+         test -f $$link || fail "$$link is not a regular file"; \
+         test ! -h $$link || fail "$$link is a symlink"; \
+         diff $$file $$link || fail "$$link differs from $$file"; \
+       done; \
+       exit $$e;
+END
+
+ls -l . A B
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+./configure
+$MAKE test
diff --git a/tests/werror3.test b/tests/werror3.test
new file mode 100755 (executable)
index 0000000..96b4ff3
--- /dev/null
@@ -0,0 +1,49 @@
+#! /bin/sh
+# Copyright (C) 2010  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/>.
+
+# Make sure a per-Makefile.am -Werror setting is not carried over
+# to another Makefile.am.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >>configure.in <<\END
+AC_CONFIG_FILES([sub/Makefile])
+AC_OUTPUT
+END
+
+mkdir sub
+cat >sub/Makefile.am <<\END
+AUTOMAKE_OPTIONS = -Werror
+END
+cat >Makefile.am <<\END
+VAR = foo
+VAR = bar
+END
+
+$ACLOCAL
+
+# The issue would not manifest with threaded execution.
+unset AUTOMAKE_JOBS || :
+AUTOMAKE_run 0 -Wno-error
+grep 'VAR multiply defined' stderr
+
+AUTOMAKE_JOBS=2
+export AUTOMAKE_JOBS
+AUTOMAKE_run 0 -Wno-error
+grep 'VAR multiply defined' stderr
+: