> From: Chris Bainbridge <[EMAIL PROTECTED]>
> Date: Sun, 13 Oct 2002 08:03:42 +0100
> 
> Hi, theres a bug in src/Makefile.in/am. It does:
> 
> paths.h:   
>         (echo '#define DEFAULT_DIFF_PROGRAM "$(bindir)/'`echo diff|sed   
> '$(transform)'`'"' && \   
>          echo '#define LOCALEDIR "$(localedir)"') >$@   
>    
> When make -j is used this gets run in a subshell and theres a race
> condition between paths.h being created and used. Replacing it with
> curly brackets like this works:
>
> paths.h:   
>         { echo '#define DEFAULT_DIFF_PROGRAM "$(bindir)/'`echo diff|sed   
> '$(transform)'`'"' && \   
>          echo '#define LOCALEDIR "$(localedir)"'; } >$@   
>    
> Bug report originally from gentoo linux (see 
> http://bugs.gentoo.org/show_bug.cgi?id=8934 ).

Sorry, I don't get it.  () and {;} are formally identical in this
context.  Perhaps {;} works around the bug in some cases, but I don't
see how it could be a reliable fix for the problem.

diffutils-2.8.4/src/Makefile says that diff.$(OBJECT) depends on
paths.h, so if 'make -j' is trying to start the compilation of diff.c
before finishing the build of paths.h, then it would appear that 'make
-j' is busted.  Such a bug will most likely affect other builds too,
albeit sporadically, so we really should fix the 'make -j' bug rather
than worrying about changing scads of makefiles to work around the
bug.

I'll CC: this to <[EMAIL PROTECTED]> to give them a heads-up about the
problem.  Which version of 'make' were you using?  And which shell is
'make' invoking?


_______________________________________________
Bug-make mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-make

Reply via email to