Skip to content

Commit ce2a393

Browse files
richardlaujasnell
authored andcommitted
tools: backport tools/install.py for headers
Backport the tools/install.py changes from 628a3ab that were missed when 6fb0b92 backported the corresponding changes to the Makefile to build the headers only archive. PR-URL: #4149 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Johan Bergström <bugs@bergstroem.nu> Reviewed-By: Rod Vagg <rod@vagg.org>
1 parent da747bf commit ce2a393

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

tools/install.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,9 @@ def files(action):
142142

143143
if 'true' == variables.get('node_install_npm'): npm_files(action)
144144

145+
headers(action)
146+
147+
def headers(action):
145148
action([
146149
'common.gypi',
147150
'config.gypi',
@@ -194,8 +197,13 @@ def run(args):
194197
install_path = dst_dir + node_prefix + '/'
195198

196199
cmd = args[1] if len(args) > 1 else 'install'
197-
if cmd == 'install': return files(install)
198-
if cmd == 'uninstall': return files(uninstall)
200+
if os.environ.get('HEADERS_ONLY'):
201+
if cmd == 'install': return headers(install)
202+
if cmd == 'uninstall': return headers(uninstall)
203+
else:
204+
if cmd == 'install': return files(install)
205+
if cmd == 'uninstall': return files(uninstall)
206+
199207
raise RuntimeError('Bad command: %s\n' % cmd)
200208

201209
if __name__ == '__main__':

0 commit comments

Comments
 (0)