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 Fri, 18 Jul 2003 07:31:54 GMT
[...]
> 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=

So, should we put this top level Makefile.PL in or what?


__________________________________________________________________
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