pass absolute path to npm executable

This commit is contained in:
Konstantin Käfer
2014-08-12 13:29:26 +02:00
parent 9b9ad20a90
commit 52939ce2fa
4 changed files with 18 additions and 4 deletions

9
configure vendored
View File

@@ -22,6 +22,11 @@ parser.add_option("--node",
dest="node",
help="Name of the node executable (defaults to node)")
parser.add_option("--npm",
action="store",
dest="npm",
help="Name of the npm executable (defaults to npm)")
parser.add_option("--pkg-config-root",
action="store",
dest="pkgconfig_root",
@@ -59,6 +64,10 @@ def configure_mbgl(o):
o['variables']['node'] = options.node
else:
o['variables']['node'] = 'node'
if options.npm:
o['variables']['npm'] = options.npm
else:
o['variables']['npm'] = 'npm'
o['target_defaults']['default_configuration'] = 'Debug' if options.debug else 'Release'

View File

@@ -49,7 +49,7 @@
'outputs': [
'bin/node_modules',
],
'action': ['./scripts/npm_install.sh']
'action': ['./scripts/npm_install.sh', '<@(npm)']
}
],
},

View File

@@ -4,5 +4,5 @@ set -e
set -o pipefail
cd bin
npm install --clang=1
$1 install --clang=1
cd ../

View File

@@ -40,6 +40,9 @@ if [[ $MISSING_DEPS != "" ]]; then
exit 1
fi
NODE=`which node`
NPM=`which npm`
if [ ! -d 'mapnik-packaging/.git' ]; then
git clone --depth=1 https://github.com/mapnik/mapnik-packaging.git
fi
@@ -92,7 +95,8 @@ cd ../../
./configure \
--pkg-config-root=`pwd`/mapnik-packaging/osx/out/build-cpp11-libcpp-universal/lib/pkgconfig \
--boost=`pwd`/mapnik-packaging/osx/out/build-cpp11-libcpp-universal \
--node=`which node`
--npm=$NPM \
--node=$NODE
elif [ ${UNAME} = 'Linux' ]; then
@@ -122,5 +126,6 @@ cd ../../
./configure \
--pkg-config-root=`pwd`/mapnik-packaging/osx/out/build-cpp11-libstdcpp-gcc-x86_64-linux/lib/pkgconfig \
--boost=`pwd`/mapnik-packaging/osx/out/build-cpp11-libstdcpp-gcc-x86_64-linux \
--node=`which node`
--npm=$NPM \
--node=$NODE
fi