httpd-apreq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <s...@stason.org>
Subject Re: need to be able to specify a path to perl
Date Tue, 15 Jul 2003 17:03:09 GMT

>>> Though how is it going to manage all the Makefile.PL's options?
>>> e.g. PREFIX?
>>
>>
>>
>> Good question.
> 
> 
> It should pass those options to the real glue code Makefile.PL after 
> cd'ing to glue/perl.
> 
>   qx/cd "glue/perl" && perl Makefile.PL @ARGV/;
> 
> after massaging @ARGV to remove any --configure options.
> 
> However we still need to cd to glue/perl for the usual perl build, make 
> commands to work. One way would be to write a bunch of targets in the 
> top level Makefile, which will replicate them by first chdir'ing to 
> glue/perl.
> 
> I'll try to write a skeleton...

something like this:

httpd-apreq-2/Makefile.PL
-------------------------
require 5.006;

use strict;
use warnings;

use Getopt::Long qw(GetOptions);
use Config;

my $perl = $Config{perlpath}; # XXX

my @opts = qw(with-apache2-apxs with-perl);

my %opts;

# grab from @ARGV only the options that we expect
GetOptions(\%opts, (map "$_=s", @opts));

$opts{"with-perl"} = $perl;

push @ARGV, ('-apxs', $opts{"with-apache2-apxs"})
     if exists $opts{"with-apache2-apxs"};

qx{cd "glue/perl" && $perl Makefile.PL @ARGV};


----------------------------------------------

I had one more issue when doing: cd "glue/perl" && perl Makefile.PL

/home/stas/apache.org/httpd-apreq-2/glue/perl> perl Makefile.PL
Building xs/  ...
generating script t/TEST
Couldn't change to directory /home/stas/apache.org/httpd-apreq-2/glue/perl/xs: 
No such file or directory at Makefile.PL line 29

shouldn't Makefile.PL create this 'xs' dir if it's not there? Once I've 
created it the problem went away


__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


Mime
View raw message