[Top][All Lists]

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

Re: maintainer mode parallel make issue

From: Ralf Wildenhues
Subject: Re: maintainer mode parallel make issue
Date: Sun, 19 Apr 2009 00:27:34 +0200
User-agent: Mutt/1.5.18 (2008-05-17)

Tangential to this issue, I think XFile::lock should warn resp. fail
also when parallel non-GNU make is used and exposes a locking issue.
I'm not quite sure whether this can actually happen in practice, as
for example BSD make does not update the target `Makefile' before
updating regular targets, but it might, and anyway this seems to be a
prudent safety measure.

Any reasons against applying this to Automake and pulling it into
Autoconf (as this file is shared between both packages)?

Running "make autom4te-update" in the Autoconf tree currently requires
another small patch to Autoconf, in order to cope with Automake changes,
which I will post shortly.


    Let XFile::lock warn and fail with parallel non-GNU make, too.
    * lib/Automake/ (lock): Also match `-j' for parallel BSD
    make, and `-P' for parallel HP-UX make.

diff --git a/lib/Automake/ b/lib/Automake/
index 27f2455..6e5005f 100644
--- a/lib/Automake/
+++ b/lib/Automake/
@@ -1,4 +1,4 @@
-# Copyright (C) 2001, 2003, 2004, 2006, 2008 Free Software Foundation,
+# Copyright (C) 2001, 2003, 2004, 2006, 2008, 2009 Free Software Foundation,
 # Inc.
 # This program is free software; you can redistribute it and/or modify
@@ -222,16 +222,18 @@ sub lock
   # first of flock(2), fcntl(2), or lockf(3) that works.  These can fail on
   # NFS-backed files, with ENOLCK (GNU/Linux) or EOPNOTSUPP (FreeBSD); we
   # usually ignore these errors.  If $ENV{MAKEFLAGS} suggests that a parallel
-  # invocation of GNU `make' has invoked the tool we serve, report all locking
+  # invocation of `make' has invoked the tool we serve, report all locking
   # failures and abort.
   # On Unicos, flock(2) and fcntl(2) over NFS hang indefinitely when `lockd' is
   # not running.  NetBSD NFS clients silently grant all locks.  We do not
   # attempt to defend against these dangers.
+  #
+  # -j is for parallel BSD make, -P is for parallel HP-UX make.
   if (!flock ($fh, $mode))
       my $make_j = (exists $ENV{'MAKEFLAGS'}
-                   && " -$ENV{'MAKEFLAGS'}" =~ / (-[BdeikrRsSw]*j|---?jobs)/);
+                   && " -$ENV{'MAKEFLAGS'}" =~ / 
       my $note = "\nforgo `make -j' or use a file system that supports locks";
       my $file = $fh->name;

reply via email to

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