On Wed, Nov 20, 2002 at 11:53:45PM -0600, Dan Nelson wrote:
> .y.out uses a constant filename (y.tab.c) as an intermediate file.  If
> make -j decided to compile two .y files in the same directory at the
> same time, one's going to get overwritten.  .l.out avoids this by using
> ${.PREFIX}, which expands to the filename of the source file minus path
> and extension.  .y.out could be made safe by making the first line 
> 
>    ${YACC} ${YFLAGS} -o ${.PREFIX}.y.tmp.c ${.IMPSRC}
> 
> and replacing y.tab.c. with ${.PREFIX}.y.tmp.c .  For good measure,
> .l.out should probably be using ${.PREFIX}.l.tmp.c, just so you can
> tell which rule generated a particular tempfile.

Ah, that does paint it succinctly.  If your suggestion is sound,
should it be perhaps submitted as a PR to make 'make' even safer
by default?

> -- 
>       Dan Nelson
>       [EMAIL PROTECTED]

-- 
Brian 'you Bastard' Reichert            <[EMAIL PROTECTED]>
37 Crystal Ave. #303                    Daytime number: (603) 434-6842
Derry NH 03038-1713 USA                 Intel architecture: the left-hand path

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to