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 20:06:57 GMT
Joe Schaefer wrote:
> Stas Bekman <stas@stason.org> writes:
> 
> 
>>Ah, that explains everything. I don't have it at all. the script fails to die
>>when it doesn't find the file. This should fix the problem:
> 
> 
> [...patch...]
> 
> 
> Excellent- please apply.

done.

>>writing...xs//typemap
>>failed to run xsbuilder: Missing directory ./xsbuilder/tables/Apache/libapreq
> 
> 
> [...]
> 
> 
>>what do I miss now?
> 
> 
> 
> You need to regenerate the tables first.  This should work from glue/perl:
> 
>   % perl ../../build/xsbuilder.pl run
>   % perl Makefile.PL ...
>   % make  
> 
> FYI: from the base httpd-apreq-2/ directory,
> 
>   % make perl_glue
> 
> should take care of all three steps.

cool, that works. Probably need to have some checkpoint target and run the 
above commands if someone invokes Makefile.PL from glue/perl

So with this top-level 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};
-------------------------------------------------


The run-time is getting closer to the CPAN style:

perl Makefile.PL --with-apache2-apxs=/home/stas/httpd/prefork/bin/apxs
make
make test
make perl_glue
make perl_test
make install
make perl_install

Notice that it picks the right perl based on the perl used to run Makefile.PL, 
so --with-perl is not really needed. So we need to do some more work with 
configure so it'll insert the perl_glue target into the make target, perl_test 
into test and perl_install into install. Once this is done, it'll become:

perl Makefile.PL --with-apache2-apxs=/home/stas/httpd/prefork/bin/apxs
make
make test
make install

Also should probabaly replace's configure style --with-apache2-apxs= and use 
-apxs like all other packages using Apache::Test do. Of course Makefile.PL 
will feed it to configure using --with-apache2-apxs=


__________________________________________________________________
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