>>>>> On Wed, 22 Oct 2003 09:49:50 -0700, Michael G Schwern <[EMAIL PROTECTED]> said:

  > MakeMaker will not work without $Config{archdir}/CORE/perl.h.  Period.
  > It just gives up and dies, won't even build the Makefile.

  >   ] sudo mv /System/Library/Perl/darwin/CORE/perl.h /tmp
  >   ] perl Makefile.PL 

  >   Error: Unable to locate installed Perl libraries or Perl source code.

  >   It is recommended that you install perl in a standard location before
  >   building extensions. Some precompiled versions of perl do not contain
  >   these header files, so you cannot build extensions. In such a case,
  >   please build and install your perl from a fresh perl distribution. It
  >   usually solves this kind of problem.

  >   (You get this message, because MakeMaker could not find 
"/System/Library/Perl/darwin/CORE/perl.h")

  > This happens XS or not.

The message pretty clearly states the intent. It was a sanity check
for XS modules. It clearly is not needed for modules that need no
compilation.

  > 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.

  > 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.

  > Andreas, do you know what this .exists stuff is all about?  It looks like
  > its checking to see if Perl got reinstalled.

You're thinking the wrong direction.

-- 
andreas

Reply via email to