Files
node-dtrace-provider/libusdt-build.sh
T
Chris Andrews 1ac5983177 Just use node from PATH when figuring out the build arch.
According to:

  https://github.com/isaacs/npm/commit/898594413b0ca3d4bf120dfffeb493dae516b4e9

npm will have adjusted the path, and we assume that the user will have
done so if they're building without npm.
2012-11-20 22:15:10 +00:00

30 lines
697 B
Bash
Executable File

#!/bin/sh
# GYP's MAKEFLAGS confuses libusdt's Makefile
#
unset MAKEFLAGS
# Ask node what arch it's been built for, and build libusdt to match.
#
# We use node from the path; npm will have adjusted PATH for us if
# necessary, otherwise we assume the user did so when building by
# hand.
#
# (this will need to change at the point that GYP is able to build
# node extensions universal on the Mac - for now we'll go with x86_64
# on a 64 bit Mac, because that's the default architecture in that
# situation).
#
ARCH=`node libusdt-arch.js`
echo "Building libusdt for ${ARCH}"
export ARCH
# Respect a MAKE variable if set
if [ -z $MAKE ]; then
MAKE=make
fi
# Build.
#
$MAKE -C libusdt clean all