summaryrefslogtreecommitdiffhomepage
path: root/auto/make
diff options
context:
space:
mode:
authorAndrei Belov <defan@nginx.com>2018-12-20 20:25:50 +0300
committerAndrei Belov <defan@nginx.com>2018-12-20 20:25:50 +0300
commit82e12d0cdeeb707ad4b1aef91c5e90b4347b0831 (patch)
tree19ef4cf3dea340fa365af022c76543f92d1e2e0a /auto/make
parentb140ac29e5571e9abaafce006932f15d86b78803 (diff)
parent4195a29fabfe65f5a28baf2405c2077e2ba3c09a (diff)
downloadunit-82e12d0cdeeb707ad4b1aef91c5e90b4347b0831.tar.gz
unit-82e12d0cdeeb707ad4b1aef91c5e90b4347b0831.tar.bz2
Merged with the default branch.
Diffstat (limited to 'auto/make')
-rw-r--r--auto/make14
1 files changed, 12 insertions, 2 deletions
diff --git a/auto/make b/auto/make
index 5bbca9e4..4f716b93 100644
--- a/auto/make
+++ b/auto/make
@@ -82,6 +82,14 @@ $NXT_BUILD_DIR/$NXT_LIB_STATIC: \$(NXT_LIB_OBJS)
$NXT_STATIC_LINK $NXT_BUILD_DIR/$NXT_LIB_STATIC \\
\$(NXT_LIB_OBJS)
+$NXT_BUILD_DIR/nxt_unit_version.h: src/nxt_main.h
+ $echo -n '#define NXT_UNIT_VERNUM ' > $NXT_BUILD_DIR/nxt_unit_version.h
+ grep 'define NXT_VERNUM' src/nxt_main.h \\
+ | sed -e 's/[^0-9]//g' >> $NXT_BUILD_DIR/nxt_unit_version.h
+
+$NXT_BUILD_DIR/src/nxt_unit.o: $NXT_BUILD_DIR/nxt_unit_version.h
+$NXT_BUILD_DIR/src/nxt_lib.o: $NXT_BUILD_DIR/nxt_unit_version.h
+
$NXT_BUILD_DIR/$NXT_LIB_UNIT_STATIC: \$(NXT_LIB_UNIT_OBJS)
$NXT_STATIC_LINK $NXT_BUILD_DIR/$NXT_LIB_UNIT_STATIC \\
\$(NXT_LIB_UNIT_OBJS)
@@ -288,7 +296,8 @@ libunit-install: $NXT_BUILD_DIR/$NXT_LIB_UNIT_STATIC
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/
+ src/nxt_unit_typedefs.h $NXT_BUILD_DIR/nxt_unit_version.h \
+ \$(DESTDIR)$NXT_INCDIR/
libunit-uninstall:
rm -f \$(DESTDIR)$NXT_LIBDIR/$NXT_LIB_UNIT_STATIC
@@ -298,7 +307,8 @@ libunit-uninstall:
\$(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
+ \$(DESTDIR)$NXT_INCDIR/nxt_unit_typedefs.h \
+ \$(DESTDIR)$NXT_INCDIR/nxt_unit_version.h
@rmdir -p \$(DESTDIR)$NXT_INCDIR 2>/dev/null || true
END