225 |
# However, if the invoker is using "make -j", the problem is not harmless, |
# However, if the invoker is using "make -j", the problem is not harmless, |
226 |
# so report it in that case. Admittedly this is a bit of a hack. |
# so report it in that case. Admittedly this is a bit of a hack. |
227 |
if (!flock ($fh, $mode) |
if (!flock ($fh, $mode) |
228 |
&& (!$!{ENOLCK} || " $ENV{'MAKEFLAGS'} " =~ / -j /)) |
&& (!$!{ENOLCK} || " $ENV{'MAKEFLAGS'}" =~ / (-j|--jobs)/)) |
229 |
{ |
{ |
230 |
my $file = $fh->name; |
my $file = $fh->name; |
231 |
fatal "cannot lock $file with mode $mode: $!"; |
fatal "cannot lock $file with mode $mode: $!"; |