summaryrefslogtreecommitdiff
path: root/tools/gyp_node.py
diff options
context:
space:
mode:
authorRefael Ackermann <refack@gmail.com>2017-04-26 09:27:46 -0400
committerRefael Ackermann <refack@gmail.com>2017-05-16 15:26:20 -0400
commit80355271c324d2a5515768c1d58976d4483f650c (patch)
tree9242a82d6f32e32de0ea8740808e98122db82d35 /tools/gyp_node.py
parent4aff0563aa75f64adc6f6d4ef0965b3a14617d2b (diff)
downloadandroid-node-v8-80355271c324d2a5515768c1d58976d4483f650c.tar.gz
android-node-v8-80355271c324d2a5515768c1d58976d4483f650c.tar.bz2
android-node-v8-80355271c324d2a5515768c1d58976d4483f650c.zip
build: simplify `if` in setting of arg_paths
PR-URL: https://github.com/nodejs/node/pull/12653 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Diffstat (limited to 'tools/gyp_node.py')
-rwxr-xr-xtools/gyp_node.py15
1 files changed, 5 insertions, 10 deletions
diff --git a/tools/gyp_node.py b/tools/gyp_node.py
index b37cc7c5f0..043053c3da 100755
--- a/tools/gyp_node.py
+++ b/tools/gyp_node.py
@@ -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])