summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkim Demaille <akim@epita.fr>2003-10-23 14:29:22 +0000
committerAkim Demaille <akim@epita.fr>2003-10-23 14:29:22 +0000
commit52cb203dab9693a51a703e93544c6f471351a15b (patch)
treed0179b94771ec661a8c3114c29d48d29fd89505e
parent44784989cab68201bef7b36c6982ed15959f5f49 (diff)
downloadautomake-52cb203dab9693a51a703e93544c6f471351a15b.tar.gz
* lib/Automake/XFile.pm: Don't assume -j is solo.
Issue a more-informative diagnostic. Problems reported by Eric Sunshine.
-rw-r--r--ChangeLog6
-rw-r--r--lib/Automake/XFile.pm9
2 files changed, 12 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 79590306a..eab127826 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2003-10-23 Paul Eggert <eggert@twinsun.com>
+
+ * lib/Automake/XFile.pm: Don't assume -j is solo.
+ Issue a more-informative diagnostic.
+ Problems reported by Eric Sunshine.
+
2003-10-21 Alexandre Duret-Lutz <adl@gnu.org>
* m4/lispdir.m4 (AM_PATH_LISPDIR): Always check for Emacs.
diff --git a/lib/Automake/XFile.pm b/lib/Automake/XFile.pm
index 8c719e30f..279317b7c 100644
--- a/lib/Automake/XFile.pm
+++ b/lib/Automake/XFile.pm
@@ -223,12 +223,15 @@ sub lock
# perl was not built with -Ud_flock. Normally, this problem is harmless,
# so ignore the ENOLCK errors that are reported in that situation,
# However, if the invoker is using "make -j", the problem is not harmless,
- # so report it in that case. Admittedly this is a bit of a hack.
+ # so report it in that case, by inspecting MAKEFLAGS and looking for
+ # any arguments indicating that the invoker used -j.
+ # Admittedly this is a bit of a hack.
if (!flock ($fh, $mode)
- && (!$!{ENOLCK} || " $ENV{'MAKEFLAGS'}" =~ / (-j|--jobs)/))
+ && (!$!{ENOLCK}
+ || " -$ENV{'MAKEFLAGS'}" =~ / (-[BdeikrRsSw]*j|---?jobs)/))
{
my $file = $fh->name;
- fatal "cannot lock $file with mode $mode: $!";
+ fatal "cannot lock $file with mode $mode (perhaps you are running make -j on a lame NFS client?): $!";
}
}