summaryrefslogtreecommitdiffhomepage
path: root/auto/modules/python
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--auto/modules/python19
1 files changed, 18 insertions, 1 deletions
diff --git a/auto/modules/python b/auto/modules/python
index ba272999..9e3ced74 100644
--- a/auto/modules/python
+++ b/auto/modules/python
@@ -145,7 +145,9 @@ done
cat << END >> $NXT_MAKEFILE
-.PHONY: ${NXT_PYTHON_MODULE}
+.PHONY: ${NXT_PYTHON_MODULE}
+.PHONY: ${NXT_PYTHON_MODULE}-install
+.PHONY: ${NXT_PYTHON_MODULE}-uninstall
all: ${NXT_PYTHON_MODULE}
@@ -155,4 +157,19 @@ $NXT_BUILD_DIR/${NXT_PYTHON_MODULE}.unit.so: $nxt_objs
$NXT_MODULE_LINK -o $NXT_BUILD_DIR/${NXT_PYTHON_MODULE}.unit.so \\
$nxt_objs $NXT_PYTHON_LIBS
+
+install: ${NXT_PYTHON_MODULE}-install
+
+${NXT_PYTHON_MODULE}-install: ${NXT_PYTHON_MODULE}
+ install -d \$(DESTDIR)$NXT_MODULES
+ install -p $NXT_BUILD_DIR/${NXT_PYTHON_MODULE}.unit.so \\
+ \$(DESTDIR)$NXT_MODULES/
+
+
+uninstall: ${NXT_PYTHON_MODULE}-uninstall
+
+${NXT_PYTHON_MODULE}-uninstall:
+ rm -f \$(DESTDIR)$NXT_MODULES/${NXT_PYTHON_MODULE}.unit.so
+ @rmdir -p \$(DESTDIR)$NXT_MODULES 2>/dev/null || true
+
END