Return-Path: Delivered-To: apmail-perl-modperl-cvs-archive@www.apache.org Received: (qmail 28565 invoked from network); 21 Jun 2004 06:45:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 21 Jun 2004 06:45:57 -0000 Received: (qmail 28646 invoked by uid 500); 21 Jun 2004 06:46:02 -0000 Delivered-To: apmail-perl-modperl-cvs-archive@perl.apache.org Received: (qmail 28549 invoked by uid 500); 21 Jun 2004 06:46:01 -0000 Mailing-List: contact modperl-cvs-help@perl.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: dev@perl.apache.org Delivered-To: mailing list modperl-cvs@perl.apache.org Received: (qmail 28519 invoked by uid 500); 21 Jun 2004 06:46:00 -0000 Delivered-To: apmail-modperl-2.0-cvs@apache.org Date: 21 Jun 2004 06:45:54 -0000 Message-ID: <20040621064554.28554.qmail@minotaur.apache.org> From: randyk@apache.org To: modperl-2.0-cvs@apache.org Subject: cvs commit: modperl-2.0 Makefile.PL X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N 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');