@@ -1697,29 +1697,24 @@ index 655802980a6ea94d1d4ca1dc63c8c8e905fbb83a..ab1a18a215cb7393310324c6dbcacc66
16971697 if 'false' == variables.get('node_shared_libuv'):
16981698 subdir_files('deps/uv/include', 'include/node/', action)
16991699diff --git a/tools/js2c.py b/tools/js2c.py
1700- index 1346b2a87046d3472577875c887b3b44a63280ed..752344d68c3f63b4c5e491b33d4576ed48f8b74f 100755
1700+ index 4594694a2cab0d878d86127a72714ed60c251b6e..9e9883129bed62c591d23f71d139514c5034ac8d 100755
17011701--- a/tools/js2c.py
17021702+++ b/tools/js2c.py
1703- @@ -261,10 +261,18 @@ def NormalizeFileName(filename):
1704- split = ['internal'] + split
1705- else: # `lib/**/*.js` so drop the 'lib' part
1703+ @@ -130,6 +130,14 @@ def NormalizeFileName(filename):
17061704 split = split[1:]
1707- +
17081705 if len(split):
17091706 filename = '/'.join(split)
1710- - return os.path.splitext(filename)[0]
1711-
1707+ +
17121708+ # Electron-specific: when driving the node build from Electron, we generate
17131709+ # config.gypi in a separate directory and pass the absolute path to js2c.
17141710+ # This overrides the absolute path so that the variable names in the
17151711+ # generated C are as if it was in the root node directory.
17161712+ if filename.endswith("/config.gypi"):
17171713+ filename = "config.gypi"
17181714+
1719- + return os.path.splitext(filename)[0]
1715+ return os.path.splitext(filename)[0]
1716+
17201717
1721- def JS2C(source_files, target):
1722- # Process input from all *macro.py files
17231718diff --git a/tools/tar.py b/tools/tar.py
17241719new file mode 100644
17251720index 0000000000000000000000000000000000000000..eb697be25779db62c829aac45a509804e9fff331
0 commit comments