perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From do...@locus.apache.org
Subject cvs commit: modperl-2.0/lib/Apache Build.pm
Date Thu, 20 Apr 2000 18:28:15 GMT
dougm       00/04/20 11:28:15

  Modified:    .        Makefile.PL
               lib/Apache Build.pm
  Log:
  use MP_FOO command line args instead of %ENV
  
  Revision  Changes    Path
  1.10      +2 -2      modperl-2.0/Makefile.PL
  
  Index: Makefile.PL
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/Makefile.PL,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- Makefile.PL	2000/04/17 00:02:22	1.9
  +++ Makefile.PL	2000/04/20 18:28:14	1.10
  @@ -10,12 +10,12 @@
   
   our $VERSION;
   
  -my $build = Apache::Build->new(debug => 1);
  +my $build = Apache::Build->new;
   my $code  = ModPerl::Code->new;
   
   #quick hack until build system is complete
   #e.g.
  -#perl Makefile.PL -c -ma (configure and make all)
  +#perl Makefile.PL -c -ma MP_DEBUG=1 (configure and 'make all' debug mode)
   #perl Makefile.PL -mc    (make clean)
   {
       use Getopt::Std;
  
  
  
  1.7       +25 -3     modperl-2.0/lib/Apache/Build.pm
  
  Index: Build.pm
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- Build.pm	2000/04/20 17:20:11	1.6
  +++ Build.pm	2000/04/20 18:28:14	1.7
  @@ -170,7 +170,7 @@
   
   sub prompt {
       my($self, $q, $default) = @_;
  -    return $default if $ENV{MODPERL_PROMPT_DEFAULT};
  +    return $default if $self->{prompt_default};
       require ExtUtils::MakeMaker;
       ExtUtils::MakeMaker::prompt($q, $default);
   }
  @@ -214,6 +214,26 @@
       return Apache::BuildConfig::->new;
   }
   
  +sub parse_argv {
  +    my $self = shift;
  +    return unless @ARGV;
  +
  +    my @args = @ARGV;
  +    @ARGV = ();
  +
  +    for (@args) {
  +        if (s/^MP_//) {
  +            my($key, $val) = split '=', $_, 2;
  +            $self->{lc $key} = $val;
  +            print "$key = $val\n";
  +        }
  +        else {
  +            #pass along to MakeMaker
  +            push @ARGV, $_;
  +        }
  +    }
  +}
  +
   sub new {
       my $class = shift;
   
  @@ -221,9 +241,11 @@
           cwd => Cwd::fastcwd(),
           @_,
       }, $class;
  +
  +    $self->parse_argv;
   
  -    if ($self->{debug} and $ENV{MP_USE_GTOP}) {
  -        $self->{use_gtop} = 1 if $self->find_dlfile('gtop');
  +    if ($self->{debug} and $self->{use_gtop}) {
  +        $self->{use_gtop} = 0 unless $self->find_dlfile('gtop');
       }
   
       $self;
  
  
  

Mime
View raw message