httpd-apreq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Randy Kobes <ra...@theoryx5.uwinnipeg.ca>
Subject [win32] Makefile.PL fixes
Date Fri, 02 May 2003 05:08:14 GMT
For running the apreq-1 tests, there's a couple of
things that should be done in case the user has set
the APACHE environment variable, so as to put it
into a form that Apache::Test (and friends) expects.
The following patch does this:

=====================================================
Index: Makefile.PL
===================================================================
RCS file: /home/cvs/httpd-apreq/Makefile.PL,v
retrieving revision 1.23
diff -u -r1.23 Makefile.PL
--- Makefile.PL	1 May 2003 00:07:32 -0000	1.23
+++ Makefile.PL	2 May 2003 05:14:34 -0000
@@ -132,6 +132,7 @@
 }
 
 sub win32_setup {
+  require Win32;
   my $apache;
   unless ($ENV{APACHE}) {
   SEARCH: {
@@ -156,15 +157,17 @@
     my $vers = qx{"$apache" -v};
     die qq{"$apache" does not appear to be version 1.3}
       unless $vers =~ m!Apache/1.3!;
-    $ENV{APACHE} = $apache;
   }
+  $apache ||= $ENV{APACHE};
+  $apache = Win32::GetShortPathName($apache);
+  $apache =~ s!\\!/!g;
   my $test = 't/TEST.PL';
   my $orig = $test . '.orig';
   rename($test, $orig) unless -e $orig;
   open(ORIG, $orig) or die "Cannot open $orig: $!";
   open(NEW, ">$test") or die "Cannot open $test: $!";
   while (<ORIG>) {
-    s/(use warnings.*)/$1\n\n\$ENV{APACHE} = "$apache";/;
+    s/(use warnings.*)/$1\n\n\$ENV{APACHE} = '$apache';/;
     print NEW $_;
   }
   close ORIG;
=============================================================

-- 
best regards,
randy


Mime
View raw message