On Fri, Dec 24, 2004 at 01:53:00PM -0500, Michael G Schwern wrote:
> On Thu, Dec 23, 2004 at 09:03:35PM -0500, Stas Bekman wrote:
> > It's strange. It happens on the second run, but fixes itself on the third
> > one:
>
> There's a lot of strange things going on.
>
> This doesn't effect all extensions, just a handful.
> Its different every time.
> It sometimes takes a number of runs for it to resolve itself.
> The fact that it resolves itself at all.
> Unlike you, I am seeing *.bs being made the first time around.
>
> I wonder if its some slight timing issue.
Yes, it is. Something I should have realized, directory mod time reflects
the last time the directory changed by having something in it moved, renamed,
added, removed, etc...
Running make -nd over one of the rebuilding directories shows this.
Considering target file `Brigade.bs'.
Pruning file `Makefile'.
Pruning file `../../../blib/arch/Apache2/auto/APR/Brigade'.
Finished prerequisites of target file `Brigade.bs'.
Prerequisite `Makefile' is older than target `Brigade.bs'.
Prerequisite `../../../blib/arch/Apache2/auto/APR/Brigade' is newer
than target `Brigade.bs'.
Must remake target `Brigade.bs'.
Putting child 0x0011c190 (Brigade.bs) PID 17941 on the chain.
Live child 0x0011c190 (Brigade.bs) PID 17941
Running Mkbootstrap for APR::Brigade ()
So what's happening is the .bs file is being created and then moved to
inst_archautodir (blib/arch/Apache2/auto/blah). This causes inst_archautodir's
mod time to be kicked to the current time. If the creation of the .bs file
and its being moved into the blib happen on different seconds then the
inst_archautodir is considered newer than .bs and it has to be rebuilt.
Since this will only occassionally happen only some of the subdirs have to
be rebuilt. And if you run make enough times eventually .bs and the move
will happen inside the same second.
The moral of the story? Directory targets in Makefiles are a bad idea after
all. Argh.
So, god help me, I may have to return to .exists files.
--
Michael G Schwern [EMAIL PROTECTED] http://www.pobox.com/~schwern/
Help, help! A Heffalump, a Horrible Heffalump! Help, help, a Herrible
Hoffalump! Hoff, Hoff, a Hellible Horralump!