summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--auto/help2
-rw-r--r--auto/make26
-rw-r--r--auto/options12
-rw-r--r--auto/summary2
-rwxr-xr-xconfigure2
5 files changed, 44 insertions, 0 deletions
diff --git a/auto/help b/auto/help
index 4d0b84e9..91be220f 100644
--- a/auto/help
+++ b/auto/help
@@ -16,6 +16,8 @@ cat << END
default: "$NXT_BINDIR"
--sbindir=DIRECTORY set system admin executables directory name
default: "$NXT_SBINDIR"
+ --libdir=DIRECTORY set library directory name, default: "$NXT_LIBDIR"
+ --incdir=DIRECTORY set includes directory name, default: "$NXT_INCDIR"
--modules=DIRECTORY set modules directory name, default: "$NXT_MODULES"
--state=DIRECTORY set state directory name, default: "$NXT_STATE"
diff --git a/auto/make b/auto/make
index bace16e9..5bbca9e4 100644
--- a/auto/make
+++ b/auto/make
@@ -277,6 +277,32 @@ ${NXT_DAEMON}-uninstall:
END
+cat << END >> $NXT_MAKEFILE
+
+.PHONY: libunit-install libunit-uninstall
+
+libunit-install: $NXT_BUILD_DIR/$NXT_LIB_UNIT_STATIC
+ install -d \$(DESTDIR)$NXT_LIBDIR
+ install -p -m u=rw,go=r $NXT_BUILD_DIR/$NXT_LIB_UNIT_STATIC \
+ \$(DESTDIR)$NXT_LIBDIR/
+ install -d \$(DESTDIR)$NXT_INCDIR
+ install -p -m u=rw,go=r src/nxt_unit.h src/nxt_unit_field.h \
+ src/nxt_unit_request.h src/nxt_unit_response.h src/nxt_unit_sptr.h \
+ src/nxt_unit_typedefs.h \$(DESTDIR)$NXT_INCDIR/
+
+libunit-uninstall:
+ rm -f \$(DESTDIR)$NXT_LIBDIR/$NXT_LIB_UNIT_STATIC
+ @rmdir -p \$(DESTDIR)$NXT_LIBDIR 2>/dev/null || true
+ rm -f \$(DESTDIR)$NXT_INCDIR/nxt_unit.h \
+ \$(DESTDIR)$NXT_INCDIR/nxt_unit_field.h \
+ \$(DESTDIR)$NXT_INCDIR/nxt_unit_request.h \
+ \$(DESTDIR)$NXT_INCDIR/nxt_unit_response.h \
+ \$(DESTDIR)$NXT_INCDIR/nxt_unit_sptr.h \
+ \$(DESTDIR)$NXT_INCDIR/nxt_unit_typedefs.h
+ @rmdir -p \$(DESTDIR)$NXT_INCDIR 2>/dev/null || true
+
+END
+
# Makefile.
# *.dSYM is MacOSX Clang debug information.
diff --git a/auto/options b/auto/options
index eadfb198..0d31abad 100644
--- a/auto/options
+++ b/auto/options
@@ -54,6 +54,8 @@ do
--prefix=*) NXT_PREFIX="$value" ;;
--bindir=*) NXT_BINDIR="$value" ;;
--sbindir=*) NXT_SBINDIR="$value" ;;
+ --libdir=*) NXT_LIBDIR="$value" ;;
+ --incdir=*) NXT_INCDIR="$value" ;;
--modules=*) NXT_MODULES="$value" ;;
--state=*) NXT_STATE="$value" ;;
@@ -127,6 +129,16 @@ case "$NXT_SBINDIR" in
*) NXT_SBINDIR="$NXT_PREFIX$NXT_SBINDIR" ;;
esac
+case "$NXT_LIBDIR" in
+ /*) ;;
+ *) NXT_LIBDIR="$NXT_PREFIX$NXT_LIBDIR" ;;
+esac
+
+case "$NXT_INCDIR" in
+ /*) ;;
+ *) NXT_INCDIR="$NXT_PREFIX$NXT_INCDIR" ;;
+esac
+
case "$NXT_MODULES" in
/*) ;;
*) NXT_MODULES="$NXT_PREFIX$NXT_MODULES" ;;
diff --git a/auto/summary b/auto/summary
index 695b21f7..ce6b42db 100644
--- a/auto/summary
+++ b/auto/summary
@@ -9,6 +9,8 @@ Configuration summary:
unit bin directory: "$NXT_BINDIR"
unit sbin directory: "$NXT_SBINDIR"
+ unit lib directory: "$NXT_LIBDIR"
+ unit include directory: "$NXT_INCDIR"
unit modules directory: "$NXT_MODULES"
unit state directory: "$NXT_STATE"
diff --git a/configure b/configure
index db64cb1e..13f2db6b 100755
--- a/configure
+++ b/configure
@@ -32,6 +32,8 @@ CC=${CC:-cc}
NXT_DAEMON=unitd
NXT_BINDIR="bin"
NXT_SBINDIR="sbin"
+NXT_LIBDIR="lib"
+NXT_INCDIR="include"
NXT_MODULES="modules"
NXT_STATE="state"
NXT_PID="unit.pid"