Skip to content

Commit

Permalink
tools: backport tools/install.py for headers
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
richardlau authored and rvagg committed Feb 8, 2016
1 parent 8f2db88 commit 4f81d78
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions tools/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,9 @@ def files(action):

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

headers(action)

def headers(action):
action([
'common.gypi',
'config.gypi',
Expand Down Expand Up @@ -194,8 +197,13 @@ def run(args):
install_path = dst_dir + node_prefix + '/'

cmd = args[1] if len(args) > 1 else 'install'
if cmd == 'install': return files(install)
if cmd == 'uninstall': return files(uninstall)
if os.environ.get('HEADERS_ONLY'):
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)

if __name__ == '__main__':
Expand Down

0 comments on commit 4f81d78

Please sign in to comment.