]> granicus.if.org Git - php/commitdiff
Fix "make test" in VPATH environments
authorSascha Schumann <sas@php.net>
Sun, 24 Dec 2000 14:24:04 +0000 (14:24 +0000)
committerSascha Schumann <sas@php.net>
Sun, 24 Dec 2000 14:24:04 +0000 (14:24 +0000)
build/rules.mk
run-tests.php

index e0d77a5968b491c86a535e1a909b1e9e9fdcbf86..50e2b4df0e5f09e7fde4e7e05b0ec60d366fa874 100644 (file)
@@ -55,9 +55,9 @@ distclean: distclean-recursive clean-x
 
 test: $(top_builddir)/php
        @if test "$(TESTS)" = ""; then \
-               $(top_builddir)/php -d include_path=".:$(top_srcdir)/pear:$(PEAR_INSTALLDIR)" -q $(top_srcdir)/run-tests.php `pwd`; \
+               TOP_BUILDDIR=$(top_builddir) TOP_SRCDIR=$(top_srcdir) $(top_builddir)/php -d include_path=".:$(top_srcdir)/pear:$(PEAR_INSTALLDIR)" -q $(top_srcdir)/run-tests.php $(top_srcdir); \
        else \
-               $(top_builddir)/php -d include_path=".:$(top_srcdir)/pear:$(PEAR_INSTALLDIR)" -q $(top_srcdir)/run-tests.php $(TESTS); \
+               TOP_BUILDDIR=$(top_builddir) TOP_SRCDIR=$(top_srcdir) $(top_builddir)/php -d include_path=".:$(top_srcdir)/pear:$(PEAR_INSTALLDIR)" -q $(top_srcdir)/run-tests.php $(TESTS); \
        fi
 
 include $(builddir)/.deps
index 528141a89c02da9d93c012e7d95debb4771cfb9c..0d7ddcf3095652c0f2085199d30c0d0d9744c9c0 100755 (executable)
@@ -95,7 +95,7 @@ function initialize()
             $php = "./php.exe";
         }
     } else {
-        $php = "./php";
+        $php = $GLOBALS["TOP_BUILDDIR"]."/php";
     }
 
     if (!is_executable($php)) {
@@ -162,7 +162,7 @@ function do_testing($argc, &$argv)
             }
         }
     } else {
-        $dir = ".";
+        $dir = $GLOBALS["TOP_SRCDIR"];
     }
 
     if (isset($dir) && $dir) {