Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 457 lines (364 sloc) 13.336 kB
e493b29 @bnoordhuis build: respect --debug configure switch
bnoordhuis authored
1 -include config.mk
2
14b04b0 @ry Remove SCONS deprecate WAF
ry authored
3 BUILDTYPE ?= Release
472a72d @bnoordhuis build: honour the PYTHON environment variable
bnoordhuis authored
4 PYTHON ?= python
7b6d3ce @bnoordhuis build: add ninja support to Makefile
bnoordhuis authored
5 NINJA ?= ninja
ea50ebd @skenqbx build: support make install "DESTDIR=/path"
skenqbx authored
6 DESTDIR ?=
2dd710e @isaacs build: Sign pkg installer for OS X
isaacs authored
7 SIGN ?=
ddf4d1a @olof install: Support $(PREFIX) install target directory prefix
olof authored
8 PREFIX ?= /usr/local
2d2494c @orangemocha build: support flaky tests in test-ci
orangemocha authored
9 FLAKY_TESTS ?= run
90ab079 @ry Use --jobs=1 with WAF
ry authored
10
0e59efd @isaacs make: Add benchmark make targets
isaacs authored
11 NODE ?= ./node
12
8656c26 @isaacs Fix #3761 build: Default to V=1
isaacs authored
13 # Default to verbose builds.
14 # To do quiet/pretty builds, run `make V=` to set V to an empty string,
15 # or set the V environment variable to an empty string.
16 V ?= 1
17
d046e9d @bnoordhuis build: make ninja build respect V=
bnoordhuis authored
18 ifeq ($(USE_NINJA),1)
19 ifneq ($(V),)
20 NINJA := $(NINJA) -v
21 endif
22 endif
23
f89beaf @bnoordhuis build: compile release build too if BUILDTYPE=Debug
bnoordhuis authored
24 # BUILDTYPE=Debug builds both release and debug builds. If you want to compile
25 # just the debug build, run `make -C out BUILDTYPE=Debug` instead.
10d92b3 @ry saner targets
ry authored
26 ifeq ($(BUILDTYPE),Release)
27 all: out/Makefile node
28 else
f89beaf @bnoordhuis build: compile release build too if BUILDTYPE=Debug
bnoordhuis authored
29 all: out/Makefile node node_g
10d92b3 @ry saner targets
ry authored
30 endif
31
bb8f734 @ry Fix make targets so they detect changes
ry authored
32 # The .PHONY is needed to ensure that we recursively use the out/Makefile
33 # to check for changes.
34 .PHONY: node node_g
10d92b3 @ry saner targets
ry authored
35
7b6d3ce @bnoordhuis build: add ninja support to Makefile
bnoordhuis authored
36 ifeq ($(USE_NINJA),1)
37 node: config.gypi
38 $(NINJA) -C out/Release/
39 ln -fs out/Release/node node
40
41 node_g: config.gypi
42 $(NINJA) -C out/Debug/
43 ln -fs out/Debug/node $@
44 else
ef3617c @bearice build: fix `make -j' fails after `make clean'
bearice authored
45 node: config.gypi out/Makefile
8656c26 @isaacs Fix #3761 build: Default to V=1
isaacs authored
46 $(MAKE) -C out BUILDTYPE=Release V=$(V)
bb8f734 @ry Fix make targets so they detect changes
ry authored
47 ln -fs out/Release/node node
10d92b3 @ry saner targets
ry authored
48
ef3617c @bearice build: fix `make -j' fails after `make clean'
bearice authored
49 node_g: config.gypi out/Makefile
8656c26 @isaacs Fix #3761 build: Default to V=1
isaacs authored
50 $(MAKE) -C out BUILDTYPE=Debug V=$(V)
7b6d3ce @bnoordhuis build: add ninja support to Makefile
bnoordhuis authored
51 ln -fs out/Debug/node $@
52 endif
e5a0fbe @rsms Added support for cross compilation and also fixed DEST_CPU to repres…
rsms authored
53
dfb1191 @trevnorris src: update v8 build requirements
trevnorris authored
54 out/Makefile: common.gypi deps/uv/uv.gyp deps/http_parser/http_parser.gyp deps/zlib/zlib.gyp deps/v8/build/toolchain.gypi deps/v8/build/features.gypi deps/v8/tools/gyp/v8.gyp node.gyp config.gypi
7b6d3ce @bnoordhuis build: add ninja support to Makefile
bnoordhuis authored
55 ifeq ($(USE_NINJA),1)
56 touch out/Makefile
2010985 @tjfontaine gyp: update to bebdcea
tjfontaine authored
57 $(PYTHON) tools/gyp_node.py -f ninja
7b6d3ce @bnoordhuis build: add ninja support to Makefile
bnoordhuis authored
58 else
2010985 @tjfontaine gyp: update to bebdcea
tjfontaine authored
59 $(PYTHON) tools/gyp_node.py -f make
7b6d3ce @bnoordhuis build: add ninja support to Makefile
bnoordhuis authored
60 endif
61
62 config.gypi: configure
c75251c @bnoordhuis build: don't auto-destroy existing configuration
bnoordhuis authored
63 if [ -f $@ ]; then
64 $(error Stale $@, please re-run ./configure)
65 else
66 $(error No $@, please run ./configure first)
67 fi
e5a0fbe @rsms Added support for cross compilation and also fixed DEST_CPU to repres…
rsms authored
68
be23c51 @indutny Implement make install
indutny authored
69 install: all
ddf4d1a @olof install: Support $(PREFIX) install target directory prefix
olof authored
70 $(PYTHON) tools/install.py $@ '$(DESTDIR)' '$(PREFIX)'
be23c51 @indutny Implement make install
indutny authored
71
72 uninstall:
ddf4d1a @olof install: Support $(PREFIX) install target directory prefix
olof authored
73 $(PYTHON) tools/install.py $@ '$(DESTDIR)' '$(PREFIX)'
1db9a2a @bnoordhuis build: print "not yet implemented" warning on `make install`
bnoordhuis authored
74
14b04b0 @ry Remove SCONS deprecate WAF
ry authored
75 clean:
7abbda8 @isaacs Make rules for release blog post and email message
isaacs authored
76 -rm -rf out/Makefile node node_g out/$(BUILDTYPE)/node blog.html email.md
02c1cb5 @isaacs Makefile: Don't use ** in globs
isaacs authored
77 -find out/ -name '*.o' -o -name '*.a' | xargs rm -rf
e63c782 @isaacs Tests for memory leaks
isaacs authored
78 -rm -rf node_modules
bf0d278 @ry Improve "make dist" remove generated doc from repo.
ry authored
79
14b04b0 @ry Remove SCONS deprecate WAF
ry authored
80 distclean:
48d21dd @ry Force makefile generation in gyp
ry authored
81 -rm -rf out
a308395 @srl295 build: i18n: add icu config options
srl295 authored
82 -rm -f config.gypi icu_config.gypi
0787287 @TooTallNate build: remove 'config.mk' during `make distclean`
TooTallNate authored
83 -rm -f config.mk
7abbda8 @isaacs Make rules for release blog post and email message
isaacs authored
84 -rm -rf node node_g blog.html email.md
e63c782 @isaacs Tests for memory leaks
isaacs authored
85 -rm -rf node_modules
a308395 @srl295 build: i18n: add icu config options
srl295 authored
86 -rm -rf deps/icu
87 -rm -rf deps/icu4c*.tgz deps/icu4c*.zip deps/icu-tmp
15594ea @ry Replace WAF with make/autoconf
ry authored
88
eaf607e @isaacs test: No need for weak in 'make test'
isaacs authored
89 test: all
472a72d @bnoordhuis build: honour the PYTHON environment variable
bnoordhuis authored
90 $(PYTHON) tools/test.py --mode=release simple message
624788d @bnoordhuis Makefile: DRY js lint
bnoordhuis authored
91 $(MAKE) jslint
ccf8f3e @indutny make: add `cpplint` to `test` target
indutny authored
92 $(MAKE) cpplint
bf0d278 @ry Improve "make dist" remove generated doc from repo.
ry authored
93
38f948a @bnoordhuis http: make http2 the default, legacy backend is available with --use-…
bnoordhuis authored
94 test-http1: all
472a72d @bnoordhuis build: honour the PYTHON environment variable
bnoordhuis authored
95 $(PYTHON) tools/test.py --mode=release --use-http1 simple message
e1bb241 @bnoordhuis test: add targets `test-http2` and `test-all-http2`
bnoordhuis authored
96
d02131d @ry Add 'make test-valgrind'
ry authored
97 test-valgrind: all
472a72d @bnoordhuis build: honour the PYTHON environment variable
bnoordhuis authored
98 $(PYTHON) tools/test.py --mode=release --valgrind simple message
d02131d @ry Add 'make test-valgrind'
ry authored
99
1189571 @bnoordhuis build: fix test-gc weakref build rule
bnoordhuis authored
100 test/gc/node_modules/weak/build/Release/weakref.node:
e63c782 @isaacs Tests for memory leaks
isaacs authored
101 @if [ ! -f node ]; then make all; fi
6a8b5b3 @TooTallNate test: bundle node-weak in test/gc so that it doesn't need to be downl…
TooTallNate authored
102 ./node deps/npm/node_modules/node-gyp/bin/node-gyp rebuild \
103 --directory="$(shell pwd)/test/gc/node_modules/weak" \
104 --nodedir="$(shell pwd)"
e63c782 @isaacs Tests for memory leaks
isaacs authored
105
1442c1c @indutny addons: build and test examples
indutny authored
106 build-addons:
107 @if [ ! -f node ]; then make all; fi
108 rm -rf test/addons/doc-*/
109 ./node tools/doc/addon-verify.js
110 $(foreach dir, \
111 $(sort $(dir $(wildcard test/addons/*/*.gyp))), \
112 ./node deps/npm/node_modules/node-gyp/bin/node-gyp rebuild \
113 --directory="$(shell pwd)/$(dir)" \
114 --nodedir="$(shell pwd)" && ) echo "build done"
115
1189571 @bnoordhuis build: fix test-gc weakref build rule
bnoordhuis authored
116 test-gc: all test/gc/node_modules/weak/build/Release/weakref.node
e63c782 @isaacs Tests for memory leaks
isaacs authored
117 $(PYTHON) tools/test.py --mode=release gc
118
1442c1c @indutny addons: build and test examples
indutny authored
119 test-build: all build-addons
120
121 test-all: test-build test/gc/node_modules/weak/build/Release/weakref.node
e63c782 @isaacs Tests for memory leaks
isaacs authored
122 $(PYTHON) tools/test.py --mode=debug,release
123 make test-npm
861f28f @ry Don't unnecessarily output the makefile from the configure script.
ry authored
124
1442c1c @indutny addons: build and test examples
indutny authored
125 test-all-http1: test-build
472a72d @bnoordhuis build: honour the PYTHON environment variable
bnoordhuis authored
126 $(PYTHON) tools/test.py --mode=debug,release --use-http1
e1bb241 @bnoordhuis test: add targets `test-http2` and `test-all-http2`
bnoordhuis authored
127
1442c1c @indutny addons: build and test examples
indutny authored
128 test-all-valgrind: test-build
472a72d @bnoordhuis build: honour the PYTHON environment variable
bnoordhuis authored
129 $(PYTHON) tools/test.py --mode=debug,release --valgrind
d02131d @ry Add 'make test-valgrind'
ry authored
130
b25d26f @orangemocha build: support Jenkins via test-ci
orangemocha authored
131 test-ci:
2d2494c @orangemocha build: support flaky tests in test-ci
orangemocha authored
132 $(PYTHON) tools/test.py -p tap --logfile test.tap --mode=release --arch=$(DESTCPU) --flaky-tests=$(FLAKY_TESTS) simple message internet
b25d26f @orangemocha build: support Jenkins via test-ci
orangemocha authored
133
1442c1c @indutny addons: build and test examples
indutny authored
134 test-release: test-build
472a72d @bnoordhuis build: honour the PYTHON environment variable
bnoordhuis authored
135 $(PYTHON) tools/test.py --mode=release
6670154 @ry 'make test' only runs the simple test
ry authored
136
1442c1c @indutny addons: build and test examples
indutny authored
137 test-debug: test-build
472a72d @bnoordhuis build: honour the PYTHON environment variable
bnoordhuis authored
138 $(PYTHON) tools/test.py --mode=debug
861f28f @ry Don't unnecessarily output the makefile from the configure script.
ry authored
139
1442c1c @indutny addons: build and test examples
indutny authored
140 test-message: test-build
472a72d @bnoordhuis build: honour the PYTHON environment variable
bnoordhuis authored
141 $(PYTHON) tools/test.py message
125b868 @ry Add message tests
ry authored
142
97c9745 @ry Back to WAF
ry authored
143 test-simple: all
472a72d @bnoordhuis build: honour the PYTHON environment variable
bnoordhuis authored
144 $(PYTHON) tools/test.py simple
ade8cf9 @miksago Build API page into build/doc; simplify doctool.
miksago authored
145
d2952cc @tjfontaine test: migrate pummel/keep-alive to wrk
tjfontaine authored
146 test-pummel: all wrk
472a72d @bnoordhuis build: honour the PYTHON environment variable
bnoordhuis authored
147 $(PYTHON) tools/test.py pummel
ade8cf9 @miksago Build API page into build/doc; simplify doctool.
miksago authored
148
97c9745 @ry Back to WAF
ry authored
149 test-internet: all
472a72d @bnoordhuis build: honour the PYTHON environment variable
bnoordhuis authored
150 $(PYTHON) tools/test.py internet
04fac19 @arlolra Split tests.
arlolra authored
151
574f714 @tjfontaine test: move debugger repl into own section
tjfontaine authored
152 test-debugger: all
153 $(PYTHON) tools/test.py debugger
154
f7f8af8 @ry Merge remote branch 'origin/v0.6'
ry authored
155 test-npm: node
272aa58 @othiym23 test: more thorough tests for npm
othiym23 authored
156 rm -rf npm-cache npm-tmp npm-prefix
157 mkdir npm-cache npm-tmp npm-prefix
158 cd deps/npm ; npm_config_cache="$(shell pwd)/npm-cache" \
159 npm_config_prefix="$(shell pwd)/npm-prefix" \
160 npm_config_tmp="$(shell pwd)/npm-tmp" \
03b4f44 @misterdjules test: make test-npm uses custom node, not global
misterdjules authored
161 PATH="../../:${PATH}" node cli.js install
272aa58 @othiym23 test: more thorough tests for npm
othiym23 authored
162 cd deps/npm ; npm_config_cache="$(shell pwd)/npm-cache" \
163 npm_config_prefix="$(shell pwd)/npm-prefix" \
164 npm_config_tmp="$(shell pwd)/npm-tmp" \
dbda13a @mhdawson test: Fix test-npm Makefile target for npm 2.8.4
mhdawson authored
165 PATH="../../:${PATH}" node cli.js run-script test-legacy && \
166 PATH="../../:${PATH}" node cli.js run-script test && \
03b4f44 @misterdjules test: make test-npm uses custom node, not global
misterdjules authored
167 PATH="../../:${PATH}" node cli.js prune --prod && \
272aa58 @othiym23 test: more thorough tests for npm
othiym23 authored
168 cd ../.. && \
169 rm -rf npm-cache npm-tmp npm-prefix
d75de86 @isaacs add 'make test-npm'
isaacs authored
170
f7f8af8 @ry Merge remote branch 'origin/v0.6'
ry authored
171 test-npm-publish: node
d75de86 @isaacs add 'make test-npm'
isaacs authored
172 npm_package_config_publishtest=true ./node deps/npm/test/run.js
15286c8 @ry Start 'make test-uv' command
ry authored
173
1442c1c @indutny addons: build and test examples
indutny authored
174 test-addons: test-build
175 $(PYTHON) tools/test.py --mode=release addons
176
befbbad @misterdjules timers: backport f8193ab
misterdjules authored
177 test-timers:
178 $(MAKE) --directory=tools faketime
179 $(PYTHON) tools/test.py --mode=release timers
180
181 test-timers-clean:
182 $(MAKE) --directory=tools clean
183
ade8cf9 @miksago Build API page into build/doc; simplify doctool.
miksago authored
184 apidoc_sources = $(wildcard doc/api/*.markdown)
7d6d5e2 @isaacs Use new doc generation tool
isaacs authored
185 apidocs = $(addprefix out/,$(apidoc_sources:.markdown=.html)) \
186 $(addprefix out/,$(apidoc_sources:.markdown=.json))
ade8cf9 @miksago Build API page into build/doc; simplify doctool.
miksago authored
187
37376de @tjfontaine website: move website to joyent/node-website
tjfontaine authored
188 apidoc_dirs = out/doc out/doc/api/ out/doc/api/assets
2392775 @ry Fix make doc
ry authored
189
a7300c8 @ry WAF builds in out/ instead of build/
ry authored
190 apiassets = $(subst api_assets,api/assets,$(addprefix out/,$(wildcard doc/api_assets/*)))
320e002 @ry fix 'make doc'
ry authored
191
90d1e47 @ry make doc improvements
ry authored
192 website_files = \
a7300c8 @ry WAF builds in out/ instead of build/
ry authored
193 out/doc/sh_main.js \
37376de @tjfontaine website: move website to joyent/node-website
tjfontaine authored
194 out/doc/sh_javascript.min.js
195
af69f88 @tjfontaine build: make sure changelog.html is generated
tjfontaine authored
196 doc: $(apidoc_dirs) $(website_files) $(apiassets) $(apidocs) tools/doc/ out/doc/changelog.html node
320e002 @ry fix 'make doc'
ry authored
197
641cea0 @tjfontaine doc: build branch versioned docs
tjfontaine authored
198 doc-branch: NODE_DOC_VERSION = v$(shell $(PYTHON) tools/getnodeversion.py | cut -f1,2 -d.)
199 doc-branch: doc
200
ade8cf9 @miksago Build API page into build/doc; simplify doctool.
miksago authored
201 $(apidoc_dirs):
202 mkdir -p $@
2392775 @ry Fix make doc
ry authored
203
a7300c8 @ry WAF builds in out/ instead of build/
ry authored
204 out/doc/api/assets/%: doc/api_assets/% out/doc/api/assets/
ade8cf9 @miksago Build API page into build/doc; simplify doctool.
miksago authored
205 cp $< $@
206
fecebe1 @isaacs build: Regenerate docs for tarball and releases
isaacs authored
207 out/doc/changelog.html: ChangeLog doc/changelog-head.html doc/changelog-foot.html tools/build-changelog.sh node
e066074 @isaacs Fix #3089 Build changelog.html for website
isaacs authored
208 bash tools/build-changelog.sh
209
a7300c8 @ry WAF builds in out/ instead of build/
ry authored
210 out/doc/%: doc/%
a7af84f @isaacs docs: Move images out of the dist tarball
isaacs authored
211 cp -r $< $@
90d1e47 @ry make doc improvements
ry authored
212
fecebe1 @isaacs build: Regenerate docs for tarball and releases
isaacs authored
213 out/doc/api/%.json: doc/api/%.markdown node
641cea0 @tjfontaine doc: build branch versioned docs
tjfontaine authored
214 NODE_DOC_VERSION=$(NODE_DOC_VERSION) out/Release/node tools/doc/generate.js --format=json $< > $@
7d6d5e2 @isaacs Use new doc generation tool
isaacs authored
215
fecebe1 @isaacs build: Regenerate docs for tarball and releases
isaacs authored
216 out/doc/api/%.html: doc/api/%.markdown node
641cea0 @tjfontaine doc: build branch versioned docs
tjfontaine authored
217 NODE_DOC_VERSION=$(NODE_DOC_VERSION) out/Release/node tools/doc/generate.js --format=html --template=doc/template.html $< > $@
ade8cf9 @miksago Build API page into build/doc; simplify doctool.
miksago authored
218
7abbda8 @isaacs Make rules for release blog post and email message
isaacs authored
219 email.md: ChangeLog tools/email-footer.md
8068f9b @isaacs Escape leading # signs in 'make email.md'
isaacs authored
220 bash tools/changelog-head.sh | sed 's|^\* #|* \\#|g' > $@
7abbda8 @isaacs Make rules for release blog post and email message
isaacs authored
221 cat tools/email-footer.md | sed -e 's|__VERSION__|'$(VERSION)'|g' >> $@
222
223 blog.html: email.md
3ba9519 @isaacs Makefile: minor nit
isaacs authored
224 cat $< | ./node tools/doc/node_modules/.bin/marked > $@
7abbda8 @isaacs Make rules for release blog post and email message
isaacs authored
225
861f28f @ry Don't unnecessarily output the makefile from the configure script.
ry authored
226 website-upload: doc
ee73132 @ry use rsync instead of scp to upload website
ry authored
227 rsync -r out/doc/ node@nodejs.org:~/web/nodejs.org/
066789a @isaacs Fix #3001 website update 'latest' links on publish
isaacs authored
228 ssh node@nodejs.org '\
229 rm -f ~/web/nodejs.org/dist/latest &&\
230 ln -s $(VERSION) ~/web/nodejs.org/dist/latest &&\
231 rm -f ~/web/nodejs.org/docs/latest &&\
232 ln -s $(VERSION) ~/web/nodejs.org/docs/latest &&\
233 rm -f ~/web/nodejs.org/dist/node-latest.tar.gz &&\
234 ln -s $(VERSION)/node-$(VERSION).tar.gz ~/web/nodejs.org/dist/node-latest.tar.gz'
ade8cf9 @miksago Build API page into build/doc; simplify doctool.
miksago authored
235
641cea0 @tjfontaine doc: build branch versioned docs
tjfontaine authored
236 doc-branch-upload: NODE_DOC_VERSION = v$(shell $(PYTHON) tools/getnodeversion.py | cut -f1,2 -d.)
237 doc-branch-upload: doc-branch
238 echo $(NODE_DOC_VERSION)
b259f24 @tjfontaine docs: update api location
tjfontaine authored
239 rsync -r out/doc/api/ node@nodejs.org:~/web/nodejs.org/$(NODE_DOC_VERSION)
641cea0 @tjfontaine doc: build branch versioned docs
tjfontaine authored
240
a7300c8 @ry WAF builds in out/ instead of build/
ry authored
241 docopen: out/doc/api/all.html
242 -google-chrome out/doc/api/all.html
861f28f @ry Don't unnecessarily output the makefile from the configure script.
ry authored
243
2c016ba @ry 'make distclean' should not call 'waf clean'
ry authored
244 docclean:
a7300c8 @ry WAF builds in out/ instead of build/
ry authored
245 -rm -rf out/doc
2c016ba @ry 'make distclean' should not call 'waf clean'
ry authored
246
1083fa7 @orangemocha build: run-ci makefile rule
orangemocha authored
247 run-ci:
248 $(PYTHON) ./configure --without-snapshot $(CONFIG_FLAGS)
249 $(MAKE)
250 $(MAKE) test-ci
251
f1b878c @tjfontaine build: add pkgsrc rule
tjfontaine authored
252 RAWVER=$(shell $(PYTHON) tools/getnodeversion.py)
253 VERSION=v$(RAWVER)
641cea0 @tjfontaine doc: build branch versioned docs
tjfontaine authored
254 NODE_DOC_VERSION=$(VERSION)
64ac54a @TooTallNate Makefile: add a better check to ensure a node "release"
TooTallNate authored
255 RELEASE=$(shell $(PYTHON) tools/getnodeisrelease.py)
42aac41 @TooTallNate Makefile: add target for precompiled binary tarballs
TooTallNate authored
256 PLATFORM=$(shell uname | tr '[:upper:]' '[:lower:]')
64ac54a @TooTallNate Makefile: add a better check to ensure a node "release"
TooTallNate authored
257 ifeq ($(findstring x86_64,$(shell uname -m)),x86_64)
258 DESTCPU ?= x64
8b11f29 @TooTallNate Makefile: properly set the ARCH variable when forcing a DESTCPU
TooTallNate authored
259 else
64ac54a @TooTallNate Makefile: add a better check to ensure a node "release"
TooTallNate authored
260 DESTCPU ?= ia32
8b11f29 @TooTallNate Makefile: properly set the ARCH variable when forcing a DESTCPU
TooTallNate authored
261 endif
64ac54a @TooTallNate Makefile: add a better check to ensure a node "release"
TooTallNate authored
262 ifeq ($(DESTCPU),x64)
263 ARCH=x64
264 else
0c9bee4 @adammw build: support ARM in makefile target 'binary'
adammw authored
265 ifeq ($(DESTCPU),arm)
266 ARCH=arm
267 else
64ac54a @TooTallNate Makefile: add a better check to ensure a node "release"
TooTallNate authored
268 ARCH=x86
8b11f29 @TooTallNate Makefile: properly set the ARCH variable when forcing a DESTCPU
TooTallNate authored
269 endif
0c9bee4 @adammw build: support ARM in makefile target 'binary'
adammw authored
270 endif
bf0d278 @ry Improve "make dist" remove generated doc from repo.
ry authored
271 TARNAME=node-$(VERSION)
f9ba9f7 @tjfontaine build: define nightly tag external to build system
tjfontaine authored
272 ifdef NIGHTLY
273 TAG = nightly-$(NIGHTLY)
8fe72a7 @tjfontaine build: automatically add tag for nightly builds
tjfontaine authored
274 TARNAME=node-$(VERSION)-$(TAG)
275 endif
317ba9f @ry Fix 'make dist'
ry authored
276 TARBALL=$(TARNAME).tar.gz
42aac41 @TooTallNate Makefile: add target for precompiled binary tarballs
TooTallNate authored
277 BINARYNAME=$(TARNAME)-$(PLATFORM)-$(ARCH)
278 BINARYTAR=$(BINARYNAME).tar.gz
317ba9f @ry Fix 'make dist'
ry authored
279 PKG=out/$(TARNAME).pkg
67f87a7 @misterdjules build: add small-icu support for binary packages
misterdjules authored
280 PACKAGEMAKER ?= /Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker
bf0d278 @ry Improve "make dist" remove generated doc from repo.
ry authored
281
f1b878c @tjfontaine build: add pkgsrc rule
tjfontaine authored
282 PKGSRC=nodejs-$(DESTCPU)-$(RAWVER).tgz
283 ifdef NIGHTLY
284 PKGSRC=nodejs-$(DESTCPU)-$(RAWVER)-$(TAG).tgz
285 endif
286
317ba9f @ry Fix 'make dist'
ry authored
287 dist: doc $(TARBALL) $(PKG)
5bc1809 @ry Add 'make dist-upload'
ry authored
288
9d1bdbc @ry Fixes #2084. Makeify tools/osx-dist.sh
ry authored
289 PKGDIR=out/dist-osx
290
dc81813 @TooTallNate Makefile: move the release verification logic into a `make release-on…
TooTallNate authored
291 release-only:
292 @if [ "$(shell git status --porcelain | egrep -v '^\?\? ')" = "" ]; then \
293 exit 0 ; \
294 else \
295 echo "" >&2 ; \
296 echo "The git repository is not clean." >&2 ; \
297 echo "Please commit changes before building release tarball." >&2 ; \
298 echo "" >&2 ; \
299 git status --porcelain | egrep -v '^\?\?' >&2 ; \
300 echo "" >&2 ; \
301 exit 1 ; \
302 fi
f9ba9f7 @tjfontaine build: define nightly tag external to build system
tjfontaine authored
303 @if [ "$(NIGHTLY)" != "" -o "$(RELEASE)" = "1" ]; then \
dc81813 @TooTallNate Makefile: move the release verification logic into a `make release-on…
TooTallNate authored
304 exit 0; \
305 else \
306 echo "" >&2 ; \
64ac54a @TooTallNate Makefile: add a better check to ensure a node "release"
TooTallNate authored
307 echo "#NODE_VERSION_IS_RELEASE is set to $(RELEASE)." >&2 ; \
dc81813 @TooTallNate Makefile: move the release verification logic into a `make release-on…
TooTallNate authored
308 echo "Did you remember to update src/node_version.cc?" >&2 ; \
309 echo "" >&2 ; \
310 exit 1 ; \
311 fi
312
9d1bdbc @ry Fixes #2084. Makeify tools/osx-dist.sh
ry authored
313 pkg: $(PKG)
314
dc81813 @TooTallNate Makefile: move the release verification logic into a `make release-on…
TooTallNate authored
315 $(PKG): release-only
e60b18b @TooTallNate Make a fat binary for the OS X `make pkg`.
TooTallNate authored
316 rm -rf $(PKGDIR)
317 rm -rf out/deps out/Release
67f87a7 @misterdjules build: add small-icu support for binary packages
misterdjules authored
318 $(PYTHON) ./configure --download=all --with-intl=small-icu \
319 --without-snapshot --dest-cpu=ia32 --tag=$(TAG)
5037f9a @tjfontaine build: only use DESTDIR instead of PREFIX for pkg
tjfontaine authored
320 $(MAKE) install V=$(V) DESTDIR=$(PKGDIR)/32
e60b18b @TooTallNate Make a fat binary for the OS X `make pkg`.
TooTallNate authored
321 rm -rf out/deps out/Release
67f87a7 @misterdjules build: add small-icu support for binary packages
misterdjules authored
322 $(PYTHON) ./configure --download=all --with-intl=small-icu \
323 --without-snapshot --dest-cpu=x64 --tag=$(TAG)
5037f9a @tjfontaine build: only use DESTDIR instead of PREFIX for pkg
tjfontaine authored
324 $(MAKE) install V=$(V) DESTDIR=$(PKGDIR)
5b6464f @tjfontaine build: use separate env vars for signing
tjfontaine authored
325 SIGN="$(APP_SIGN)" PKGDIR="$(PKGDIR)" bash tools/osx-codesign.sh
5037f9a @tjfontaine build: only use DESTDIR instead of PREFIX for pkg
tjfontaine authored
326 lipo $(PKGDIR)/32/usr/local/bin/node \
327 $(PKGDIR)/usr/local/bin/node \
328 -output $(PKGDIR)/usr/local/bin/node-universal \
e60b18b @TooTallNate Make a fat binary for the OS X `make pkg`.
TooTallNate authored
329 -create
5037f9a @tjfontaine build: only use DESTDIR instead of PREFIX for pkg
tjfontaine authored
330 mv $(PKGDIR)/usr/local/bin/node-universal $(PKGDIR)/usr/local/bin/node
e60b18b @TooTallNate Make a fat binary for the OS X `make pkg`.
TooTallNate authored
331 rm -rf $(PKGDIR)/32
67f87a7 @misterdjules build: add small-icu support for binary packages
misterdjules authored
332 $(PACKAGEMAKER) \
2dd710e @isaacs build: Sign pkg installer for OS X
isaacs authored
333 --id "org.nodejs.Node" \
9d1bdbc @ry Fixes #2084. Makeify tools/osx-dist.sh
ry authored
334 --doc tools/osx-pkg.pmdoc \
335 --out $(PKG)
5b6464f @tjfontaine build: use separate env vars for signing
tjfontaine authored
336 SIGN="$(INT_SIGN)" PKG="$(PKG)" bash tools/osx-productsign.sh
5bc1809 @ry Add 'make dist-upload'
ry authored
337
dc81813 @TooTallNate Makefile: move the release verification logic into a `make release-on…
TooTallNate authored
338 $(TARBALL): release-only node doc
a1138c6 @miksago Cleanup Makefile for JSLint, CPPLint
miksago authored
339 git archive --format=tar --prefix=$(TARNAME)/ HEAD | tar xf -
c45522d @isaacs build: Prevent duplication of doc/api folder
isaacs authored
340 mkdir -p $(TARNAME)/doc/api
bf0d278 @ry Improve "make dist" remove generated doc from repo.
ry authored
341 cp doc/node.1 $(TARNAME)/doc/node.1
c45522d @isaacs build: Prevent duplication of doc/api folder
isaacs authored
342 cp -r out/doc/api/* $(TARNAME)/doc/api/
ce2d5ad @ry Change the 'make dist' to remove v8 test dir
ry authored
343 rm -rf $(TARNAME)/deps/v8/test # too big
a7af84f @isaacs docs: Move images out of the dist tarball
isaacs authored
344 rm -rf $(TARNAME)/doc/images # too big
76f6a4a @isaacs Remove dep symlinks from tarball
isaacs authored
345 find $(TARNAME)/ -type l | xargs rm # annoying on windows
ce2d5ad @ry Change the 'make dist' to remove v8 test dir
ry authored
346 tar -cf $(TARNAME).tar $(TARNAME)
347 rm -rf $(TARNAME)
bf0d278 @ry Improve "make dist" remove generated doc from repo.
ry authored
348 gzip -f -9 $(TARNAME).tar
861f28f @ry Don't unnecessarily output the makefile from the configure script.
ry authored
349
bd10bf4 @TooTallNate Makefile: add `make tar` helper target
TooTallNate authored
350 tar: $(TARBALL)
351
dc81813 @TooTallNate Makefile: move the release verification logic into a `make release-on…
TooTallNate authored
352 $(BINARYTAR): release-only
42aac41 @TooTallNate Makefile: add target for precompiled binary tarballs
TooTallNate authored
353 rm -rf $(BINARYNAME)
354 rm -rf out/deps out/Release
67f87a7 @misterdjules build: add small-icu support for binary packages
misterdjules authored
355 $(PYTHON) ./configure --prefix=/ --download=all --with-intl=small-icu \
356 --without-snapshot --dest-cpu=$(DESTCPU) --tag=$(TAG) $(CONFIG_FLAGS)
42aac41 @TooTallNate Makefile: add target for precompiled binary tarballs
TooTallNate authored
357 $(MAKE) install DESTDIR=$(BINARYNAME) V=$(V) PORTABLE=1
358 cp README.md $(BINARYNAME)
359 cp LICENSE $(BINARYNAME)
360 cp ChangeLog $(BINARYNAME)
361 tar -cf $(BINARYNAME).tar $(BINARYNAME)
362 rm -rf $(BINARYNAME)
363 gzip -f -9 $(BINARYNAME).tar
364
eadc2ec @TooTallNate Makefile: add `make binary` helper target
TooTallNate authored
365 binary: $(BINARYTAR)
366
f1b878c @tjfontaine build: add pkgsrc rule
tjfontaine authored
367 $(PKGSRC): release-only
368 rm -rf dist out
67f87a7 @misterdjules build: add small-icu support for binary packages
misterdjules authored
369 $(PYTHON) configure --prefix=/ --without-snapshot --download=all \
370 --with-intl=small-icu --dest-cpu=$(DESTCPU) --tag=$(TAG) \
371 $(CONFIG_FLAGS)
f1b878c @tjfontaine build: add pkgsrc rule
tjfontaine authored
372 $(MAKE) install DESTDIR=dist
373 (cd dist; find * -type f | sort) > packlist
374 pkg_info -X pkg_install | \
375 egrep '^(MACHINE_ARCH|OPSYS|OS_VERSION|PKGTOOLS_VERSION)' > build-info
376 pkg_create -B build-info -c tools/pkgsrc/comment -d tools/pkgsrc/description \
377 -f packlist -I /opt/local -p dist -U $(PKGSRC)
378
379 pkgsrc: $(PKGSRC)
380
716f5bc @ry Add make dist-upload
ry authored
381 dist-upload: $(TARBALL) $(PKG)
382 ssh node@nodejs.org mkdir -p web/nodejs.org/dist/$(VERSION)
383 scp $(TARBALL) node@nodejs.org:~/web/nodejs.org/dist/$(VERSION)/$(TARBALL)
384 scp $(PKG) node@nodejs.org:~/web/nodejs.org/dist/$(VERSION)/$(TARNAME).pkg
385
ef08f0f @isaacs bench: Use wrk for http benchmarking
isaacs authored
386 wrkclean:
387 $(MAKE) -C tools/wrk/ clean
388 rm tools/wrk/wrk
389
e850cba @isaacs tools: Add wrk for benchmarking http servers
isaacs authored
390 wrk: tools/wrk/wrk
391 tools/wrk/wrk:
392 $(MAKE) -C tools/wrk/
393
0e59efd @isaacs make: Add benchmark make targets
isaacs authored
394 bench-net: all
395 @$(NODE) benchmark/common.js net
396
bd4d585 @isaacs bench: Add bench-crypto
isaacs authored
397 bench-crypto: all
398 @$(NODE) benchmark/common.js crypto
399
0e59efd @isaacs make: Add benchmark make targets
isaacs authored
400 bench-tls: all
401 @$(NODE) benchmark/common.js tls
402
ef08f0f @isaacs bench: Use wrk for http benchmarking
isaacs authored
403 bench-http: wrk all
0e59efd @isaacs make: Add benchmark make targets
isaacs authored
404 @$(NODE) benchmark/common.js http
405
406 bench-fs: all
407 @$(NODE) benchmark/common.js fs
408
409 bench-misc: all
410 @$(MAKE) -C benchmark/misc/function_call/
411 @$(NODE) benchmark/common.js misc
412
413 bench-array: all
414 @$(NODE) benchmark/common.js arrays
415
416 bench-buffer: all
417 @$(NODE) benchmark/common.js buffers
418
1eb6a92 @isaacs bench: Only run http,net,fs,tls by default
isaacs authored
419 bench-all: bench bench-misc bench-array bench-buffer
420
421 bench: bench-net bench-http bench-fs bench-tls
0e59efd @isaacs make: Add benchmark make targets
isaacs authored
422
423 bench-http-simple:
ff456b3 @ry Add 'make bench' script
ry authored
424 benchmark/http_simple_bench.sh
425
3cf4827 @ry Add idle connection test
ry authored
426 bench-idle:
427 ./node benchmark/idle_server.js &
428 sleep 1
429 ./node benchmark/idle_clients.js &
430
7fd3cb6 @isaacs Build: add jslintfix
isaacs authored
431 jslintfix:
432 PYTHONPATH=tools/closure_linter/ $(PYTHON) tools/closure_linter/closure_linter/fixjsstyle.py --strict --nojsdoc -r lib/ -r src/ --exclude_files lib/punycode.js
433
ac58d3a @ry Import cpplint.py
ry authored
434 jslint:
605927f @isaacs Fix test/ jslint failures (by not linting tests)
isaacs authored
435 PYTHONPATH=tools/closure_linter/ $(PYTHON) tools/closure_linter/closure_linter/gjslint.py --unix_mode --strict --nojsdoc -r lib/ -r src/ --exclude_files lib/punycode.js
3cf4827 @ry Add idle connection test
ry authored
436
ccf8f3e @indutny make: add `cpplint` to `test` target
indutny authored
437 CPPLINT_EXCLUDE ?=
a622bde @bnoordhuis cpplint: exclude src/node_win32_perfctr_provider.cc
bnoordhuis authored
438 CPPLINT_EXCLUDE += src/node_root_certs.h
439 CPPLINT_EXCLUDE += src/node_win32_perfctr_provider.cc
ccf8f3e @indutny make: add `cpplint` to `test` target
indutny authored
440 CPPLINT_EXCLUDE += src/queue.h
a622bde @bnoordhuis cpplint: exclude src/node_win32_perfctr_provider.cc
bnoordhuis authored
441 CPPLINT_EXCLUDE += src/tree.h
ccf8f3e @indutny make: add `cpplint` to `test` target
indutny authored
442 CPPLINT_EXCLUDE += src/v8abbr.h
443
7a0cfe9 @indutny deps: re-implement debugger-agent
indutny authored
444 CPPLINT_FILES = $(filter-out $(CPPLINT_EXCLUDE), $(wildcard src/*.cc src/*.h src/*.c tools/icu/*.h tools/icu/*.cc deps/debugger-agent/include/* deps/debugger-agent/src/*))
ccf8f3e @indutny make: add `cpplint` to `test` target
indutny authored
445
ac58d3a @ry Import cpplint.py
ry authored
446 cpplint:
ccf8f3e @indutny make: add `cpplint` to `test` target
indutny authored
447 @$(PYTHON) tools/cpplint.py $(CPPLINT_FILES)
ac58d3a @ry Import cpplint.py
ry authored
448
449 lint: jslint cpplint
a128451 @ry Import Google's closure_linter
ry authored
450
1083fa7 @orangemocha build: run-ci makefile rule
orangemocha authored
451 .PHONY: lint cpplint jslint bench clean docopen docclean doc dist distclean \
452 check uninstall install install-includes install-bin all staticlib \
453 dynamiclib test test-all test-addons build-addons website-upload pkg \
454 blog blogclean tar binary release-only bench-http-simple bench-idle \
455 bench-all bench bench-misc bench-array bench-buffer bench-net \
456 bench-http bench-fs bench-tls run-ci
Something went wrong with that request. Please try again.