mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
- Made it possible to do "make test" for phpized extensions
This commit is contained in:
parent
0f2986fe9d
commit
ee5fd96e37
7 changed files with 30 additions and 14 deletions
|
@ -45,15 +45,15 @@ install-modules: build-modules
|
||||||
@rm -f modules/*.la >/dev/null 2>&1
|
@rm -f modules/*.la >/dev/null 2>&1
|
||||||
@$(INSTALL) modules/* $(INSTALL_ROOT)$(EXTENSION_DIR)
|
@$(INSTALL) modules/* $(INSTALL_ROOT)$(EXTENSION_DIR)
|
||||||
|
|
||||||
install-tester:
|
install-su: install-pear
|
||||||
@echo "Installing regression tester: $(INSTALL_ROOT)$(PEAR_INSTALLDIR)/"
|
|
||||||
@$(mkinstalldirs) $(INSTALL_ROOT)$(PEAR_INSTALLDIR)
|
|
||||||
@$(INSTALL) -m 755 $(top_srcdir)/run-tests.php $(INSTALL_ROOT)$(PEAR_INSTALLDIR)
|
|
||||||
|
|
||||||
install-su: install-pear install-tester
|
|
||||||
|
|
||||||
test:
|
test:
|
||||||
-@if test -x $(SAPI_CLI_PATH) && test ! -z $(SAPI_CLI_PATH); then \
|
-@if test ! -z $(PHP_EXECUTABLE) && test -x $(PHP_EXECUTABLE); then \
|
||||||
|
TEST_PHP_EXECUTABLE=$(PHP_EXECUTABLE) \
|
||||||
|
TEST_PHP_SRCDIR=$(top_srcdir) \
|
||||||
|
CC="$(CC)" \
|
||||||
|
$(PHP_EXECUTABLE) -d 'extension_dir=modules/' -d 'extension='`basename $(PHP_MODULES) .la`'.so' -d 'open_basedir=' -d 'safe_mode=0' -d 'output_buffering=0' -d 'memory_limit=-1' $(top_srcdir)/run-tests.php tests/; \
|
||||||
|
elif test ! -z $(SAPI_CLI_PATH) && test -x $(SAPI_CLI_PATH); then \
|
||||||
TEST_PHP_EXECUTABLE=$(top_builddir)/$(SAPI_CLI_PATH) \
|
TEST_PHP_EXECUTABLE=$(top_builddir)/$(SAPI_CLI_PATH) \
|
||||||
TEST_PHP_SRCDIR=$(top_srcdir) \
|
TEST_PHP_SRCDIR=$(top_srcdir) \
|
||||||
CC="$(CC)" \
|
CC="$(CC)" \
|
||||||
|
|
|
@ -1082,8 +1082,8 @@ PHP_SUBST_OLD(php_abs_top_srcdir)
|
||||||
|
|
||||||
PHP_SUBST(bindir)
|
PHP_SUBST(bindir)
|
||||||
PHP_SUBST(exec_prefix)
|
PHP_SUBST(exec_prefix)
|
||||||
PHP_SUBST(program_prefix)
|
PHP_SUBST_OLD(program_prefix)
|
||||||
PHP_SUBST(program_suffix)
|
PHP_SUBST_OLD(program_suffix)
|
||||||
PHP_SUBST(includedir)
|
PHP_SUBST(includedir)
|
||||||
PHP_SUBST(libdir)
|
PHP_SUBST(libdir)
|
||||||
PHP_SUBST(mandir)
|
PHP_SUBST(mandir)
|
||||||
|
@ -1183,7 +1183,7 @@ INLINE_CFLAGS="$INLINE_CFLAGS $standard_libtool_flag"
|
||||||
CXXFLAGS="$CXXFLAGS $standard_libtool_flag"
|
CXXFLAGS="$CXXFLAGS $standard_libtool_flag"
|
||||||
|
|
||||||
all_targets='$(OVERALL_TARGET) $(PHP_MODULES) $(PHP_CLI_TARGET)'
|
all_targets='$(OVERALL_TARGET) $(PHP_MODULES) $(PHP_CLI_TARGET)'
|
||||||
install_targets="$install_modules $install_pear install-build install-headers install-programs install-tester"
|
install_targets="$install_modules $install_pear install-build install-headers install-programs"
|
||||||
|
|
||||||
case $PHP_SAPI in
|
case $PHP_SAPI in
|
||||||
cgi)
|
cgi)
|
||||||
|
|
|
@ -13,7 +13,9 @@ BUILD_FILES = \
|
||||||
build/libtool.m4 \
|
build/libtool.m4 \
|
||||||
Makefile.global \
|
Makefile.global \
|
||||||
acinclude.m4 \
|
acinclude.m4 \
|
||||||
ltmain.sh
|
ltmain.sh \
|
||||||
|
run-tests.php \
|
||||||
|
run-tests-config.php
|
||||||
|
|
||||||
BUILD_FILES_EXEC = \
|
BUILD_FILES_EXEC = \
|
||||||
build/shtool \
|
build/shtool \
|
||||||
|
|
|
@ -51,6 +51,10 @@ Extra libraries which PHP was compiled with
|
||||||
Directory where extensions are searched by default
|
Directory where extensions are searched by default
|
||||||
.TP
|
.TP
|
||||||
.PD 0
|
.PD 0
|
||||||
|
.B \-\-php-binary
|
||||||
|
Full path to php CLI/CGI binary
|
||||||
|
.TP
|
||||||
|
.PD 0
|
||||||
.B \-\-version
|
.B \-\-version
|
||||||
PHP version
|
PHP version
|
||||||
.TP
|
.TP
|
||||||
|
|
|
@ -1,12 +1,17 @@
|
||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
|
|
||||||
prefix="@prefix@"
|
prefix="@prefix@"
|
||||||
|
exec_prefix="@exec_prefix@"
|
||||||
version="@PHP_VERSION@"
|
version="@PHP_VERSION@"
|
||||||
includedir="@includedir@/php"
|
includedir="@includedir@/php"
|
||||||
includes="-I$includedir -I$includedir/main -I$includedir/TSRM -I$includedir/Zend"
|
includes="-I$includedir -I$includedir/main -I$includedir/TSRM -I$includedir/Zend"
|
||||||
ldflags="@PHP_LDFLAGS@"
|
ldflags="@PHP_LDFLAGS@"
|
||||||
libs="@EXTRA_LIBS@"
|
libs="@EXTRA_LIBS@"
|
||||||
extension_dir='@EXTENSION_DIR@'
|
extension_dir='@EXTENSION_DIR@'
|
||||||
|
program_prefix="@program_prefix@"
|
||||||
|
program_suffix="@program_suffix@"
|
||||||
|
exe_extension="@EXEEXT@"
|
||||||
|
php_binary="@bindir@/${program_prefix}php${program_suffix}${exe_extension}"
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
--prefix)
|
--prefix)
|
||||||
|
@ -19,10 +24,12 @@ case "$1" in
|
||||||
echo $libs;;
|
echo $libs;;
|
||||||
--extension-dir)
|
--extension-dir)
|
||||||
echo $extension_dir;;
|
echo $extension_dir;;
|
||||||
|
--php-binary)
|
||||||
|
echo $php_binary;;
|
||||||
--version)
|
--version)
|
||||||
echo $version;;
|
echo $version;;
|
||||||
*)
|
*)
|
||||||
echo "Usage: $0 [--prefix|--includes|--ldflags|--libs|--extension-dir|--version]"
|
echo "Usage: $0 [--prefix|--includes|--ldflags|--libs|--extension-dir|--php-binary|--version]"
|
||||||
exit 1;;
|
exit 1;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|
|
@ -8,11 +8,12 @@ includedir="`eval echo @includedir@`/php"
|
||||||
builddir="`pwd`"
|
builddir="`pwd`"
|
||||||
|
|
||||||
FILES_BUILD="mkdep.awk scan_makefile_in.awk shtool libtool.m4"
|
FILES_BUILD="mkdep.awk scan_makefile_in.awk shtool libtool.m4"
|
||||||
FILES="acinclude.m4 Makefile.global config.sub config.guess ltmain.sh"
|
FILES="acinclude.m4 Makefile.global config.sub config.guess ltmain.sh run-tests*.php"
|
||||||
CLEAN_FILES="$FILES *.o *.lo *.la .deps .libs/ build/ include/ modules/ install-sh \
|
CLEAN_FILES="$FILES *.o *.lo *.la .deps .libs/ build/ include/ modules/ install-sh \
|
||||||
mkinstalldirs missing config.nice config.sub config.guess configure configure.in \
|
mkinstalldirs missing config.nice config.sub config.guess configure configure.in \
|
||||||
aclocal.m4 config.h config.h.in conftest* ltmain.sh libtool config.cache autom4te.cache/ \
|
aclocal.m4 config.h config.h.in conftest* ltmain.sh libtool config.cache autom4te.cache/ \
|
||||||
config.log config.status Makefile Makefile.fragments Makefile.objects confdefs.h"
|
config.log config.status Makefile Makefile.fragments Makefile.objects confdefs.h \
|
||||||
|
run-tests*.php"
|
||||||
|
|
||||||
# function declaration
|
# function declaration
|
||||||
phpize_usage()
|
phpize_usage()
|
||||||
|
|
|
@ -18,6 +18,7 @@ AC_DEFUN([PHP_WITH_PHP_CONFIG],[
|
||||||
prefix=`$PHP_CONFIG --prefix 2>/dev/null`
|
prefix=`$PHP_CONFIG --prefix 2>/dev/null`
|
||||||
INCLUDES=`$PHP_CONFIG --includes 2>/dev/null`
|
INCLUDES=`$PHP_CONFIG --includes 2>/dev/null`
|
||||||
EXTENSION_DIR=`$PHP_CONFIG --extension-dir`
|
EXTENSION_DIR=`$PHP_CONFIG --extension-dir`
|
||||||
|
PHP_EXECUTABLE=`$PHP_CONFIG --php-binary`
|
||||||
|
|
||||||
if test -z "$prefix"; then
|
if test -z "$prefix"; then
|
||||||
AC_MSG_ERROR(Cannot find php-config. Please use --with-php-config=PATH)
|
AC_MSG_ERROR(Cannot find php-config. Please use --with-php-config=PATH)
|
||||||
|
@ -99,6 +100,7 @@ PHP_SUBST(CPPFLAGS)
|
||||||
PHP_SUBST(CXX)
|
PHP_SUBST(CXX)
|
||||||
PHP_SUBST(CXXFLAGS)
|
PHP_SUBST(CXXFLAGS)
|
||||||
PHP_SUBST(EXTENSION_DIR)
|
PHP_SUBST(EXTENSION_DIR)
|
||||||
|
PHP_SUBST(PHP_EXECUTABLE)
|
||||||
PHP_SUBST(EXTRA_LDFLAGS)
|
PHP_SUBST(EXTRA_LDFLAGS)
|
||||||
PHP_SUBST(EXTRA_LIBS)
|
PHP_SUBST(EXTRA_LIBS)
|
||||||
PHP_SUBST(INCLUDES)
|
PHP_SUBST(INCLUDES)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue