add build/gyp_node build script

This commit is contained in:
Ryan Dahl committed 2011-08-06 03:12:07 -07:00
1 parent 51ffed1cd0
commit f038252ba5
2 files changed
+33 -5

No files matched your search

+5 -5
View File
@@ -13,10 +13,10 @@ node_g
/.cproject
gyp-mac-tool
gyp/all.Makefile
gyp/js2c.host.mk
gyp/node.target.mk
gyp/node_js2c.host.mk
gyp/node_js2c.target.mk
build/all.Makefile
build/js2c.host.mk
build/node.target.mk
build/node_js2c.host.mk
build/node_js2c.target.mk
out/
Makefile
Executable
+28
View File
@@ -0,0 +1,28 @@
#!/usr/bin/python
import glob
import os
import shlex
import sys
script_dir = os.path.dirname(__file__)
node_root = os.path.normpath(os.path.join(script_dir, os.pardir))
sys.path.insert(0, os.path.join(node_root, 'build', 'gyp', 'pylib'))
import gyp
def run_gyp(args):
rc = gyp.main(args)
if rc != 0:
print 'Error running GYP'
sys.exit(rc)
if __name__ == '__main__':
args = sys.argv[1:]
args.append(os.path.join(script_dir, 'node.gyp'))
args.append('--depth=' + node_root)
args.append('-Dtarget_arch=x64')
args.append('-Dcomponent=static_library')
args.append('-Dlibrary_library')
gyp_args = list(args)
run_gyp(gyp_args)