summaryrefslogtreecommitdiffhomepage
path: root/pkg/npm
diff options
context:
space:
mode:
authorAlexander Borisov <alexander.borisov@nginx.com>2018-12-19 15:56:57 +0300
committerAlexander Borisov <alexander.borisov@nginx.com>2018-12-19 15:56:57 +0300
commitd6f38a3268dd4df717bdb9054f3f9ee47fa1f429 (patch)
tree2e98fedf75a53ef5a34d3aedf7f7c547fe5a31a2 /pkg/npm
parentc55f329ecf8d32bad0d5bc2aae1da1522b3a92f8 (diff)
downloadunit-d6f38a3268dd4df717bdb9054f3f9ee47fa1f429.tar.gz
unit-d6f38a3268dd4df717bdb9054f3f9ee47fa1f429.tar.bz2
Node.js: added check for libunit version at compile time.
Diffstat (limited to 'pkg/npm')
-rw-r--r--pkg/npm/Makefile5
1 files changed, 5 insertions, 0 deletions
diff --git a/pkg/npm/Makefile b/pkg/npm/Makefile
index 2696c226..dfa9ccdc 100644
--- a/pkg/npm/Makefile
+++ b/pkg/npm/Makefile
@@ -3,7 +3,11 @@
DEFAULT_VERSION := $(shell grep 'define NXT_VERSION' ../../src/nxt_main.h \
| sed -e 's/^.*"\(.*\)".*/\1/')
+DEFAULT_VERNUM := $(shell grep 'define NXT_VERNUM' ../../src/nxt_main.h \
+ | sed -e 's/[^0-9]//g')
+
VERSION ?= $(DEFAULT_VERSION)
+VERNUM ?= $(DEFAULT_VERNUM)
NPM ?= npm
default:
@@ -11,6 +15,7 @@ default:
copy:
cp -rp ../../src/nodejs/unit-http .
+ echo '#define NXT_NODE_VERNUM ${VERNUM}' > unit-http/version.h
mv unit-http/binding_pub.gyp unit-http/binding.gyp
sed -e 's/"version"\s*:.*/"version": "${VERSION}.0",/' \
unit-http/package.json > unit-http/package.json.tmp