diff options
Diffstat (limited to 'auto/modules/nodejs')
-rw-r--r-- | auto/modules/nodejs | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/auto/modules/nodejs b/auto/modules/nodejs index 443ee9d5..e0208f5d 100644 --- a/auto/modules/nodejs +++ b/auto/modules/nodejs @@ -123,8 +123,10 @@ fi NXT_NODE_TMP=${NXT_BUILD_DIR}/src/${NXT_NODE}/unit-http NXT_NODE_TARBALL=${NXT_BUILD_DIR}/${NXT_NODE}-unit-http.tar.gz -NXT_NODE_EXPORTS="export UNIT_SRC_PATH=${PWD}/src && \ - export UNIT_LIB_STATIC_PATH=${PWD}/${NXT_BUILD_DIR}/libunit.a" +NXT_NODE_VERSION_FILE=${NXT_NODE_TMP}/version.h +NXT_NODE_EXPORTS="export UNIT_SRC_PATH=${PWD}/src \ + && export UNIT_BUILD_PATH=${PWD}/${NXT_BUILD_DIR} \ + && export UNIT_LIB_STATIC_PATH=${PWD}/${NXT_BUILD_DIR}/libunit.a" if [ -n "$NXT_NODE_LOCAL" ]; then NXT_NODE_INSTALL=local-install @@ -148,9 +150,15 @@ ${NXT_NODE}: ${NXT_NODE}-copy $NXT_BUILD_DIR/$NXT_LIB_UNIT_STATIC ${NXT_NODE_EXPORTS} && \\ cd ${NXT_NODE_TMP} && ${NXT_NODE_GYP} configure build clean -${NXT_NODE}-copy: +${NXT_NODE}-copy: ${NXT_NODE_VERSION_FILE} mkdir -p ${NXT_BUILD_DIR}/src/ - cp -rp src/nodejs/ ${NXT_BUILD_DIR}/src/${NXT_NODE} + cp -rp src/nodejs/* ${NXT_BUILD_DIR}/src/${NXT_NODE} + +${NXT_NODE_VERSION_FILE}: src/nxt_main.h + mkdir -p ${NXT_NODE_TMP} + $echo -n '#define NXT_NODE_VERNUM ' > $NXT_NODE_VERSION_FILE + grep 'define NXT_VERNUM' src/nxt_main.h \\ + | sed -e 's/[^0-9]//g' >> $NXT_NODE_VERSION_FILE ${NXT_NODE_TARBALL}: ${NXT_NODE}-copy tar -zcvf ${NXT_NODE_TARBALL} -C ${NXT_NODE_TMP} . @@ -161,7 +169,7 @@ install: ${NXT_NODE}-$NXT_NODE_INSTALL ${NXT_NODE}-install: ${NXT_NODE_TARBALL} \ $NXT_BUILD_DIR/$NXT_LIB_UNIT_STATIC ${NXT_NODE_EXPORTS} && \\ - ${NXT_NPM} install -g ${PWD}/${NXT_NODE_TARBALL} + ${NXT_NPM} install -g --unsafe-perm ${PWD}/${NXT_NODE_TARBALL} ${NXT_NODE}-uninstall: ${NXT_NPM} uninstall -g unit-http |