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 <[email protected]>
Reviewed-By: Johan Bergström <[email protected]>
Reviewed-By: Rod Vagg <[email protected]>
  • Loading branch information
richardlau authored and rvagg committed Dec 7, 2015
1 parent a7abebb commit 28ab7b0
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 @@ -139,6 +139,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 @@ -183,8 +186,13 @@ def run(args):
if len(args) > 2: dst_dir = abspath(args[2] + '/' + dst_dir)

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 28ab7b0

Please sign in to comment.