Browse Source

add build/gyp_node build script

v0.7.4-release
Ryan Dahl 14 years ago
parent
commit
f038252ba5
  1. 10
      .gitignore
  2. 28
      build/gyp_node

10
.gitignore

@ -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

28
build/gyp_node

@ -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)
Loading…
Cancel
Save