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

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

‎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+
defheaders(action):
142145
action([
143146
'common.gypi',
144147
'config.gypi',
@@ -183,8 +186,13 @@ def run(args):
183186
iflen(args) >2: dst_dir=abspath(args[2] +'/'+dst_dir)
184187

185188
cmd=args[1] iflen(args) >1else'install'
186-
ifcmd=='install': returnfiles(install)
187-
ifcmd=='uninstall': returnfiles(uninstall)
189+
ifos.environ.get('HEADERS_ONLY'):
190+
ifcmd=='install': returnheaders(install)
191+
ifcmd=='uninstall': returnheaders(uninstall)
192+
else:
193+
ifcmd=='install': returnfiles(install)
194+
ifcmd=='uninstall': returnfiles(uninstall)
195+
188196
raiseRuntimeError('Bad command: %s\n'%cmd)
189197

190198
if__name__=='__main__':

0 commit comments

Comments
 (0)