mirror of
https://github.com/php/php-src.git
synced 2024-11-27 11:53:33 +08:00
Add INSTALL_ROOT variable to specify install location.
This commit is contained in:
parent
a0a471e7a3
commit
0df6e8dd88
@ -32,7 +32,7 @@ include $(top_srcdir)/build/program.mk
|
||||
|
||||
install-sapi:
|
||||
@$(LIBTOOL) --silent --mode=install cp libphp4.la $(phptempdir)/libphp4.la >/dev/null 2>&1
|
||||
-@$(mkinstalldirs) $(bindir)
|
||||
-@$(mkinstalldirs) $(INSTALL_ROOT)$(bindir)
|
||||
-@if test ! -r $(phptempdir)/libphp4.$(SHLIB_SUFFIX_NAME); then \
|
||||
for i in 0.0.0 0.0 0; do \
|
||||
if test -r $(phptempdir)/libphp4.$(SHLIB_SUFFIX_NAME).$$i; then \
|
||||
@ -45,10 +45,10 @@ install-sapi:
|
||||
|
||||
install-modules:
|
||||
@test -d modules && \
|
||||
$(mkinstalldirs) $(moduledir) && \
|
||||
$(mkinstalldirs) $(INSTALL_ROOT)$(moduledir) && \
|
||||
echo "installing shared modules into $(moduledir)" && \
|
||||
rm -f modules/*.la && \
|
||||
cp modules/* $(moduledir) >/dev/null 2>&1 || true
|
||||
cp modules/* $(INSTALL_ROOT)$(moduledir) >/dev/null 2>&1 || true
|
||||
|
||||
install-su: install-modules
|
||||
(cd pear && $(MAKE) install)
|
||||
|
@ -27,17 +27,17 @@ STAMP = buildmk.stamp
|
||||
ALWAYS = generated_lists
|
||||
|
||||
all: $(STAMP) $(ALWAYS)
|
||||
@$(MAKE) AMFLAGS=$(AMFLAGS) -s -f build/build2.mk
|
||||
$(MAKE) AMFLAGS=$(AMFLAGS) -f build/build2.mk
|
||||
|
||||
generated_lists:
|
||||
@echo makefile_am_files = Zend/Makefile.am \
|
||||
echo makefile_am_files = Zend/Makefile.am \
|
||||
TSRM/Makefile.am > $@
|
||||
@echo config_h_files = Zend/acconfig.h TSRM/acconfig.h >> $@
|
||||
@echo config_m4_files = Zend/Zend.m4 TSRM/tsrm.m4 \
|
||||
echo config_h_files = Zend/acconfig.h TSRM/acconfig.h >> $@
|
||||
echo config_m4_files = Zend/Zend.m4 TSRM/tsrm.m4 \
|
||||
Zend/acinclude.m4 ext/*/config.m4 sapi/*/config.m4 >> $@
|
||||
|
||||
$(STAMP): build/buildcheck.sh
|
||||
@build/buildcheck.sh && touch $(STAMP)
|
||||
build/buildcheck.sh && touch $(STAMP)
|
||||
|
||||
snapshot:
|
||||
distname='$(DISTNAME)'; \
|
||||
@ -63,9 +63,9 @@ snapshot:
|
||||
bzip2 -t $$distname.tar.bz2
|
||||
|
||||
cvsclean:
|
||||
@for i in `find . -name .cvsignore`; do \
|
||||
for i in `find . -name .cvsignore`; do \
|
||||
(cd `dirname $$i` 2>/dev/null && rm -rf `cat .cvsignore` *.o *.a || true); \
|
||||
done
|
||||
@rm -f $(SUBDIRS) 2>/dev/null || true
|
||||
rm -f $(SUBDIRS) 2>/dev/null || true
|
||||
|
||||
.PHONY: $(ALWAYS) snapshot cvsclean
|
||||
|
@ -713,11 +713,13 @@ fi
|
||||
|
||||
ZEND_MODULE_API_NO=`egrep '#define ZEND_MODULE_API_NO ' $srcdir/Zend/zend_modules.h|sed 's/#define ZEND_MODULE_API_NO //'`
|
||||
|
||||
EXTENSION_DIR="$prefix/lib/php/extensions/$PART1-$PART2-$ZEND_MODULE_API_NO"
|
||||
if test -z "$PEAR_INSTALLDIR"; then
|
||||
PEAR_INSTALLDIR="$prefix/lib/php"
|
||||
fi
|
||||
|
||||
PEAR_INSTALLDIR="$prefix/lib/php"
|
||||
EXTENSION_DIR="\${PEAR_INSTALLDIR}/extensions/$PART1-$PART2-$ZEND_MODULE_API_NO"
|
||||
|
||||
INCLUDE_PATH=".:$PEAR_INSTALLDIR"
|
||||
INCLUDE_PATH=".:\${PEAR_INSTALLDIR}"
|
||||
|
||||
PHP_BUILD_RPATH
|
||||
|
||||
|
@ -99,8 +99,8 @@ AC_ARG_WITH(java,
|
||||
PHP_ADD_LIBRARY($JAVA_LIB)
|
||||
fi
|
||||
|
||||
INSTALL_IT="$INSTALL_IT; \$(srcdir)/build/shtool mkdir -p -f -m 0755 \$(libdir)"
|
||||
INSTALL_IT="$INSTALL_IT; \$(INSTALL) -m 0755 \$(srcdir)/ext/java/php_java.jar \$(libdir)"
|
||||
INSTALL_IT="$INSTALL_IT; \$(srcdir)/build/shtool mkdir -p -f -m 0755 \$(INSTALL_ROOT)\$(libdir)"
|
||||
INSTALL_IT="$INSTALL_IT; \$(INSTALL) -m 0755 \$(srcdir)/ext/java/php_java.jar \$(INSTALL_ROOT)\$(libdir)"
|
||||
fi
|
||||
|
||||
AC_MSG_RESULT(yes)
|
||||
|
@ -99,8 +99,8 @@ AC_ARG_WITH(java,
|
||||
PHP_ADD_LIBRARY($JAVA_LIB)
|
||||
fi
|
||||
|
||||
INSTALL_IT="$INSTALL_IT; \$(srcdir)/build/shtool mkdir -p -f -m 0755 \$(libdir)"
|
||||
INSTALL_IT="$INSTALL_IT; \$(INSTALL) -m 0755 \$(srcdir)/ext/java/php_java.jar \$(libdir)"
|
||||
INSTALL_IT="$INSTALL_IT; \$(srcdir)/build/shtool mkdir -p -f -m 0755 \$(INSTALL_ROOT)\$(libdir)"
|
||||
INSTALL_IT="$INSTALL_IT; \$(INSTALL) -m 0755 \$(srcdir)/ext/java/php_java.jar \$(INSTALL_ROOT)\$(libdir)"
|
||||
fi
|
||||
|
||||
AC_MSG_RESULT(yes)
|
||||
|
@ -100,16 +100,16 @@ PEAR_FILES = \
|
||||
XML/RPC.php
|
||||
|
||||
install-data-local: PEAR.php
|
||||
@if $(mkinstalldirs) $(peardir); then \
|
||||
@if $(mkinstalldirs) $(INSTALL_ROOT)$(peardir); then \
|
||||
for i in $(PEAR_SUBDIRS); do \
|
||||
(set -x;$(mkinstalldirs) $(peardir)/$$i); \
|
||||
(set -x;$(mkinstalldirs) $(INSTALL_ROOT)$(peardir)/$$i); \
|
||||
done; \
|
||||
for i in $(PEAR_FILES); do \
|
||||
dir=`echo $$i|sed 's%[^/][^/]*$$%%'`; \
|
||||
(set -x;$(INSTALL_DATA) $(srcdir)/$$i $(peardir)/$$dir); \
|
||||
(set -x;$(INSTALL_DATA) $(srcdir)/$$i $(INSTALL_ROOT)$(peardir)/$$dir); \
|
||||
done; \
|
||||
for i in PEAR.php; do \
|
||||
(set -x;$(INSTALL_DATA) $$i $(peardir)); \
|
||||
(set -x;$(INSTALL_DATA) $$i $(INSTALL_ROOT)$(peardir)); \
|
||||
done; \
|
||||
else \
|
||||
cat $(srcdir)/install-pear.txt; \
|
||||
@ -137,15 +137,15 @@ BUILD_FILES = \
|
||||
bin_SCRIPTS = phpize php-config pear
|
||||
|
||||
install-build:
|
||||
$(mkinstalldirs) $(phpbuilddir) $(bindir) && \
|
||||
(cd $(top_srcdir) && cp $(BUILD_FILES) $(phpbuilddir))
|
||||
$(mkinstalldirs) $(INSTALL_ROOT)$(phpbuilddir) $(INSTALL_ROOT)$(bindir) && \
|
||||
(cd $(top_srcdir) && cp $(BUILD_FILES) $(INSTALL_ROOT)$(phpbuilddir))
|
||||
|
||||
install-programs:
|
||||
for prog in $(bin_SCRIPTS); do \
|
||||
$(INSTALL) -m 755 scripts/$$prog $(bindir)/$$prog; \
|
||||
$(INSTALL) -m 755 scripts/$$prog $(INSTALL_ROOT)$(bindir)/$$prog; \
|
||||
done; \
|
||||
for prog in phpextdist; do \
|
||||
$(INSTALL) -m 755 $(srcdir)/scripts/$$prog $(bindir)/$$prog; \
|
||||
$(INSTALL) -m 755 $(srcdir)/scripts/$$prog $(INSTALL_ROOT)$(bindir)/$$prog; \
|
||||
done
|
||||
|
||||
HEADER_DIRS = \
|
||||
@ -161,13 +161,13 @@ HEADER_DIRS = \
|
||||
|
||||
install-headers:
|
||||
-@for i in $(HEADER_DIRS); do \
|
||||
paths="$$paths $(phpincludedir)/$$i"; \
|
||||
paths="$$paths $(INSTALL_ROOT)$(phpincludedir)/$$i"; \
|
||||
done; \
|
||||
$(mkinstalldirs) $$paths && \
|
||||
echo "creating header file hierarchy" && \
|
||||
for i in $(HEADER_DIRS); do \
|
||||
(cd $(top_srcdir)/$$i && cp -p *.h $(phpincludedir)/$$i; \
|
||||
cd $(top_builddir)/$$i && cp -p *.h $(phpincludedir)/$$i) 2>/dev/null || true; \
|
||||
(cd $(top_srcdir)/$$i && cp -p *.h $(INSTALL_ROOT)$(phpincludedir)/$$i; \
|
||||
cd $(top_builddir)/$$i && cp -p *.h $(INSTALL_ROOT)$(phpincludedir)/$$i) 2>/dev/null || true; \
|
||||
done
|
||||
|
||||
Makefile: Makefile.in $(top_builddir)/config.status
|
||||
|
@ -24,7 +24,7 @@ if test "$PHP_AOLSERVER" != "no"; then
|
||||
AC_DEFINE(HAVE_AOLSERVER,1,[Whether you have AOLserver])
|
||||
PHP_SAPI=aolserver
|
||||
PHP_BUILD_SHARED
|
||||
INSTALL_IT="\$(INSTALL) -m 0755 $SAPI_SHARED $PHP_AOLSERVER/bin/"
|
||||
INSTALL_IT="\$(INSTALL) -m 0755 $SAPI_SHARED \$(INSTALL_ROOT)$PHP_AOLSERVER/bin/"
|
||||
fi
|
||||
|
||||
dnl ## Local Variables:
|
||||
|
@ -49,7 +49,7 @@ AC_ARG_WITH(apxs,
|
||||
done
|
||||
PHP_ADD_INCLUDE($APXS_INCLUDEDIR)
|
||||
PHP_SAPI=apache
|
||||
APACHE_INSTALL="$APXS -i -a -n php4 $SAPI_SHARED"
|
||||
APACHE_INSTALL="\$(mkinstalldirs) \"\$(INSTALL_ROOT)`$APXS -q LIBEXECDIR`\" && $APXS -S LIBEXECDIR=\"\$(INSTALL_ROOT)`$APXS -q LIBEXECDIR`\" -i -a -n php4 $SAPI_SHARED"
|
||||
PHP_BUILD_SHARED
|
||||
if test -z "`$APXS -q LD_SHLIB`" || test "`$APXS -q LIBEXECDIR`" = "modules"; then
|
||||
PHP_APXS_BROKEN=yes
|
||||
|
@ -30,7 +30,7 @@ if test "$PHP_SAPI" = "cgi"; then
|
||||
fi
|
||||
|
||||
if test "$PHP_SAPI" = "cgi" ; then
|
||||
INSTALL_IT="\$(INSTALL) -m 0755 $SAPI_PROGRAM \$(bindir)/$SAPI_CGI"
|
||||
INSTALL_IT="\$(INSTALL) -m 0755 $SAPI_PROGRAM \$(INSTALL_ROOT)\$(bindir)/$SAPI_CGI"
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING(for fhttpd module support)
|
||||
|
@ -16,7 +16,7 @@ AC_ARG_WITH(isapi,
|
||||
PHP_ADD_INCLUDE($ZEUSPATH/web/include)
|
||||
PHP_SAPI=isapi
|
||||
PHP_BUILD_SHARED
|
||||
INSTALL_IT="\$(SHELL) \$(srcdir)/install-sh -m 0755 $SAPI_SHARED $ZEUSPATH/web/bin/"
|
||||
INSTALL_IT="\$(SHELL) \$(srcdir)/install-sh -m 0755 $SAPI_SHARED \$(INSTALL_ROOT)$ZEUSPATH/web/bin/"
|
||||
RESULT=yes
|
||||
])
|
||||
AC_MSG_RESULT($RESULT)
|
||||
|
@ -28,7 +28,7 @@ if test "$PHP_NSAPI" != "no"; then
|
||||
AC_DEFINE(HAVE_NSAPI,1,[Whether you have a Netscape Server])
|
||||
PHP_SAPI=nsapi
|
||||
PHP_BUILD_SHARED
|
||||
INSTALL_IT="\$(INSTALL) -m 0755 $SAPI_SHARED $PHP_NSAPI/bin/"
|
||||
INSTALL_IT="\$(INSTALL) -m 0755 $SAPI_SHARED \$(INSTALL_ROOT)$PHP_NSAPI/bin/"
|
||||
fi
|
||||
|
||||
|
||||
|
@ -14,7 +14,7 @@ AC_ARG_WITH(phttpd,
|
||||
AC_DEFINE(HAVE_PHTTPD,1,[Whether you have phttpd])
|
||||
PHP_SAPI=phttpd
|
||||
PHP_BUILD_SHARED
|
||||
INSTALL_IT="\$(INSTALL) -m 0755 $SAPI_SHARED $PHTTPD_DIR/modules/"
|
||||
INSTALL_IT="\$(INSTALL) -m 0755 $SAPI_SHARED \$(INSTALL_ROOT)$PHTTPD_DIR/modules/"
|
||||
RESULT=yes
|
||||
])
|
||||
AC_MSG_RESULT($RESULT)
|
||||
|
@ -16,7 +16,7 @@ if test "$PHP_PI3WEB" != "no"; then
|
||||
PHP_ADD_INCLUDE($PI3PATH/PHP4)
|
||||
PHP_SAPI=pi3web
|
||||
PHP_BUILD_SHARED
|
||||
INSTALL_IT="\$(SHELL) \$(srcdir)/install-sh -m 0755 $SAPI_SHARED $PI3PATH/bin/"
|
||||
INSTALL_IT="\$(SHELL) \$(srcdir)/install-sh -m 0755 $SAPI_SHARED \$(INSTALL_ROOT)$PI3PATH/bin/"
|
||||
fi
|
||||
|
||||
dnl ## Local Variables:
|
||||
|
Loading…
Reference in New Issue
Block a user