Skip to content

Commit

Permalink
build: simplify if in setting of arg_paths
Browse files Browse the repository at this point in the history
PR-URL: #12653
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Gibson Fahnestock <[email protected]>
  • Loading branch information
refack committed May 16, 2017
1 parent 4aff056 commit 8035527
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions tools/gyp_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,11 @@ def run_gyp(args):
# 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'))
common_fn = os.path.join(node_root, 'common.gypi')
options_fn = os.path.join(node_root, 'config.gypi')
options_fips_fn = os.path.join(node_root, 'config_fips.gypi')
else:
args.append(os.path.join(os.path.abspath(node_root), 'node.gyp'))
common_fn = os.path.join(os.path.abspath(node_root), 'common.gypi')
options_fn = os.path.join(os.path.abspath(node_root), 'config.gypi')
options_fips_fn = os.path.join(os.path.abspath(node_root), 'config_fips.gypi')
a_path = node_root if sys.platform == 'win32' else os.path.abspath(node_root)
args.append(os.path.join(a_path, 'node.gyp'))
common_fn = os.path.join(a_path, 'common.gypi')
options_fn = os.path.join(a_path, 'config.gypi')
options_fips_fn = os.path.join(a_path, 'config_fips.gypi')

if os.path.exists(common_fn):
args.extend(['-I', common_fn])
Expand Down

0 comments on commit 8035527

Please sign in to comment.