Node.js: added check for libunit version at compile time.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user