dougm 01/01/03 23:23:17
Modified: . Makefile.PL
lib/Apache Build.pm
Log:
fixups for using outsideof Apache::Build outside of Makefile.PL
Revision Changes Path
1.25 +1 -1 modperl-2.0/Makefile.PL
Index: Makefile.PL
===================================================================
RCS file: /home/cvs/modperl-2.0/Makefile.PL,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- Makefile.PL 2001/01/04 05:57:39 1.24
+++ Makefile.PL 2001/01/04 07:23:17 1.25
@@ -9,7 +9,7 @@
our $VERSION;
-my $build = Apache::Build->new;
+my $build = Apache::Build->new(init => 1);
my $code = ModPerl::Code->new;
configure();
1.26 +18 -5 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.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- Build.pm 2001/01/04 05:57:39 1.25
+++ Build.pm 2001/01/04 07:23:17 1.26
@@ -232,12 +232,25 @@
#--- constuctors ---
+my $bpm = 'Apache/BuildConfig.pm';
+
sub build_config {
my $self = shift;
- unshift @INC, 'lib';
- delete $INC{'Apache/BuildConfig.pm'};
- eval { require Apache::BuildConfig; };
- shift @INC;
+ my $bpm_mtime = 0;
+
+ $bpm_mtime = (stat $INC{$bpm})[9] if $INC{$bpm};
+
+ if (-e "lib/$bpm" and (stat _)[9] > $bpm_mtime) {
+ #reload if Makefile.PL has regenerated
+ unshift @INC, 'lib';
+ delete $INC{$bpm};
+ eval { require Apache::BuildConfig; };
+ shift @INC;
+ }
+ else {
+ eval { require Apache::BuildConfig; };
+ }
+
return bless {}, (ref($self) || $self) if $@;
return Apache::BuildConfig::->new;
}
@@ -251,7 +264,7 @@
@_,
}, $class;
- ModPerl::BuildOptions->init($self);
+ ModPerl::BuildOptions->init($self) if delete $self->{init};
$self;
}