build: add tar-headers target for headers-only tar
to replace the full src download by node-gyp, using the proper format instead of the full source format PR-URL: https://github.com/nodejs/io.js/pull/1975 Reviewed-By: William Blankenship <william.jblankenship@gmail.com> Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
This commit is contained in:
parent
1f371e3988
commit
628a3ab093
23
Makefile
23
Makefile
@ -340,6 +340,29 @@ doc-upload: tar
|
|||||||
scp -r out/doc/ $(STAGINGSERVER):staging/$(DISTTYPEDIR)/$(FULLVERSION)/
|
scp -r out/doc/ $(STAGINGSERVER):staging/$(DISTTYPEDIR)/$(FULLVERSION)/
|
||||||
ssh $(STAGINGSERVER) "touch staging/$(DISTTYPEDIR)/$(FULLVERSION)/doc.done"
|
ssh $(STAGINGSERVER) "touch staging/$(DISTTYPEDIR)/$(FULLVERSION)/doc.done"
|
||||||
|
|
||||||
|
$(TARBALL)-headers: config.gypi release-only
|
||||||
|
$(PYTHON) ./configure --prefix=/ --dest-cpu=$(DESTCPU) --tag=$(TAG) $(CONFIG_FLAGS)
|
||||||
|
HEADERS_ONLY=1 $(PYTHON) tools/install.py install '$(TARNAME)' '$(PREFIX)'
|
||||||
|
find $(TARNAME)/ -type l | xargs rm # annoying on windows
|
||||||
|
tar -cf $(TARNAME)-headers.tar $(TARNAME)
|
||||||
|
rm -rf $(TARNAME)
|
||||||
|
gzip -c -f -9 $(TARNAME)-headers.tar > $(TARNAME)-headers.tar.gz
|
||||||
|
ifeq ($(XZ), 0)
|
||||||
|
xz -c -f -$(XZ_COMPRESSION) $(TARNAME)-headers.tar > $(TARNAME)-headers.tar.xz
|
||||||
|
endif
|
||||||
|
rm $(TARNAME)-headers.tar
|
||||||
|
|
||||||
|
tar-headers: $(TARBALL)-headers
|
||||||
|
|
||||||
|
tar-headers-upload: tar-headers
|
||||||
|
ssh $(STAGINGSERVER) "mkdir -p staging/$(DISTTYPEDIR)/$(FULLVERSION)"
|
||||||
|
scp -p $(TARNAME)-headers.tar.gz $(STAGINGSERVER):staging/$(DISTTYPEDIR)/$(FULLVERSION)/$(TARNAME)-headers.tar.gz
|
||||||
|
ssh $(STAGINGSERVER) "touch staging/$(DISTTYPEDIR)/$(FULLVERSION)/$(TARNAME)-headers.tar.gz.done"
|
||||||
|
ifeq ($(XZ), 0)
|
||||||
|
scp -p $(TARNAME)-headers.tar.xz $(STAGINGSERVER):staging/$(DISTTYPEDIR)/$(FULLVERSION)/$(TARNAME)-headers.tar.xz
|
||||||
|
ssh $(STAGINGSERVER) "touch staging/$(DISTTYPEDIR)/$(FULLVERSION)/$(TARNAME)-headers.tar.xz.done"
|
||||||
|
endif
|
||||||
|
|
||||||
$(BINARYTAR): release-only
|
$(BINARYTAR): release-only
|
||||||
rm -rf $(BINARYNAME)
|
rm -rf $(BINARYNAME)
|
||||||
rm -rf out/deps out/Release
|
rm -rf out/deps out/Release
|
||||||
|
@ -156,6 +156,9 @@ def files(action):
|
|||||||
|
|
||||||
if 'true' == variables.get('node_install_npm'): npm_files(action)
|
if 'true' == variables.get('node_install_npm'): npm_files(action)
|
||||||
|
|
||||||
|
headers(action)
|
||||||
|
|
||||||
|
def headers(action):
|
||||||
action([
|
action([
|
||||||
'common.gypi',
|
'common.gypi',
|
||||||
'config.gypi',
|
'config.gypi',
|
||||||
@ -178,7 +181,6 @@ def files(action):
|
|||||||
subdir_files('deps/openssl/config/archs', 'include/node/openssl/archs', action)
|
subdir_files('deps/openssl/config/archs', 'include/node/openssl/archs', action)
|
||||||
action(['deps/openssl/config/opensslconf.h'], 'include/node/openssl/')
|
action(['deps/openssl/config/opensslconf.h'], 'include/node/openssl/')
|
||||||
|
|
||||||
|
|
||||||
if 'false' == variables.get('node_shared_zlib'):
|
if 'false' == variables.get('node_shared_zlib'):
|
||||||
action([
|
action([
|
||||||
'deps/zlib/zconf.h',
|
'deps/zlib/zconf.h',
|
||||||
@ -207,8 +209,14 @@ def run(args):
|
|||||||
install_path = dst_dir + node_prefix + '/'
|
install_path = dst_dir + node_prefix + '/'
|
||||||
|
|
||||||
cmd = args[1] if len(args) > 1 else 'install'
|
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)
|
raise RuntimeError('Bad command: %s\n' % cmd)
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
Loading…
x
Reference in New Issue
Block a user