This patch allows to re-run the build using the same args as the one
that's already built
Should be used as:
% perl -MApache::BuildConfig -erebuild
or if not yet installed:
% perl -Ilib -MApache::BuildConfig -erebuild
should probably be wrapped into a build/rebuild.pl script to type less.
Index: lib/Apache/Build.pm
===================================================================
RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
retrieving revision 1.72
diff -u -r1.72 Build.pm
--- lib/Apache/Build.pm 2001/11/02 17:59:05 1.72
+++ lib/Apache/Build.pm 2001/11/20 11:40:23
@@ -448,6 +448,24 @@
sub new {
$obj;
}
+EOF
+
+ print $fh <<'EOF';
+
+sub rebuild {
+ my $self = __PACKAGE__->new;
+ my $valid_opts = ModPerl::BuildOptions->table();
+ my @opts = map { "$_=" .
+ ($self->{$_} =~ /^\d+$/
+ ? $self->{$_}
+ : qq{'$self->{$_}'}
+ ) } sort grep { exists $valid_opts->{$_} } keys %$self;
+ my $command = "perl Makefile.PL @opts";
+ print "Running: $command\n";
+ system $command;
+}
+# % perl -MApache::BuildConfig -erebuild
+*main::rebuild=\&rebuild;
1;
EOF
_____________________________________________________________________
Stas Bekman JAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide http://perl.apache.org/guide
mailto:[EMAIL PROTECTED] http://ticketmaster.com http://apacheweek.com
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]