randyk      2004/06/20 23:45:54

  Modified:    .        Makefile.PL
  Log:
  for Win32,
   - make the xs/APR/APR before the other APR::* targets, in preparation
     for linking the APR::* against APR.lib
   - create a bogus blib/arch/Apache2/auto/APR/APR.lib, to fool
     MakeMaker into thinking the lib exists before it's actually built.
  
  Revision  Changes    Path
  1.138     +27 -5     modperl-2.0/Makefile.PL
  
  Index: Makefile.PL
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/Makefile.PL,v
  retrieving revision 1.137
  retrieving revision 1.138
  diff -u -r1.137 -r1.138
  --- Makefile.PL       4 Mar 2004 03:36:18 -0000       1.137
  +++ Makefile.PL       21 Jun 2004 06:45:54 -0000      1.138
  @@ -153,11 +153,19 @@
           #Makefile.PL's in WrapXS/ just need to pass the -e mod_perl.lib test
           #the real mod_perl.lib will be in place when WrapXS/ dll's are
           #actually linked
  -        my $lib = "src/modules/perl/$build->{MP_LIBNAME}.lib";
  -        unless (-e $lib) {
  -            open my $fh, '>', $lib or die "open $lib: $!";
  -            print $fh "#this is a dummy file to trick MakeMaker";
  -            close $fh;
  +        require File::Path;
  +        my $lib1 = "src/modules/perl/$build->{MP_LIBNAME}.lib";
  +        my $apr_blib = catdir qw(blib arch Apache2 auto APR);
  +        unless (-d $apr_blib) {
  +            File::Path::mkpath($apr_blib) or die "mkdir $apr_blib failed: $!";
  +        }
  +        my $lib2 = catfile $apr_blib, 'APR.lib';
  +        foreach my $lib ($lib1, $lib2) {
  +            unless (-e $lib) {
  +                open my $fh, '>', $lib or die "open $lib: $!";
  +                print $fh "#this is a dummy file to trick MakeMaker";
  +                close $fh;
  +            }
           }
       }
   
  @@ -448,6 +456,8 @@
   package MY;
   
   use Config;
  +use File::Spec::Functions qw(catdir);
  +use constant WIN32 => $^O eq 'MSWin32';
   
   my $apache_test_install;
   BEGIN {
  @@ -459,6 +469,18 @@
   sub MY::top_targets {
       my $self = shift;
       my $string = $self->ModPerl::BuildMM::MY::top_targets;
  +
  +    if (WIN32) {
  +        ModPerl::MM::add_dep(\$string, pure_all => 'apr_lib');
  +
  +        my $apr_lib = catdir qw(xs APR APR);
  +        $string .= <<"EOF";
  +
  +apr_lib:
  +     cd "$apr_lib" && \$(MAKE) -f \$(FIRST_MAKEFILE) all \$(PASTHRU)
  +
  +EOF
  +    }
   
       ModPerl::MM::add_dep(\$string, pure_all => 'modperl_lib');
   
  
  
  

Reply via email to