summaryrefslogtreecommitdiff
path: root/node.gyp
diff options
context:
space:
mode:
authorRefael Ackermann <refack@gmail.com>2019-01-14 18:43:16 -0500
committerRefael Ackermann <refack@gmail.com>2019-05-18 12:39:58 -0400
commitbfbc035033e4cedbe039a9757da693c50ac44c5c (patch)
tree0577310b44ba83f21240b8350b0dade44a92d21c /node.gyp
parenta49ab0f89e2e9d9bf37236d24c61cee9e1a4be0c (diff)
downloadandroid-node-v8-bfbc035033e4cedbe039a9757da693c50ac44c5c.tar.gz
android-node-v8-bfbc035033e4cedbe039a9757da693c50ac44c5c.tar.bz2
android-node-v8-bfbc035033e4cedbe039a9757da693c50ac44c5c.zip
tools: refactor js2c.py for maximal Python3 compatibility
* add explicit `--target` argument to enable succinct gyp declaration * simplify js2c semantics PR-URL: https://github.com/nodejs/node/pull/25518 Reviewed-By: Christian Clauss <cclauss@me.com>
Diffstat (limited to 'node.gyp')
-rw-r--r--node.gyp7
1 files changed, 4 insertions, 3 deletions
diff --git a/node.gyp b/node.gyp
index 926fe98959..df70d26f35 100644
--- a/node.gyp
+++ b/node.gyp
@@ -859,6 +859,8 @@
'action_name': 'node_js2c',
'process_outputs_as_sources': 1,
'inputs': [
+ # Put the code first so it's a dependency and can be used for invocation.
+ 'tools/js2c.py',
'<@(library_files)',
'config.gypi',
'tools/js2c_macros/check_macros.py'
@@ -878,9 +880,8 @@
}]
],
'action': [
- 'python', 'tools/js2c.py',
- '<@(_outputs)',
- '<@(_inputs)',
+ 'python', '<@(_inputs)',
+ '--target', '<@(_outputs)',
],
},
],