summaryrefslogtreecommitdiffhomepage
path: root/auto/make
diff options
context:
space:
mode:
authorAndrei Belov <defan@nginx.com>2019-03-01 18:30:09 +0300
committerAndrei Belov <defan@nginx.com>2019-03-01 18:30:09 +0300
commit3c3720cba7154bc168cbd00c74817626bb53e140 (patch)
treeda1500f7c6bd5e90ecf45299b6f4b19a29d521cd /auto/make
parent315a864c27aa27a48c013c4a1ef67a099ffea894 (diff)
parentdf02b03824065389c73213b19736140442cf63bc (diff)
downloadunit-3c3720cba7154bc168cbd00c74817626bb53e140.tar.gz
unit-3c3720cba7154bc168cbd00c74817626bb53e140.tar.bz2
Merged with the default branch.
Diffstat (limited to 'auto/make')
-rw-r--r--auto/make28
1 files changed, 18 insertions, 10 deletions
diff --git a/auto/make b/auto/make
index 4f716b93..1eee2a78 100644
--- a/auto/make
+++ b/auto/make
@@ -67,6 +67,22 @@ done
$echo >> $NXT_MAKEFILE
+# The version file.
+
+cat << END >> $NXT_MAKEFILE
+
+include version
+
+$NXT_VERSION_H: version
+ $echo '#define NXT_VERSION "\$(NXT_VERSION)"' > $NXT_VERSION_H
+ $echo '#define NXT_VERNUM \$(NXT_VERNUM)' >> $NXT_VERSION_H
+
+$NXT_BUILD_DIR/src/nxt_unit.o: $NXT_VERSION_H
+$NXT_BUILD_DIR/src/nxt_lib.o: $NXT_VERSION_H
+
+END
+
+
# Shared and static library.
cat << END >> $NXT_MAKEFILE
@@ -82,14 +98,6 @@ $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)
@@ -296,7 +304,7 @@ 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 $NXT_BUILD_DIR/nxt_unit_version.h \
+ src/nxt_unit_typedefs.h $NXT_BUILD_DIR/nxt_version.h \
\$(DESTDIR)$NXT_INCDIR/
libunit-uninstall:
@@ -308,7 +316,7 @@ libunit-uninstall:
\$(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_version.h
+ \$(DESTDIR)$NXT_INCDIR/nxt_version.h
@rmdir -p \$(DESTDIR)$NXT_INCDIR 2>/dev/null || true
END