At 12:12 PM -0700 7/24/03, Tim Kientzle wrote:
Garance A Drosihn wrote:
So indeed, that 'make depend' had not finished before the
'make' for the object had started.
There's another possibility here: suppose two copies
of make are running simultaneously and both get to
this sequence at about the same time:
tar_make:
(cd $(tar_SRCDIR) && \
$(MAKE) $(BUILDOPTS) $(tar_OPTS) depend &&\
$(MAKE) $(BUILDOPTS) $(tar_OPTS) $(tar_OBJS))
The first make to run this will start building dependencies.
The second copy will see that ".depend" already exists (note
that bsd.dep.mk builds .depend incrementally) and then go on
to the next step.
I am still not exactly sure what is going on here, but it
looks like Gordon has committed a change which has solved
the problem which I kept running into. It's a little
tricky to figure out exactly what is going on, since the
problem so dependent upon the exact timing of the events.
However, I would note that in at least some of my testing,
the .depend file did *not* exist -- not at all -- in the
directory that it needed to be in.
Still, it does sound like a good idea to make the creation
of .depend to be an atomic operation. I might prefer to use
the 'mktemp' command, instead of adding a PID. Something
along the lines of:
DEPENDTMP=`mktemp ${DEPENDFILE}.XXXXX`
--
Garance Alistair Drosehn = [EMAIL PROTECTED]
Senior Systems Programmer or [EMAIL PROTECTED]
Rensselaer Polytechnic Institute or [EMAIL PROTECTED]
_______________________________________________
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[EMAIL PROTECTED]"