perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject cvs commit: modperl-2.0/lib/Apache Build.pm
Date Wed, 21 Nov 2001 02:35:33 GMT
stas        01/11/20 18:35:33

  Modified:    lib/Apache Build.pm
  Log:
  - add the rebuild() function that allows to reuse the build opts to build
  a new mod_perl
  
  Revision  Changes    Path
  1.73      +26 -0     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.72
  retrieving revision 1.73
  diff -u -r1.72 -r1.73
  --- Build.pm	2001/11/02 17:59:05	1.72
  +++ Build.pm	2001/11/21 02:35:33	1.73
  @@ -455,6 +455,16 @@
       close $fh or die "failed to write $file: $!";
   }
   
  +sub rebuild {
  +    my $self = __PACKAGE__->build_config;
  +    my @opts = map { qq[$_='$self->{$_}'] } sort grep /^MP_/,  keys %$self;
  +    my $command = "perl Makefile.PL @opts";
  +    print "Running: $command\n";
  +    system $command;
  +}
  +# % perl -MApache::Build -erebuild
  +*main::rebuild = \&rebuild if $0 eq '-e';
  +
   #--- attribute access ---
   
   sub is_dynamic {
  @@ -1028,10 +1038,26 @@
    use Apache::Build ();
    my $build = Apache::Build->new;
   
  + # rebuild mod_perl with build opts from the previous build
  + % cd modperl-2.0
  + % perl -MApache::Build -erebuild
  +
   =head1 DESCRIPTION
   
   This module provides methods for locating and parsing bits of Apache
   source code.
  +
  +Since mod_perl remembers what build options were used to build it, you
  +can use this knowledge to rebuild it using the same options. Simply
  +chdir to the mod_perl source directory and run:
  +
  +  % cd modperl-2.0
  +  % perl -MApache::Build -erebuild
  +
  +If you want to rebuild not yet installed, but already built mod_perl,
  +run from its root directory:
  +
  +  % perl -Ilib -MApache::Build -erebuild
   
   =head1 METHODS
   
  
  
  

Mime
View raw message