Browse Source

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: https://github.com/nodejs/node/pull/4149
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: Rod Vagg <rod@vagg.org>
v0.12-staging
Richard Lau 9 years ago
committed by James M Snell
parent
commit
ce2a393e34
  1. 12
      tools/install.py

12
tools/install.py

@ -142,6 +142,9 @@ def files(action):
if 'true' == variables.get('node_install_npm'): npm_files(action) if 'true' == variables.get('node_install_npm'): npm_files(action)
headers(action)
def headers(action):
action([ action([
'common.gypi', 'common.gypi',
'config.gypi', 'config.gypi',
@ -194,8 +197,13 @@ def run(args):
install_path = dst_dir + node_prefix + '/' install_path = dst_dir + node_prefix + '/'
cmd = args[1] if len(args) > 1 else 'install' cmd = args[1] if len(args) > 1 else 'install'
if cmd == 'install': return files(install) if os.environ.get('HEADERS_ONLY'):
if cmd == 'uninstall': return files(uninstall) if cmd == 'install': return headers(install)
if cmd == 'uninstall': return headers(uninstall)
else:
if cmd == 'install': return files(install)
if cmd == 'uninstall': return files(uninstall)
raise RuntimeError('Bad command: %s\n' % cmd) raise RuntimeError('Bad command: %s\n' % cmd)
if __name__ == '__main__': if __name__ == '__main__':

Loading…
Cancel
Save