I have a file

  lib/Solaris/SysInfo/Constants.pm.PL

which when run, generates the contents of what I want for
lib/Solaris/SysInfo/Constants.pm. This magically JustWorks using
Module::Build. Problem with Module::Build is that many sites don't have
it (being a Solaris thing, it seems many of those in particular). I want
therefore to use ExtUtils::MakeMaker instead.

I can't find a way to make it work with this though; if I just add the
line to my Makefile.PL:

   'PL_FILES' => {
      'lib/Solaris/SysInfo/Constants.pm.PL' => 
'lib/Solaris/SysInfo/Constants.pm',
   },
  
Then it gets built at the wrong time, after pm_to_blib:

  cp lib/Solaris/SysInfo.xs blib/lib/Solaris/SysInfo.xs
  cp lib/Solaris/SysInfo/Constants.pm.PL 
blib/lib/Solaris/SysInfo/Constants.pm.PL
  cp lib/Solaris/SysInfo.pm blib/lib/Solaris/SysInfo.pm
  Manifying blib/man3/Solaris::SysInfo.3
  /usr/bin/perl -Iblib/arch -Iblib/lib 
-I/usr/perl5/5.6.1/lib/sun4-solaris-64int -I/usr/perl5/5.6.1/lib 
lib/Solaris/SysInfo/Constants.pm.PL lib/Solaris/SysInfo/Constants.pm

The docs do say that if the target is mentioned in the PM list then it'll
be built before. But that requires me to provide my own PM list,
completely removing the autodetection that currently occurs, along with
having to specify where to install things - sledgehammer->peanut, I feel.

I've also not yet worked out how to make it actually build the .xs into a
shared object file either.

Can anyone suggest what manner of magic is needed in the Makefile.PL to
achieve all this?

-- 
Paul "LeoNerd" Evans

[EMAIL PROTECTED]
ICQ# 4135350       |  Registered Linux# 179460
http://www.leonerd.org.uk/

Attachment: signature.asc
Description: PGP signature

Reply via email to