1 WAF=python tools/waf-light
3 web_root = node@nodejs.org:~/web/nodejs.org/
6 # Because we recursively call make from waf we need to make sure that we are
7 # using the correct make. Not all makes are GNU Make, but this likely only
8 # works with gnu make. To deal with this we remember how the user invoked us
9 # via a make builtin variable and use that in all subsequent operations
11 export NODE_MAKE := $(MAKE)
14 @-[ -f out/Release/node ] && ls -lh out/Release/node
20 @$(WAF) --product-type=program build
23 @$(WAF) --product-type=cstaticlib build
26 @$(WAF) --product-type=cshlib build
35 python tools/test.py --mode=release simple message
38 python tools/test.py --mode=release --use-http1 simple message
41 python tools/test.py --mode=release --valgrind simple message
44 python tools/test.py --mode=debug,release
47 python tools/test.py --mode=debug,release --use-http1
49 test-all-valgrind: all
50 python tools/test.py --mode=debug,release --valgrind
53 python tools/test.py --mode=release
56 python tools/test.py --mode=debug
59 python tools/test.py message
62 python tools/test.py simple
65 python tools/test.py pummel
68 python tools/test.py internet
70 UVTEST += simple/test-assert
71 UVTEST += simple/test-buffer
72 UVTEST += simple/test-c-ares
73 UVTEST += simple/test-chdir
74 UVTEST += simple/test-delayed-require
75 UVTEST += simple/test-dgram-pingpong
76 UVTEST += simple/test-dgram-udp4
77 UVTEST += simple/test-eio-race2
78 UVTEST += simple/test-eio-race4
79 UVTEST += simple/test-event-emitter-add-listeners
80 UVTEST += simple/test-event-emitter-modify-in-emit
81 UVTEST += simple/test-event-emitter-num-args
82 UVTEST += simple/test-event-emitter-once
83 UVTEST += simple/test-event-emitter-remove-all-listeners
84 UVTEST += simple/test-event-emitter-remove-listeners
85 UVTEST += simple/test-exception-handler
86 UVTEST += simple/test-exception-handler2
87 UVTEST += simple/test-exception-handler
88 UVTEST += simple/test-executable-path
89 UVTEST += simple/test-file-read-noexist
90 UVTEST += simple/test-file-write-stream
91 UVTEST += simple/test-fs-fsync
92 UVTEST += simple/test-fs-open
93 UVTEST += simple/test-fs-readfile-empty
94 UVTEST += simple/test-fs-read-file-sync
95 UVTEST += simple/test-fs-read-file-sync-hostname
96 UVTEST += simple/test-fs-sir-writes-alot
97 UVTEST += simple/test-fs-write
98 UVTEST += simple/test-fs-write-buffer
99 UVTEST += simple/test-fs-write-file
100 UVTEST += simple/test-fs-write-file-buffer
101 UVTEST += simple/test-fs-write-stream
102 UVTEST += simple/test-fs-write-stream-end
103 UVTEST += simple/test-fs-write-sync
104 UVTEST += simple/test-global
105 UVTEST += simple/test-http
106 UVTEST += simple/test-http-1.0
107 UVTEST += simple/test-http-abort-client
108 UVTEST += simple/test-http-allow-req-after-204-res
109 UVTEST += simple/test-http-blank-header
110 UVTEST += simple/test-http-buffer-sanity
111 UVTEST += simple/test-http-cat
112 UVTEST += simple/test-http-chunked
113 UVTEST += simple/test-http-client-abort
114 UVTEST += simple/test-http-client-parse-error
115 UVTEST += simple/test-http-client-race
116 UVTEST += simple/test-http-client-race-2
117 UVTEST += simple/test-http-client-upload
118 UVTEST += simple/test-http-client-upload-buf
119 UVTEST += simple/test-http-contentLength0
120 UVTEST += simple/test-http-curl-chunk-problem
121 UVTEST += simple/test-http-default-encoding
122 UVTEST += simple/test-http-dns-fail
123 UVTEST += simple/test-http-dns-error
124 UVTEST += simple/test-http-eof-on-connect
125 UVTEST += simple/test-http-exceptions
126 UVTEST += simple/test-http-expect-continue
127 UVTEST += simple/test-http-extra-response
128 UVTEST += simple/test-http-head-request
129 UVTEST += simple/test-http-head-response-has-no-body
130 UVTEST += simple/test-http-keep-alive
131 UVTEST += simple/test-http-keep-alive-close-on-header
132 UVTEST += simple/test-http-malformed-request
133 UVTEST += simple/test-http-many-keep-alive-connections
134 UVTEST += simple/test-http-mutable-headers
135 UVTEST += simple/test-http-parser
136 UVTEST += simple/test-http-proxy
137 UVTEST += simple/test-http-request-end
138 UVTEST += simple/test-http-response-close
139 UVTEST += simple/test-http-response-readable
140 UVTEST += simple/test-http-unix-socket
141 UVTEST += simple/test-http-server
142 UVTEST += simple/test-http-server-multiheaders
143 UVTEST += simple/test-http-set-cookies
144 UVTEST += simple/test-http-set-timeout
145 UVTEST += simple/test-http-set-trailers
146 UVTEST += simple/test-http-upgrade-agent
147 UVTEST += simple/test-http-upgrade-client
148 UVTEST += simple/test-http-upgrade-client2
149 UVTEST += simple/test-http-upgrade-server
150 UVTEST += simple/test-http-upgrade-server2
151 UVTEST += simple/test-http-wget
152 UVTEST += simple/test-http-write-empty-string
153 UVTEST += simple/test-http-wget
154 UVTEST += simple/test-mkdir-rmdir
155 UVTEST += simple/test-net-binary
156 UVTEST += simple/test-net-pingpong
157 UVTEST += simple/test-net-can-reset-timeout
158 UVTEST += simple/test-net-connect-buffer
159 UVTEST += simple/test-net-connect-timeout
160 UVTEST += simple/test-net-create-connection
161 UVTEST += simple/test-net-eaddrinuse
162 UVTEST += simple/test-net-isip
163 UVTEST += simple/test-net-keepalive
164 UVTEST += simple/test-net-pingpong
165 UVTEST += simple/test-net-reconnect
166 UVTEST += simple/test-net-remote-address-port
167 UVTEST += simple/test-net-server-bind
168 UVTEST += simple/test-net-server-max-connections
169 UVTEST += simple/test-net-server-try-ports
170 UVTEST += simple/test-net-stream
171 UVTEST += simple/test-net-socket-timeout
172 UVTEST += simple/test-next-tick
173 UVTEST += simple/test-next-tick-doesnt-hang
174 UVTEST += simple/test-next-tick-errors
175 UVTEST += simple/test-next-tick-ordering
176 UVTEST += simple/test-next-tick-ordering2
177 UVTEST += simple/test-next-tick-starvation
178 UVTEST += simple/test-module-load-list
179 UVTEST += simple/test-path
180 UVTEST += simple/test-pipe-stream
181 UVTEST += simple/test-pipe-file-to-http
182 UVTEST += simple/test-process-env
183 UVTEST += simple/test-pump-file2tcp
184 UVTEST += simple/test-pump-file2tcp-noexist
185 UVTEST += simple/test-punycode
186 UVTEST += simple/test-querystring
187 UVTEST += simple/test-readdir
188 UVTEST += simple/test-readdouble
189 UVTEST += simple/test-readfloat
190 UVTEST += simple/test-readint
191 UVTEST += simple/test-readuint
192 UVTEST += simple/test-regress-GH-746
193 UVTEST += simple/test-regress-GH-819
194 UVTEST += simple/test-regress-GH-897
195 UVTEST += simple/test-regress-GH-1531
196 UVTEST += simple/test-regression-object-prototype
197 UVTEST += simple/test-repl
198 UVTEST += simple/test-require-cache
199 UVTEST += simple/test-require-cache-without-stat
200 UVTEST += simple/test-require-exceptions
201 UVTEST += simple/test-require-resolve
202 UVTEST += simple/test-script-context
203 UVTEST += simple/test-script-new
204 UVTEST += simple/test-script-static-context
205 UVTEST += simple/test-script-static-new
206 UVTEST += simple/test-script-static-this
207 UVTEST += simple/test-script-this
208 UVTEST += simple/test-stream-pipe-cleanup
209 UVTEST += simple/test-stream-pipe-error-handling
210 UVTEST += simple/test-stream-pipe-event
211 UVTEST += simple/test-stream-pipe-multi
212 UVTEST += simple/test-string-decoder
213 UVTEST += simple/test-sys
214 UVTEST += simple/test-tcp-wrap
215 UVTEST += simple/test-tcp-wrap-connect
216 UVTEST += simple/test-tcp-wrap-listen
217 UVTEST += simple/test-timers-linked-list
218 UVTEST += simple/test-tty-stdout-end
219 UVTEST += simple/test-umask
220 UVTEST += simple/test-url
221 UVTEST += simple/test-utf8-scripts
222 UVTEST += simple/test-vm-create-context-circular-reference
223 UVTEST += simple/test-writedouble
224 UVTEST += simple/test-writefloat
225 UVTEST += simple/test-writeint
226 UVTEST += simple/test-writeuint
227 UVTEST += simple/test-zerolengthbufferbug
228 UVTEST += pummel/test-http-client-reconnect-bug
229 UVTEST += pummel/test-http-upload-timeout
230 UVTEST += pummel/test-net-many-clients
231 UVTEST += pummel/test-net-pause
232 UVTEST += pummel/test-net-pingpong-delay
233 UVTEST += pummel/test-net-timeout
234 UVTEST += pummel/test-timers
235 UVTEST += pummel/test-timer-wrap
236 UVTEST += pummel/test-timer-wrap2
237 UVTEST += pummel/test-vm-memleak
238 UVTEST += internet/test-dns
239 UVTEST += simple/test-tls-client-abort
240 UVTEST += simple/test-tls-client-verify
241 UVTEST += simple/test-tls-connect
242 #UVTEST += simple/test-tls-ext-key-usage # broken
243 UVTEST += simple/test-tls-junk-closes-server
244 UVTEST += simple/test-tls-npn-server-client
245 UVTEST += simple/test-tls-request-timeout
246 #UVTEST += simple/test-tls-securepair-client # broken
247 UVTEST += simple/test-tls-securepair-server
248 #UVTEST += simple/test-tls-server-verify # broken
249 UVTEST += simple/test-tls-set-encoding
252 UVTEST += simple/test-child-process-exit-code
253 UVTEST += simple/test-child-process-buffering
254 UVTEST += simple/test-child-process-exec-cwd
255 UVTEST += simple/test-child-process-cwd
256 UVTEST += simple/test-child-process-env
257 UVTEST += simple/test-child-process-stdin
258 UVTEST += simple/test-child-process-ipc
259 UVTEST += simple/test-child-process-deprecated-api
263 NODE_USE_UV=1 python tools/test.py --libuv simple
266 NODE_USE_UV=1 python tools/test.py --mode=debug simple
269 out/Release/node: all
271 apidoc_sources = $(wildcard doc/api/*.markdown)
272 apidocs = $(addprefix out/,$(apidoc_sources:.markdown=.html))
274 apidoc_dirs = out/doc out/doc/api/ out/doc/api/assets
276 apiassets = $(subst api_assets,api/assets,$(addprefix out/,$(wildcard doc/api_assets/*)))
280 out/doc/v0.4_announcement.html \
283 out/doc/sh_javascript.min.js \
284 out/doc/sh_vim-dark.css \
286 out/doc/sponsored.png \
287 out/doc/favicon.ico \
290 doc: out/Release/node $(apidoc_dirs) $(website_files) $(apiassets) $(apidocs)
295 out/doc/api/assets/%: doc/api_assets/% out/doc/api/assets/
301 out/doc/api/%.html: doc/api/%.markdown out/Release/node $(apidoc_dirs) $(apiassets) tools/doctool/doctool.js
302 out/Release/node tools/doctool/doctool.js doc/template.html $< > $@
307 scp -r out/doc/* $(web_root)
309 docopen: out/doc/api/all.html
310 -google-chrome out/doc/api/all.html
317 -find tools -name "*.pyc" | xargs rm -f
320 -find tools -name "*.pyc" | xargs rm -f
321 -rm -rf out/ node node_g
324 @tools/waf-light check
326 VERSION=$(shell git describe)
327 TARNAME=node-$(VERSION)
329 #dist: doc/node.1 doc/api
331 git archive --format=tar --prefix=$(TARNAME)/ HEAD | tar xf -
332 mkdir -p $(TARNAME)/doc
333 cp doc/node.1 $(TARNAME)/doc/node.1
334 cp -r out/doc/api $(TARNAME)/doc/api
335 rm -rf $(TARNAME)/deps/v8/test # too big
336 rm -rf $(TARNAME)/doc/logos # too big
337 tar -cf $(TARNAME).tar $(TARNAME)
339 gzip -f -9 $(TARNAME).tar
342 benchmark/http_simple_bench.sh
345 ./node benchmark/idle_server.js &
347 ./node benchmark/idle_clients.js &
350 PYTHONPATH=tools/closure_linter/ python tools/closure_linter/closure_linter/gjslint.py --unix_mode --strict --nojsdoc -r lib/ -r src/ -r test/
353 @python tools/cpplint.py $(wildcard src/*.cc src/*.h src/*.c)
357 .PHONY: lint cpplint jslint bench clean docopen docclean doc dist distclean check uninstall install all program staticlib dynamiclib test test-all website-upload