2004-11-01 Alexandre Duret-Lutz <adl@gnu.org>
+ * lib/Automake/XFile.pm (lock): Make sure $ENV{'MAKEFLAGS'} exists
+ before inspecting it; this fixes "uninitialized value in
+ concatenation" diagnostics when flock fails.
+ Report from Gary V. Vaughan.
+
* aclocal.in: Use strict and -w. Declare local variables with `my',
and get rid of `local'.
(scan_m4_files, add_macro): Reindent these functions while we are
-# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003, 2004 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
# Admittedly this is a bit of a hack.
if (!flock ($fh, $mode)
&& (!$!{ENOLCK}
- || " -$ENV{'MAKEFLAGS'}" =~ / (-[BdeikrRsSw]*j|---?jobs)/))
+ || (exists $ENV{'MAKEFLAGS'}
+ && " -$ENV{'MAKEFLAGS'}" =~ / (-[BdeikrRsSw]*j|---?jobs)/)))
{
my $file = $fh->name;
- fatal "cannot lock $file with mode $mode (perhaps you are running make -j on a lame NFS client?): $!";
+ fatal ("cannot lock $file with mode $mode "
+ . "(perhaps you are running make -j on a lame NFS client?): $!");
}
}