esl-php: Create installation directories if they do not exist (+ other minor clean ups).
Fixes: cp ESL.so /var/tmp/por.../image/usr/lib64/php5.3/lib/extensions/no-debug-zts-20090626 cp: cannot create regular file `/var/tmp/por.../image/usr/lib64/php5.3/lib/extensions/no-debug-zts-20090626': No such file or directory Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
This commit is contained in:
parent
445b74b765
commit
6ff084492b
|
@ -1,8 +1,16 @@
|
|||
PHP=php
|
||||
PHP_CONFIG=php-config
|
||||
|
||||
PHP_LDFLAGS=$(shell $(PHP_CONFIG) --ldflags)
|
||||
PHP_LIBS=$(shell $(PHP_CONFIG) --libs | sed -r 's/ ?-l(bz2|pcre|xml2|gssapi_krb5|krb5|k5crypto|com_err|history|z|readline|gmp|ssl|crypto)//g')
|
||||
PHP_EXT_DIR=$(shell $(PHP_CONFIG) --extension-dir)
|
||||
PHP_INC_DIR=$(shell $(PHP) -r 'echo ini_get("include_path");' | cut -d: -f2)
|
||||
PHP_INI_DIR=$(shell $(PHP_CONFIG) --configure-options | tr " " "\n" | grep -- --with-config-file-scan-dir | cut -f2 -d=)
|
||||
|
||||
LOCAL_CFLAGS=$(shell php-config --includes)
|
||||
PHP_LDFLAGS=$(shell php-config --ldflags)
|
||||
PHP_LIBS=$(shell php-config --libs | sed -r 's/ ?-l(bz2|pcre|xml2|gssapi_krb5|krb5|k5crypto|com_err|history|z|readline|gmp|ssl|crypto)//g')
|
||||
LOCAL_LDFLAGS=$(PHP_LDFLAGS) $(PHP_LIBS)
|
||||
LOCAL_LDFLAGS+=-lpthread
|
||||
|
||||
WRAP_GCC_WARNING_SILENCE=-Wno-unused-label -Wno-unused-function
|
||||
|
||||
all: ESL.so
|
||||
|
@ -25,6 +33,9 @@ swigclean:
|
|||
reswig: swigclean esl_wrap.cpp
|
||||
|
||||
install: ESL.so
|
||||
cp ESL.so $(DESTDIR)/$(shell php-config --extension-dir)
|
||||
cp ESL.php /$(DESTDIR)/$(shell php -r 'echo ini_get("include_path");' | cut -d: -f2)
|
||||
echo 'extension=ESL.so' >> $(DESTDIR)/$(shell php-config --configure-options | tr " " "\n" | grep -- --with-config-file-scan-dir | cut -f2 -d=)/esl.ini
|
||||
test -d "$(DESTDIR)$(PHP_EXT_DIR)" || mkdir -p "$(DESTDIR)$(PHP_EXT_DIR)"
|
||||
cp ESL.so "$(DESTDIR)$(PHP_EXT_DIR)"
|
||||
test -d "$(DESTDIR)$(PHP_INC_DIR)" || mkdir -p "$(DESTDIR)$(PHP_INC_DIR)"
|
||||
cp ESL.php "$(DESTDIR)$(PHP_INC_DIR)"
|
||||
test -d "$(DESTDIR)$(PHP_INI_DIR)" || mkdir -p "$(DESTDIR)$(PHP_INI_DIR)"
|
||||
test -f "$(DESTDIR)$(PHP_INI_DIR)/esl.ini" || echo 'extension=ESL.so' > "$(DESTDIR)$(PHP_INI_DIR)/esl.ini"
|
||||
|
|
Loading…
Reference in New Issue