summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2013-05-24 17:16:08 -0700
committerisaacs <i@izs.me>2013-05-27 14:46:52 -0700
commitba048e72b02e17f0c73e0dcb7d37e76a03327c5a (patch)
treebe9aa3f1f745db25ce2fa12116acf07ac48683cd /configure
parent9c7078cea2b719defbb6519d10a14ab15e733822 (diff)
parentf904d614bf62d4bbf9c3adffb485f84d5c77c2d8 (diff)
downloadandroid-node-v8-ba048e72b02e17f0c73e0dcb7d37e76a03327c5a.tar.gz
android-node-v8-ba048e72b02e17f0c73e0dcb7d37e76a03327c5a.tar.bz2
android-node-v8-ba048e72b02e17f0c73e0dcb7d37e76a03327c5a.zip
Merge remote-tracking branch 'ry/v0.10'
Conflicts: AUTHORS ChangeLog configure deps/uv/ChangeLog deps/uv/src/unix/darwin.c deps/uv/src/unix/stream.c deps/uv/src/version.c deps/v8/src/isolate.cc deps/v8/src/version.cc lib/http.js src/node_version.h
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure32
1 files changed, 19 insertions, 13 deletions
diff --git a/configure b/configure
index 7fb2588b99..012b77f24a 100755
--- a/configure
+++ b/configure
@@ -10,7 +10,8 @@ import sys
CC = os.environ.get('CC', 'cc')
root_dir = os.path.dirname(__file__)
-sys.path.insert(0, os.path.join(root_dir, 'deps', 'v8', 'tools'))
+sys.path.insert(0, os.path.join(root_dir, 'tools', 'gyp', 'pylib'))
+from gyp.common import GetFlavor
# parse our options
parser = optparse.OptionParser()
@@ -236,7 +237,7 @@ parser.add_option("--dest-os",
action="store",
dest="dest_os",
help="Operating system to build for. Valid values are: "
- "win, mac, solaris, freebsd, linux")
+ "win, mac, solaris, freebsd, openbsd, linux")
parser.add_option("--no-ifaddrs",
action="store_true",
@@ -462,18 +463,18 @@ def configure_node(o):
# By default, enable DTrace on SunOS systems. Don't allow it on other
# systems, since it won't work. (The MacOS build process is different than
# SunOS, and we haven't implemented it.)
- if sys.platform.startswith('sunos') or sys.platform.startswith('darwin'):
+ if flavor in ('solaris', 'mac'):
o['variables']['node_use_dtrace'] = b(not options.without_dtrace)
o['variables']['uv_use_dtrace'] = o['variables']['node_use_dtrace']
o['variables']['uv_parent_path'] = '/deps/uv/'
- elif sys.platform.startswith('linux'):
+ elif flavor == 'linux':
o['variables']['node_use_dtrace'] = 'false'
o['variables']['node_use_systemtap'] = b(options.with_dtrace)
if options.systemtap_includes:
o['include_dirs'] += [options.systemtap_includes]
elif options.with_dtrace:
raise Exception(
- 'DTrace is currently only supported on SunOS or Linux systems.')
+ 'DTrace is currently only supported on SunOS, MacOS or Linux systems.')
else:
o['variables']['node_use_dtrace'] = 'false'
o['variables']['node_use_systemtap'] = 'false'
@@ -482,7 +483,7 @@ def configure_node(o):
o['defines'] += ['SUNOS_NO_IFADDRS']
# By default, enable ETW on Windows.
- if sys.platform.startswith('win32'):
+ if flavor == 'win':
o['variables']['node_use_etw'] = b(not options.without_etw);
elif options.with_etw:
raise Exception('ETW is only supported on Windows.')
@@ -490,7 +491,7 @@ def configure_node(o):
o['variables']['node_use_etw'] = 'false'
# By default, enable Performance counters on Windows.
- if sys.platform.startswith('win32'):
+ if flavor == 'win':
o['variables']['node_use_perfctr'] = b(not options.without_perfctr);
elif options.with_perfctr:
raise Exception('Performance counter is only supported on Windows.')
@@ -603,7 +604,7 @@ def configure_openssl(o):
def configure_winsdk(o):
- if not sys.platform.startswith('win32'):
+ if flavor != 'win':
return
winsdk_dir = os.environ.get("WindowsSdkDir")
@@ -616,6 +617,13 @@ def configure_winsdk(o):
print "ctrpp not found in WinSDK path--using pre-gen files from tools/msvs/genfiles."
+# determine the "flavor" (operating system) we're building for,
+# leveraging gyp's GetFlavor function
+flavor_params = {};
+if (options.dest_os):
+ flavor_params['flavor'] = options.dest_os;
+flavor = GetFlavor(flavor_params);
+
output = {
'variables': { 'python': sys.executable },
'include_dirs': [],
@@ -668,14 +676,12 @@ write('config.mk',
'# Do not edit. Generated by the configure script.\n' + config)
if options.use_ninja:
- gyp_args = ['-f', 'ninja']
+ gyp_args = ['-f', 'ninja-' + flavor]
elif options.use_xcode:
gyp_args = ['-f', 'xcode']
-elif os.name == 'nt':
+elif flavor == 'win':
gyp_args = ['-f', 'msvs', '-G', 'msvs_version=auto']
-elif options.dest_os:
- gyp_args = ['-f', 'make-' + options.dest_os]
else:
- gyp_args = ['-f', 'make']
+ gyp_args = ['-f', 'make-' + flavor]
subprocess.call([sys.executable, 'tools/gyp_node'] + gyp_args)