diff --git a/tools/install.py b/tools/install.py index c8316b92ca1548..f9613f3df0dfd7 100755 --- a/tools/install.py +++ b/tools/install.py @@ -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', @@ -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__':