2002-03-07 22:20:02 +08:00
|
|
|
mkinstalldirs = $(top_srcdir)/build/shtool mkdir -p
|
|
|
|
INSTALL = $(top_srcdir)/build/shtool install -c
|
|
|
|
INSTALL_DATA = $(INSTALL) -m 644
|
|
|
|
|
2002-03-20 21:24:59 +08:00
|
|
|
DEFS = -DPHP_ATOM_INC -I$(top_builddir)/include -I$(top_builddir)/main -I$(top_srcdir)
|
2002-08-07 06:05:38 +08:00
|
|
|
COMMON_FLAGS = $(DEFS) $(INCLUDES) $(EXTRA_INCLUDES) $(CPPFLAGS) $(PHP_FRAMEWORKPATH)
|
2002-03-07 22:20:02 +08:00
|
|
|
|
|
|
|
|
|
|
|
all: $(all_targets)
|
2003-05-19 07:52:09 +08:00
|
|
|
@echo
|
2003-05-15 02:23:33 +08:00
|
|
|
@echo "Build complete."
|
2003-05-19 07:52:09 +08:00
|
|
|
@echo "(It is safe to ignore warnings about tempnam and tmpnam)."
|
2003-05-15 02:23:33 +08:00
|
|
|
@echo
|
|
|
|
|
2002-03-07 22:20:02 +08:00
|
|
|
build-modules: $(PHP_MODULES)
|
|
|
|
|
2003-03-29 12:52:46 +08:00
|
|
|
libphp5.la: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS)
|
2002-08-07 01:51:24 +08:00
|
|
|
$(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -rpath $(phptempdir) $(EXTRA_LDFLAGS) $(LDFLAGS) $(PHP_RPATHS) $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@
|
2003-07-02 09:08:26 +08:00
|
|
|
-@$(LIBTOOL) --silent --mode=install cp libphp5.la $(phptempdir)/libphp5.la >/dev/null 2>&1
|
2002-03-07 22:20:02 +08:00
|
|
|
|
2003-03-29 12:52:46 +08:00
|
|
|
libs/libphp5.bundle: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS)
|
|
|
|
$(CC) $(MH_BUNDLE_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(PHP_GLOBAL_OBJS:.lo=.o) $(PHP_SAPI_OBJS:.lo=.o) $(PHP_FRAMEWORKS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@ && cp $@ libs/libphp5.so
|
2002-03-30 11:17:25 +08:00
|
|
|
|
2003-06-29 13:59:29 +08:00
|
|
|
install: $(all_targets) $(install_targets)
|
2002-03-07 22:20:02 +08:00
|
|
|
|
2003-07-02 09:08:26 +08:00
|
|
|
install-sapi: $(OVERALL_TARGET)
|
2002-07-04 06:12:13 +08:00
|
|
|
@echo "Installing PHP SAPI module"
|
2002-03-07 22:20:02 +08:00
|
|
|
-@$(mkinstalldirs) $(INSTALL_ROOT)$(bindir)
|
2003-03-29 12:52:46 +08:00
|
|
|
-@if test ! -r $(phptempdir)/libphp5.$(SHLIB_SUFFIX_NAME); then \
|
2002-03-07 22:20:02 +08:00
|
|
|
for i in 0.0.0 0.0 0; do \
|
2003-03-29 12:52:46 +08:00
|
|
|
if test -r $(phptempdir)/libphp5.$(SHLIB_SUFFIX_NAME).$$i; then \
|
|
|
|
$(LN_S) $(phptempdir)/libphp5.$(SHLIB_SUFFIX_NAME).$$i $(phptempdir)/libphp5.$(SHLIB_SUFFIX_NAME); \
|
2002-03-07 22:20:02 +08:00
|
|
|
break; \
|
|
|
|
fi; \
|
|
|
|
done; \
|
|
|
|
fi
|
2002-07-04 06:12:13 +08:00
|
|
|
@$(INSTALL_IT)
|
2002-03-07 22:20:02 +08:00
|
|
|
|
2002-06-28 07:56:27 +08:00
|
|
|
install-modules: build-modules
|
2002-03-07 22:20:02 +08:00
|
|
|
@test -d modules && \
|
|
|
|
$(mkinstalldirs) $(INSTALL_ROOT)$(EXTENSION_DIR) && \
|
2002-07-04 06:12:13 +08:00
|
|
|
echo "Installing shared extensions: $(INSTALL_ROOT)$(EXTENSION_DIR)/" && \
|
2002-03-07 22:20:02 +08:00
|
|
|
rm -f modules/*.la && \
|
2002-12-09 23:32:17 +08:00
|
|
|
$(INSTALL) modules/* $(INSTALL_ROOT)$(EXTENSION_DIR) >/dev/null 2>&1 || true
|
2002-03-07 22:20:02 +08:00
|
|
|
|
|
|
|
install-tester:
|
2002-07-04 06:12:13 +08:00
|
|
|
@echo "Installing regression tester: $(INSTALL_ROOT)$(PEAR_INSTALLDIR)/"
|
2002-11-13 01:40:38 +08:00
|
|
|
@$(mkinstalldirs) $(INSTALL_ROOT)$(PEAR_INSTALLDIR)
|
2002-03-07 22:20:02 +08:00
|
|
|
@$(INSTALL) -m 755 $(top_srcdir)/run-tests.php $(INSTALL_ROOT)$(PEAR_INSTALLDIR)
|
|
|
|
|
|
|
|
install-su: install-pear install-tester
|
|
|
|
|
2002-09-30 00:25:23 +08:00
|
|
|
test: $(SAPI_CLI_PATH)
|
|
|
|
@TEST_PHP_EXECUTABLE=$(top_builddir)/$(SAPI_CLI_PATH) \
|
2002-10-23 02:53:56 +08:00
|
|
|
TEST_PHP_SRCDIR=$(top_srcdir) \
|
2003-01-02 21:01:33 +08:00
|
|
|
CC="$(CC)" \
|
2003-02-11 02:58:49 +08:00
|
|
|
$(top_builddir)/$(SAPI_CLI_PATH) -d 'open_basedir=' -d 'safe_mode=0' -d 'output_buffering=0' $(top_srcdir)/run-tests.php $(TESTS)
|
2002-03-07 22:20:02 +08:00
|
|
|
|
|
|
|
clean:
|
2002-09-30 12:42:11 +08:00
|
|
|
find . -name \*.lo -o -name \*.o | xargs rm -f
|
2002-09-30 17:15:23 +08:00
|
|
|
find . -name \*.la -o -name \*.a | xargs rm -f
|
2002-09-30 12:42:11 +08:00
|
|
|
find . -name \*.so | xargs rm -f
|
2002-06-30 12:26:05 +08:00
|
|
|
find . -name .libs -a -type d|xargs rm -rf
|
2003-03-29 12:52:46 +08:00
|
|
|
rm -f libphp5.la $(SAPI_CLI_PATH) $(OVERALL_TARGET) modules/* libs/*
|
2002-03-07 22:20:02 +08:00
|
|
|
|
|
|
|
distclean: clean
|
2003-03-29 12:52:46 +08:00
|
|
|
rm -f config.cache config.log config.status Makefile.objects Makefile.fragments libtool main/php_config.h stamp-h php5.spec sapi/apache/libphp5.module buildmk.stamp
|
2002-08-13 14:51:28 +08:00
|
|
|
egrep define'.*include/php' configure|sed 's/.*>//'|xargs rm -f
|
2002-03-07 22:20:02 +08:00
|
|
|
find . -name Makefile | xargs rm -f
|
|
|
|
|
|
|
|
.PHONY: all clean install distclean test
|
|
|
|
.NOEXPORT:
|