Skip to content

Commit 02bc6f3

Browse files
richardlaurvagg
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 eb4666b commit 02bc6f3

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
@@ -139,6 +139,9 @@ def files(action):
139139

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

142+
headers(action)
143+
144+
def headers(action):
142145
action([
143146
'common.gypi',
144147
'config.gypi',
@@ -183,8 +186,13 @@ def run(args):
183186
if len(args) > 2: dst_dir = abspath(args[2] + '/' + dst_dir)
184187

185188
cmd = args[1] if len(args) > 1 else 'install'
186-
if cmd == 'install': return files(install)
187-
if cmd == 'uninstall': return files(uninstall)
189+
if os.environ.get('HEADERS_ONLY'):
190+
if cmd == 'install': return headers(install)
191+
if cmd == 'uninstall': return headers(uninstall)
192+
else:
193+
if cmd == 'install': return files(install)
194+
if cmd == 'uninstall': return files(uninstall)
195+
188196
raise RuntimeError('Bad command: %s\n' % cmd)
189197

190198
if __name__ == '__main__':

0 commit comments

Comments
 (0)