On Thu, Oct 23, 2003 at 07:50:35AM +0200, Andreas J Koenig wrote:
> > Later on it uses perl.h for some odd timestamp ritual in the Makefile.
>
> > config :: $(INST_AUTODIR)$(DIRFILESEP).exists
> > $(NOECHO) $(NOOP)
>
> > $(INST_AUTODIR)/.exists :: /System/Library/Perl/darwin/CORE/perl.h
> > $(NOECHO) $(MKPATH) $(INST_AUTODIR)
> > $(NOECHO) $(EQUALIZE_TIMESTAMP) /System/Library/Perl/darwin/CORE/perl.h
> > $(INST_AUTODIR)/.exists
> > -$(NOECHO) $(CHMOD) $(PERM_RWX) $(INST_AUTODIR)
>
> > Is this trip really necessary? What exactly is going on here and is it
> > relevant outside of a core build?
>
> make does not provide a way to ensure the existence of a directory.
> Period. The ritual above achieves that the directory $(INST_AUTODIR)
> exists. We wanted to avoid using 'mkdir -p', so we had to create one
> directory at a time.
>
> But you cannot make meaningful dependencies on directories because
> they always change timestamps under your feet, so you need to touch
> this absurd .exists file. But touching would also be stupid, because a
> newer timestamp can trigger some other action if that .exists file
> appears on the right side of a dependency (as you show above).
>
> An easy way out seemed to be to use perl.h as a reference timestamp
> that is old enough to never triggers the MKPATH again.
So if all we're trying to do is make sure a bunch of directories exist,
and we have a portable mkdir -p, why not...
config : $(FIRST_MAKEFILE) create_inst
create_inst :
$(NOECHO) $(MKPATH) $(INST_LIBDIR) $(INST_SCRIPT) $(INST_MAN1DIR) ...
Alternatively, if all we need is an old timestamp, would setting the
timestamp of the .exists file to 0 work?
> > I ask because some vendors don't ship the perl headers. Most recently I
> > got a scare when it appeared that Apple was not going to ship perl.h with
> > perl in 10.3 (its not, but it didn't in 10.2 either. Its in devtools).
>
> > So I'd like to break this hard-wired dependency so MakeMaker can install
> > pure Perl modules without perl.h, but I don't want to just rip it out.
>
> It definitely makes sense to turn this INST_AUTODIR stuff off for pure
> perl modules.
Unfortunately INST_MAN*DIR and INST_SCRIPT also depend on this timestamp
muckery.
--
Michael G Schwern [EMAIL PROTECTED] http://www.pobox.com/~schwern/
the chair. it wants to die. oh no! she sees me! she attacks!