On Wed, 14 Jul 2004, Stas Bekman wrote:

> doh! I forgot to send it :)

:)

> Randy Kobes wrote:
> > On Wed, 14 Jul 2004, Stas Bekman wrote:
> >
> >
> >>Markus Wichitill wrote:
> >>
> >>>>Adding MP_AP_PREFIX/bin
> >>>>to your PATH is the simplest approach to this (I'll have
> >>>>to see about doing this automatically for the tests).
> >>>
> >>>How about this?
> >>
> >>I'm not sure what is it for, too much context removed, but
> >>I guess Randy knows what is it about.
> >
> >
> > It comes about because, when running the tests, Apache
> > may need certain external dlls in the Apache bin/ directory.
> > The PATH is used to search for these dlls.
>
> Sure :)
>
> > What about the following?
[ .. ]
> If you are sure that that's always be the case then, that's fine, but it
> should be done explicitly for windows then. Since this could be totally
> incorrect in the general case should we try to use $ap_bindir later on.
> So I'd rather see:
>
>      my $preamble;
>      if (Apache::TestConfig::WIN32) {
>          my $ap_bindir = File::Spec->catdir($build->{MP_AP_PREFIX}, 'bin');
>          $preamble = <<EOF;
> PATH = \$(PATH);$ap_bindir
> EOF
>      }
>      else {
>          my $env = Apache::TestConfig->passenv_makestr();
>          $preamble = <<EOF;
> PASSENV = $env
> EOF
>      }

That's a good point - what about the following, which
should also include Marcus' case of using MP_APXS instead
of MP_AP_PREFIX when building mp2:
======================================================
Index: Makefile.PL
===================================================================
RCS file: /home/cvs/modperl-2.0/Makefile.PL,v
retrieving revision 1.143
diff -u -r1.143 Makefile.PL
--- Makefile.PL 5 Jul 2004 22:02:42 -0000       1.143
+++ Makefile.PL 15 Jul 2004 05:11:18 -0000
@@ -597,12 +597,23 @@

 sub MY::test {

-    my $env = Apache::TestConfig->passenv_makestr();
-
-    my $preamble = Apache::TestConfig::WIN32 ? "" : <<EOF;
+    my $preamble;
+    if (Apache::TestConfig::WIN32) {
+        my $ap_bindir = $build->apr_bindir();
+        if (! $ap_bindir) {
+            $ap_bindir = $build->{MP_AP_PREFIX} ?
+              File::Spec->catdir($build->{MP_AP_PREFIX}, 'bin') : '';
+        }
+        $preamble = <<EOF;
+PATH = \$(PATH);$ap_bindir
+EOF
+    }
+    else {
+        my $env = Apache::TestConfig->passenv_makestr();
+        $preamble = <<EOF;
 PASSENV = $env
 EOF
-
+    }
     return $preamble . <<'EOF';
 TEST_VERBOSE = 0
 TEST_FILES =

=======================================================

If apr was put into a different directory than
apache.exe, then I think this is still OK (assuming
apr_bindir() is successful), as it's really the
apr dlls that are needed.

> BTW, env is not needed for win32?

No ... Even moreso, if I remember correctly, leaving
it in on Win32 confused some commands in the build,
which is why it was taken out for Win32.

-- 
best regards,
randy

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to