mirror of
https://github.com/hanzoai/node-dtrace-provider.git
synced 2026-09-23 23:48:45 +00:00
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.
30 lines
697 B
Bash
Executable File
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
|