Skip to content

Commit 60210c9

Browse files
committed
build: add vcbuild tar-headers target
Adds option to vcbuild.bat to build header package.
1 parent 8d65f17 commit 60210c9

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

tools/install.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -140,11 +140,11 @@ def headers(action):
140140
], 'include/node/')
141141

142142
# Add the expfile that is created on AIX
143-
if os.isfile('out/Release/node.exp'):
143+
if os.path.isfile('out/Release/node.exp'):
144144
action(['out/Release/node.exp'], 'include/node/')
145145

146146
# Add the x64 windows libfile
147-
if os.isfile('Release/node.lib'):
147+
if os.path.isfile('Release/node.lib'):
148148
action(['Release/node.lib'], 'include/node/')
149149

150150
subdir_files('deps/v8/include', 'include/node/', action)

vcbuild.bat

+14
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ set nosnapshot=
2323
set test_args=
2424
set msi=
2525
set upload=
26+
set tar_headers=
2627
set licensertf=
2728
set jslint=
2829
set buildnodeweak=
@@ -55,6 +56,7 @@ if /i "%1"=="nosnapshot" set nosnapshot=1&goto arg-ok
5556
if /i "%1"=="noetw" set noetw=1&goto arg-ok
5657
if /i "%1"=="noperfctr" set noperfctr=1&goto arg-ok
5758
if /i "%1"=="licensertf" set licensertf=1&goto arg-ok
59+
if /i "%1"=="tar-headers" set tar_headers=1&goto arg-ok
5860
if /i "%1"=="test" set test_args=%test_args% addons doctool known_issues message parallel sequential -J&set jslint=1&set build_addons=1&goto arg-ok
5961
if /i "%1"=="test-ci" set test_args=%test_args% %test_ci_args% -p tap --logfile test.tap addons doctool known_issues message sequential parallel&set build_addons=1&goto arg-ok
6062
if /i "%1"=="test-addons" set test_args=%test_args% addons&set build_addons=1&goto arg-ok
@@ -246,6 +248,17 @@ ssh -F %SSHCONFIG% %STAGINGSERVER% "touch nodejs/%DISTTYPEDIR%/v%FULLVERSION%/no
246248
:run
247249
@rem Run tests if requested.
248250

251+
:tar-headers
252+
@rem build headers package
253+
if "%tar_headers%"=="" goto build-node-weak
254+
set HEADERS_ONLY=1
255+
set TARNAME=node-%FULLVERSION%
256+
python tools\install.py install %TARNAME% ""
257+
7z a %TARNAME%-headers.tar %TARNAME%
258+
rmdir /s /q %TARNAME%
259+
7z a %TARNAME%-headers.tar.gz %TARNAME%-headers.tar
260+
del %TARNAME%-headers.tar
261+
249262
:build-node-weak
250263
@rem Build node-weak if required
251264
if "%buildnodeweak%"=="" goto build-addons
@@ -316,6 +329,7 @@ echo Examples:
316329
echo vcbuild.bat : builds release build
317330
echo vcbuild.bat debug : builds debug build
318331
echo vcbuild.bat release msi : builds release build and MSI installer package
332+
echo vcbuild.bat tar-headers : builds header package with node.lib
319333
echo vcbuild.bat test : builds debug build and runs tests
320334
echo vcbuild.bat build-release : builds the release distribution as used by nodejs.org
321335
echo vcbuild.bat enable-vtune : builds nodejs with Intel VTune profiling support to profile JavaScript

0 commit comments

Comments
 (0)