From 74cdef7897da220bf062957ff9699815681441ef Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sat, 23 Aug 2014 07:55:28 -0700 Subject: build: fix race in parallel builds Reported by Friedrich Beckmann in: http://bugs.gnu.org/18301 * lib/am/texi-vers.am (?DIRSTAMP?): Put the process-ID into the temporary file name. Use a similar temporary in the source dir. --- lib/am/texi-vers.am | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/am/texi-vers.am b/lib/am/texi-vers.am index bddf3827d..e98bb8234 100644 --- a/lib/am/texi-vers.am +++ b/lib/am/texi-vers.am @@ -31,25 +31,25 @@ DIST_COMMON += %VTEXI% %STAMPVTI% ## %STAMPVTI% is distributed and %DIRSTAMP% isn't: a distributed file ## should never be dependent upon a non-distributed built file. ## Therefore we ensure that %DIRSTAMP% exists in the rule. +## Use cp + mv so that the update of %VTEXI% is atomic even if +## the source directory is on a different file system. ?DIRSTAMP? @test -f %DIRSTAMP% || $(MAKE) $(AM_MAKEFLAGS) %DIRSTAMP% @(dir=.; test -f ./%TEXI% || dir=$(srcdir); \ set `$(SHELL) %MDDIR%mdate-sh $$dir/%TEXI%`; \ echo "@set UPDATED $$1 $$2 $$3"; \ echo "@set UPDATED-MONTH $$2 $$3"; \ echo "@set EDITION $(VERSION)"; \ - echo "@set VERSION $(VERSION)") > %VTI%.tmp -## Use cp and rm here because some older "mv"s can't move across -## filesystems. Furthermore, GNU "mv" in the AmigaDOS environment -## can't handle this. - @cmp -s %VTI%.tmp %VTEXI% \ - || (echo "Updating %VTEXI%"; \ - cp %VTI%.tmp %VTEXI%) - -@rm -f %VTI%.tmp + echo "@set VERSION $(VERSION)") > %VTI%.tmp$$$$ && \ + (cmp -s %VTI%.tmp$$$$ %VTEXI% \ + || (echo "Updating %VTEXI%" && \ + cp %VTI%.tmp$$$$ %VTEXI%.tmp$$$$ && \ + mv %VTEXI%.tmp$$$$ %VTEXI%)) && \ + rm -f %VTI%.tmp$$$$ %VTEXI%.$$$$ @cp %VTEXI% $@ mostlyclean-am: mostlyclean-%VTI% mostlyclean-%VTI%: - -rm -f %VTI%.tmp + -rm -f %VTI%.tmp* %VTEXI%.tmp* maintainer-clean-am: maintainer-clean-%VTI% maintainer-clean-%VTI%: -- cgit v1.2.1 From 6465c530f7a6b6a88a839b7afe64e5a76429050c Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sat, 23 Aug 2014 07:55:28 -0700 Subject: build: fix race in parallel builds Reported by Friedrich Beckmann in: http://bugs.gnu.org/18301 * lib/am/texi-vers.am (?DIRSTAMP?): Put the process-ID into the temporary file name. Use a similar temporary in the source dir. --- lib/am/texi-vers.am | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/am/texi-vers.am b/lib/am/texi-vers.am index b3a8d1239..ec91dfe02 100644 --- a/lib/am/texi-vers.am +++ b/lib/am/texi-vers.am @@ -31,25 +31,25 @@ DIST_COMMON += %VTEXI% %STAMPVTI% ## %STAMPVTI% is distributed and %DIRSTAMP% isn't: a distributed file ## should never be dependent upon a non-distributed built file. ## Therefore we ensure that %DIRSTAMP% exists in the rule. +## Use cp + mv so that the update of %VTEXI% is atomic even if +## the source directory is on a different file system. ?DIRSTAMP? @test -f %DIRSTAMP% || $(MAKE) $(AM_MAKEFLAGS) %DIRSTAMP% @(dir=.; test -f ./%TEXI% || dir=$(srcdir); \ set `$(SHELL) %MDDIR%mdate-sh $$dir/%TEXI%`; \ echo "@set UPDATED $$1 $$2 $$3"; \ echo "@set UPDATED-MONTH $$2 $$3"; \ echo "@set EDITION $(VERSION)"; \ - echo "@set VERSION $(VERSION)") > %VTI%.tmp -## Use cp and rm here because some older "mv"s can't move across -## filesystems. Furthermore, GNU "mv" in the AmigaDOS environment -## can't handle this. - @cmp -s %VTI%.tmp %VTEXI% \ - || (echo "Updating %VTEXI%"; \ - cp %VTI%.tmp %VTEXI%) - -@rm -f %VTI%.tmp + echo "@set VERSION $(VERSION)") > %VTI%.tmp$$$$ && \ + (cmp -s %VTI%.tmp$$$$ %VTEXI% \ + || (echo "Updating %VTEXI%" && \ + cp %VTI%.tmp$$$$ %VTEXI%.tmp$$$$ && \ + mv %VTEXI%.tmp$$$$ %VTEXI%)) && \ + rm -f %VTI%.tmp$$$$ %VTEXI%.$$$$ @cp %VTEXI% $@ mostlyclean-am: mostlyclean-%VTI% mostlyclean-%VTI%: - -rm -f %VTI%.tmp + -rm -f %VTI%.tmp* %VTEXI%.tmp* maintainer-clean-am: maintainer-clean-%VTI% maintainer-clean-%VTI%: -- cgit v1.2.1 From 5b3b1c83b47c1e29629049046b982636938d2b5d Mon Sep 17 00:00:00 2001 From: Stefano Lattarini Date: Wed, 17 Dec 2014 15:14:16 +0100 Subject: Expose automake bug#19311 AC_PROG_CC called before AC_CONFIG_AUX_DIR can silently force wrong $ac_aux_dir definition. * t/auxdir-pr19311.sh: New. * t/list-of-tests.mk: Add it as an XFAIL test. Signed-off-by: Stefano Lattarini --- t/auxdir-pr19311.sh | 45 +++++++++++++++++++++++++++++++++++++++++++++ t/list-of-tests.mk | 2 ++ 2 files changed, 47 insertions(+) create mode 100644 t/auxdir-pr19311.sh diff --git a/t/auxdir-pr19311.sh b/t/auxdir-pr19311.sh new file mode 100644 index 000000000..56c71a10a --- /dev/null +++ b/t/auxdir-pr19311.sh @@ -0,0 +1,45 @@ +#! /bin/sh +# Copyright (C) 2014 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 . + +# Automake bug#19311: AC_PROG_CC called before AC_CONFIG_AUX_DIR can +# silently force wrong $ac_aux_dir definition. + +am_create_testdir=empty +required=cc +. test-init.sh + +cat > configure.ac < Makefile.am + +mkdir build-aux + +$ACLOCAL +$AUTOMAKE -a +$AUTOCONF + +test -f build-aux/compile +test -f build-aux/install-sh + +./configure + +: diff --git a/t/list-of-tests.mk b/t/list-of-tests.mk index e6ee8569b..8d458f55e 100644 --- a/t/list-of-tests.mk +++ b/t/list-of-tests.mk @@ -30,6 +30,7 @@ t/pm/Version3.pl XFAIL_TESTS = \ t/all.sh \ +t/auxdir-pr19311.sh \ t/cond17.sh \ t/gcj6.sh \ t/override-conditional-2.sh \ @@ -185,6 +186,7 @@ t/auxdir-autodetect.sh \ t/auxdir-computed.tap \ t/auxdir-misplaced.sh \ t/auxdir-nonexistent.sh \ +t/auxdir-pr19311.sh \ t/auxdir-unportable.tap \ t/backcompat.sh \ t/backcompat2.sh \ -- cgit v1.2.1 From 153745f2bbb5e9c3526a6c2949f835ce7778f7cb Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Wed, 17 Dec 2014 17:47:59 +0100 Subject: Automake docs: fix typos and use of British English * doc/automake.texi: Here. Signed-off-by: Stefano Lattarini --- doc/automake.texi | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/automake.texi b/doc/automake.texi index 20855d692..736d61dc6 100644 --- a/doc/automake.texi +++ b/doc/automake.texi @@ -1830,7 +1830,7 @@ variable definitions. @cindex indentation in Makefile.am Generally, Automake is not particularly smart in the parsing of unusual Makefile constructs, so you're advised to avoid fancy constructs or -``creative'' use of whitespaces. +``creative'' use of whitespace. @c Keep this in sync with doc-parsing-buglets-tabs.sh For example, @key{TAB} characters cannot be used between a target name and the following ``@code{:}'' character, and variable assignments @@ -3278,7 +3278,7 @@ find third-party @file{.m4} files. When this option is given, normal processing is suppressed. This option was used @emph{in the past} by third-party packages to determine where to install @file{.m4} macro files, but @emph{this usage is today discouraged}, since it causes -@samp{$(prefix)} not to be thoroughly honoured (which violates the +@samp{$(prefix)} not to be thoroughly honored (which violates the GNU Coding Standards), and a similar semantics can be better obtained with the @env{ACLOCAL_PATH} environment variable; @pxref{Extending aclocal}. @@ -3474,7 +3474,7 @@ Also note that, if the @option{--install} option is used, any @file{.m4} file containing a required macro that is found in a directory listed in @env{ACLOCAL_PATH} will be installed locally. @c Keep in sync with aclocal-path-installed-serial.sh -In this case, serial numbers in @file{.m4} are honoured too, +In this case, serial numbers in @file{.m4} are honored too, @pxref{Serials}. Conversely to @file{dirlist}, @env{ACLOCAL_PATH} is useful if you are @@ -7876,7 +7876,7 @@ All of these targets can be extended using @samp{-local} rules If the @file{.texi} file @code{@@include}s @file{version.texi}, then that file will be automatically generated. The file @file{version.texi} -defines four Texinfo flag you can reference using +defines four Texinfo flags you can reference using @code{@@value@{EDITION@}}, @code{@@value@{VERSION@}}, @code{@@value@{UPDATED@}}, and @code{@@value@{UPDATED-MONTH@}}. @@ -8478,7 +8478,7 @@ dist-hook: rm -rf `find $(distdir)/doc -type d -name .svn` @end example -@c The caveates described here should be documented in 'disthook.sh'. +@c The caveats described here should be documented in 'disthook.sh'. @noindent Note that the @code{dist-hook} recipe shouldn't assume that the regular files in the distribution directory are writable; this might not be the @@ -9491,7 +9491,7 @@ The @file{.trs} file is used to register some metadata through the use of custom reStructuredText fields. This metadata is expected to be employed in various ways by the parallel test harness; for example, to count the test results when printing the testsuite summary, or to decide -which tests to re-run upon @command{make reheck}. Unrecognized metadata +which tests to re-run upon @command{make recheck}. Unrecognized metadata in a @file{.trs} file is currently ignored by the harness, but this might change in the future. The list of currently recognized metadata follows. -- cgit v1.2.1 From 3f9fc60baa2e7f9324e17a26f592e92148b7117c Mon Sep 17 00:00:00 2001 From: Thomas Jahns Date: Thu, 7 Aug 2014 11:03:06 +0200 Subject: Fix dumb logic error preventing $install_sh from being be overridden * m4/install-sh.m4: Here. * THANKS: Update. Signed-off-by: Stefano Lattarini --- THANKS | 1 + m4/install-sh.m4 | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/THANKS b/THANKS index eef67c353..6fd71150c 100644 --- a/THANKS +++ b/THANKS @@ -393,6 +393,7 @@ Theodoros V. Kalamatianos thkala@gmail.com Thien-Thi Nguyen ttn@glug.org Thomas Fitzsimmons fitzsim@redhat.com Thomas Gagne tgagne@ix.netcom.com +Thomas Jahns jahns@dkrz.de Thomas Klausner tk@giga.or.at Thomas Morgan tmorgan@pobox.com Thomas Schwinge tschwinge@gnu.org diff --git a/m4/install-sh.m4 b/m4/install-sh.m4 index 094c10a85..16a3d9c33 100644 --- a/m4/install-sh.m4 +++ b/m4/install-sh.m4 @@ -10,7 +10,7 @@ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -if test x"${install_sh}" != xset; then +if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; -- cgit v1.2.1