autoconf-patches
[Top][All Lists]
Advanced

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

Remove racy commands to build scripts in bin/ and tests/.


From: Jim Meyering
Subject: Remove racy commands to build scripts in bin/ and tests/.
Date: Sun, 11 Nov 2007 20:14:26 +0100

This was a pain to track down.
It started when after a failed parallel build,
I found that tests/autoheader had been truncated to 4KB.
The theory is that when building two man/*.1 files in parallel,
that rule (changed below) would make e.g., tests/autoconf and
tests/autoheader in parallel.  And each of those make processes
would try to build the prerequisite wrapper.in at the same time.  boom.

Now that I've reordered SUBDIRS (putting 'man' after bin and tests),
there's no need for the offending rules:

        Remove racy commands to build scripts in bin/ and tests/.
        * man/Makefile.am (.x.1): Now that scripts in bin/ and tests/
        are guaranteed to be built, remove the rules that tried to build
        them.  Before, with a parallel build, these rules could lead to
        two processes writing tests/wrapper.in concurrently.

---
 ChangeLog       |    6 ++++++
 man/Makefile.am |   13 ++-----------
 2 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index b5c04b7..c0d6b7c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2007-11-11  Jim Meyering  <address@hidden>

+       Remove racy commands to build scripts in bin/ and tests/.
+       * man/Makefile.am (.x.1): Now that scripts in bin/ and tests/
+       are guaranteed to be built, remove the rules that tried to build
+       them.  Before, with a parallel build, these rules could lead to
+       two processes writing tests/wrapper.in concurrently.
+
        Accommodate non-srcdir build-from-checkout.
        * build-aux/git-version-gen: Require an additional parameter: $srcdir.
        Use git's --git-dir=$srcdir/.git option.
diff --git a/man/Makefile.am b/man/Makefile.am
index 406893a..9485d28 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -1,6 +1,6 @@
 # Make Autoconf man pages.

-# Copyright (C) 2001, 2004, 2005, 2006 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2004-2007 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
@@ -51,16 +51,7 @@ MOSTLYCLEANFILES = $(srcdir)/*.t
 SUFFIXES = .x .1

 .x.1:
-       @program=`expr "/$*" : '.*/\(.*\)'` && \
-       case $$program in \
-       config.*) ;; \
-       *) \
-         for dir in $(top_builddir)/bin $(top_builddir)/tests; do \
-           echo cd $$dir '&&' $(MAKE) $(AM_MAKEFLAGS) $$program && \
-           (cd $$dir && $(MAKE) $(AM_MAKEFLAGS) $$program) || exit; \
-         done;; \
-       esac
-       echo "Updating man page $@"
+       @echo "Updating man page $@"
        
PATH="$(top_builddir)/tests$(PATH_SEPARATOR)$(top_srcdir)/build-aux$(PATH_SEPARATOR)$$PATH";
 \
        export PATH; \
        $(HELP2MAN) \
--
1.5.3.5.622.g6fd7a




reply via email to

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