MCPcopy Index your code
hub / github.com/nodejs/node / run_gyp

Function run_gyp

tools/gyp_node.py:20–51  ·  view source on GitHub ↗
(args)

Source from the content-addressed store, hash-verified

18output_dir = os.path.join(os.path.abspath(node_root), 'out')
19
20def run_gyp(args):
21 # GYP bug.
22 # On msvs it will crash if it gets an absolute path.
23 # On Mac/make it will crash if it doesn't get an absolute path.
24 a_path = node_root if sys.platform == 'win32' else os.path.abspath(node_root)
25 args.append(os.path.join(a_path, 'node.gyp'))
26 common_fn = os.path.join(a_path, 'common.gypi')
27 options_fn = os.path.join(a_path, 'config.gypi')
28
29 if os.path.exists(common_fn):
30 args.extend(['-I', common_fn])
31
32 if os.path.exists(options_fn):
33 args.extend(['-I', options_fn])
34
35 args.append('--depth=' + node_root)
36
37 # There's a bug with windows which doesn't allow this feature.
38 if sys.platform != 'win32' and 'ninja' not in args:
39 # Tell gyp to write the Makefiles into output_dir
40 args.extend(['--generator-output', output_dir])
41
42 # Tell make to write its output into the same dir
43 args.extend(['-Goutput_dir=' + output_dir])
44
45 args.append('-Dcomponent=static_library')
46 args.append('-Dlibrary=static_library')
47
48 rc = gyp.main(args)
49 if rc != 0:
50 print('Error running GYP')
51 sys.exit(rc)
52
53
54if __name__ == '__main__':

Callers 2

configure.pyFile · 0.90
gyp_node.pyFile · 0.85

Calls 7

printFunction · 0.50
appendMethod · 0.45
joinMethod · 0.45
existsMethod · 0.45
extendMethod · 0.45
mainMethod · 0.45
exitMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…