summaryrefslogtreecommitdiffhomepage
path: root/auto/modules/php
diff options
context:
space:
mode:
authorMax Romanov <max.romanov@nginx.com>2017-08-31 11:42:13 -0700
committerMax Romanov <max.romanov@nginx.com>2017-08-31 11:42:13 -0700
commitac7218e335f0393330cf3d1c791ccdfa5a04c423 (patch)
tree1e864fe75f90fbb2a3d5796deabfe056f6e0537d /auto/modules/php
parent6eb4a41364bedc461a58ebe486067ae3abc9aaa1 (diff)
downloadunit-ac7218e335f0393330cf3d1c791ccdfa5a04c423.tar.gz
unit-ac7218e335f0393330cf3d1c791ccdfa5a04c423.tar.bz2
Introducing install & uninstall Makefile targets.
Diffstat (limited to '')
-rw-r--r--auto/modules/php19
1 files changed, 18 insertions, 1 deletions
diff --git a/auto/modules/php b/auto/modules/php
index c8da3fe9..00a1015e 100644
--- a/auto/modules/php
+++ b/auto/modules/php
@@ -148,7 +148,9 @@ done
cat << END >> $NXT_MAKEFILE
-.PHONY: ${NXT_PHP_MODULE}
+.PHONY: ${NXT_PHP_MODULE}
+.PHONY: ${NXT_PHP_MODULE}-install
+.PHONY: ${NXT_PHP_MODULE}-uninstall
all: ${NXT_PHP_MODULE}
@@ -158,4 +160,19 @@ $NXT_BUILD_DIR/${NXT_PHP_MODULE}.unit.so: $nxt_objs
$NXT_MODULE_LINK -o $NXT_BUILD_DIR/${NXT_PHP_MODULE}.unit.so \\
$nxt_objs ${NXT_PHP_LIB} ${NXT_PHP_LDFLAGS}
+
+install: ${NXT_PHP_MODULE}-install
+
+${NXT_PHP_MODULE}-install: ${NXT_PHP_MODULE}
+ install -d \$(DESTDIR)$NXT_MODULES
+ install -p $NXT_BUILD_DIR/${NXT_PHP_MODULE}.unit.so \\
+ \$(DESTDIR)$NXT_MODULES/
+
+
+uninstall: ${NXT_PHP_MODULE}-uninstall
+
+${NXT_PHP_MODULE}-uninstall:
+ rm -f \$(DESTDIR)$NXT_MODULES/${NXT_PHP_MODULE}.unit.so
+ @rmdir -p \$(DESTDIR)$NXT_MODULES 2>/dev/null || true
+
END