> From: "Noel Yap" <[EMAIL PROTECTED]>
> Robert Mecklenburg wrote:
> > %.o: %.c %.mkdir
> >
> > So I was thinking the target would be, say, "out/bar.o". Now, with the
> > "slow" version it has prereq of "out/bar.mkdir" (In the slow version we
omit
> > the .. path component.) Then the command script executes:
> >
> > @mkdir -p $(dir out/bar.mkdir)
> > @touch out/bar.mkdir
>
> I see. Doing this would create one directory per object file
I must be off today, I don't understand. This would execute mkdir for each
object file, but it would not create a new directory each time (or did I
miss something?):
@mkdir -p $(dir out/bar.mkdir)
=>
@mkdir -p out
If many .o files live in out, then you would still get only one directory.
You _would_ get many zero-length timestamp files out/bar.mkdir,
out/foo.mkdir, etc.
> and would still have a race condition when using --jobs.
Again, I'm not sure I understand you. Directory creation on unix is atomic.
There can be no race conditions with mkdir. There can be with the execution
of the touch, but that is non-critical and there would be no ill effects of
having a second touch "beat" the first touch.
What did I miss?
Thanks,
Robert
_______________________________________________
Help-make mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/help-make