|
|
@ -22,9 +22,17 @@ def run_gyp(args): |
|
|
|
|
|
|
|
if __name__ == '__main__': |
|
|
|
args = sys.argv[1:] |
|
|
|
args.append(os.path.join(os.path.abspath(node_root), 'node.gyp')) |
|
|
|
|
|
|
|
options_fn = os.path.abspath(os.path.join(node_root, 'options.gypi')) |
|
|
|
# GYP bug. |
|
|
|
# On msvs it will crash if it gets an absolute path. |
|
|
|
# On Mac/make it will crash if it doesn't get an absolute path. |
|
|
|
if sys.platform == 'win32': |
|
|
|
args.append(os.path.join(node_root, 'node.gyp')) |
|
|
|
options_fn = os.path.join(node_root, 'options.gypi') |
|
|
|
else: |
|
|
|
args.append(os.path.join(os.path.abspath(node_root), 'node.gyp')) |
|
|
|
options_fn = os.path.join(os.path.abspath(node_root), 'options.gypi') |
|
|
|
|
|
|
|
if os.path.exists(options_fn): |
|
|
|
args.extend(['-I', options_fn]) |
|
|
|
|
|
|
|