doc: fix bad merge on modules.markdown
[platform/upstream/nodejs.git] / Makefile
1 -include config.mk
2
3 BUILDTYPE ?= Release
4 PYTHON ?= python
5 DESTDIR ?=
6 SIGN ?=
7 PREFIX ?= /usr/local
8 STAGINGSERVER ?= node-www
9
10 OSTYPE := $(shell uname -s | tr '[A-Z]' '[a-z]')
11
12 # Determine EXEEXT
13 EXEEXT := $(shell $(PYTHON) -c \
14                 "import sys; print('.exe' if sys.platform == 'win32' else '')")
15
16 NODE ?= ./node$(EXEEXT)
17 NODE_EXE = node$(EXEEXT)
18 NODE_G_EXE = node_g$(EXEEXT)
19
20 # Flags for packaging.
21 BUILD_DOWNLOAD_FLAGS ?= --download=all
22 BUILD_INTL_FLAGS ?= --with-intl=small-icu
23 BUILD_RELEASE_FLAGS ?= $(BUILD_DOWNLOAD_FLAGS) $(BUILD_INTL_FLAGS)
24
25 # Default to verbose builds.
26 # To do quiet/pretty builds, run `make V=` to set V to an empty string,
27 # or set the V environment variable to an empty string.
28 V ?= 1
29
30 # BUILDTYPE=Debug builds both release and debug builds. If you want to compile
31 # just the debug build, run `make -C out BUILDTYPE=Debug` instead.
32 ifeq ($(BUILDTYPE),Release)
33 all: out/Makefile $(NODE_EXE)
34 else
35 all: out/Makefile $(NODE_EXE) $(NODE_G_EXE)
36 endif
37
38 # The .PHONY is needed to ensure that we recursively use the out/Makefile
39 # to check for changes.
40 .PHONY: $(NODE_EXE) $(NODE_G_EXE)
41
42 $(NODE_EXE): config.gypi out/Makefile
43         $(MAKE) -C out BUILDTYPE=Release V=$(V)
44         ln -fs out/Release/$(NODE_EXE) $@
45
46 $(NODE_G_EXE): config.gypi out/Makefile
47         $(MAKE) -C out BUILDTYPE=Debug V=$(V)
48         ln -fs out/Debug/$(NODE_EXE) $@
49
50 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
51         $(PYTHON) tools/gyp_node.py -f make
52
53 config.gypi: configure
54         if [ -f $@ ]; then
55                 $(error Stale $@, please re-run ./configure)
56         else
57                 $(error No $@, please run ./configure first)
58         fi
59
60 install: all
61         $(PYTHON) tools/install.py $@ '$(DESTDIR)' '$(PREFIX)'
62
63 uninstall:
64         $(PYTHON) tools/install.py $@ '$(DESTDIR)' '$(PREFIX)'
65
66 clean:
67         -rm -rf out/Makefile $(NODE_EXE) $(NODE_G_EXE) out/$(BUILDTYPE)/$(NODE_EXE)
68         @if [ -d out ]; then find out/ -name '*.o' -o -name '*.a' | xargs rm -rf; fi
69         -rm -rf node_modules
70
71 distclean:
72         -rm -rf out
73         -rm -f config.gypi icu_config.gypi
74         -rm -f config.mk
75         -rm -rf $(NODE_EXE) $(NODE_G_EXE)
76         -rm -rf node_modules
77         -rm -rf deps/icu
78         -rm -rf deps/icu4c*.tgz deps/icu4c*.zip deps/icu-tmp
79         -rm -f $(BINARYTAR).* $(TARBALL).*
80
81 check: test
82
83 cctest: all
84         @out/$(BUILDTYPE)/$@
85
86 test: | cctest  # Depends on 'all'.
87         $(PYTHON) tools/test.py --mode=release message parallel sequential -J
88         $(MAKE) jslint
89         $(MAKE) cpplint
90
91 test-parallel: all
92         $(PYTHON) tools/test.py --mode=release parallel -J
93
94 test-valgrind: all
95         $(PYTHON) tools/test.py --mode=release --valgrind sequential parallel message
96
97 test/gc/node_modules/weak/build/Release/weakref.node: $(NODE_EXE)
98         $(NODE) deps/npm/node_modules/node-gyp/bin/node-gyp rebuild \
99                 --directory="$(shell pwd)/test/gc/node_modules/weak" \
100                 --nodedir="$(shell pwd)"
101
102 # Implicitly depends on $(NODE_EXE), see the build-addons rule for rationale.
103 test/addons/.docbuildstamp: doc/api/addons.markdown
104         $(RM) -r test/addons/doc-*/
105         $(NODE) tools/doc/addon-verify.js
106         touch $@
107
108 ADDONS_BINDING_GYPS := \
109         $(filter-out test/addons/doc-*/binding.gyp, \
110                 $(wildcard test/addons/*/binding.gyp))
111
112 # Implicitly depends on $(NODE_EXE), see the build-addons rule for rationale.
113 test/addons/.buildstamp: $(ADDONS_BINDING_GYPS) | test/addons/.docbuildstamp
114         # Cannot use $(wildcard test/addons/*/) here, it's evaluated before
115         # embedded addons have been generated from the documentation.
116         for dirname in test/addons/*/; do \
117                 $(NODE) deps/npm/node_modules/node-gyp/bin/node-gyp rebuild \
118                         --directory="$$PWD/$$dirname" \
119                         --nodedir="$$PWD"; \
120         done
121         touch $@
122
123 # .buildstamp and .docbuildstamp need $(NODE_EXE) but cannot depend on it
124 # directly because it calls make recursively.  The parent make cannot know
125 # if the subprocess touched anything so it pessimistically assumes that
126 # .buildstamp and .docbuildstamp are out of date and need a rebuild.
127 # Just goes to show that recursive make really is harmful...
128 # TODO(bnoordhuis) Force rebuild after gyp or node-gyp update.
129 build-addons: $(NODE_EXE) test/addons/.buildstamp
130
131 test-gc: all test/gc/node_modules/weak/build/Release/weakref.node
132         $(PYTHON) tools/test.py --mode=release gc
133
134 test-build: | all build-addons
135
136 test-all: test-build test/gc/node_modules/weak/build/Release/weakref.node
137         $(PYTHON) tools/test.py --mode=debug,release
138
139 test-all-valgrind: test-build
140         $(PYTHON) tools/test.py --mode=debug,release --valgrind
141
142 test-ci: | build-addons
143         $(PYTHON) tools/test.py -p tap --logfile test.tap --mode=release \
144                 addons message parallel sequential
145
146 test-release: test-build
147         $(PYTHON) tools/test.py --mode=release
148
149 test-debug: test-build
150         $(PYTHON) tools/test.py --mode=debug
151
152 test-message: test-build
153         $(PYTHON) tools/test.py message
154
155 test-simple: | cctest  # Depends on 'all'.
156         $(PYTHON) tools/test.py parallel sequential
157
158 test-pummel: all
159         $(PYTHON) tools/test.py pummel
160
161 test-internet: all
162         $(PYTHON) tools/test.py internet
163
164 test-debugger: all
165         $(PYTHON) tools/test.py debugger
166
167 test-npm: $(NODE_EXE)
168         NODE=$(NODE) tools/test-npm.sh
169
170 test-npm-publish: $(NODE_EXE)
171         npm_package_config_publishtest=true $(NODE) deps/npm/test/run.js
172
173 test-addons: test-build
174         $(PYTHON) tools/test.py --mode=release addons
175
176 test-timers:
177         $(MAKE) --directory=tools faketime
178         $(PYTHON) tools/test.py --mode=release timers
179
180 test-timers-clean:
181         $(MAKE) --directory=tools clean
182
183 apidoc_sources = $(wildcard doc/api/*.markdown)
184 apidocs = $(addprefix out/,$(apidoc_sources:.markdown=.html)) \
185                 $(addprefix out/,$(apidoc_sources:.markdown=.json))
186
187 apidoc_dirs = out/doc out/doc/api/ out/doc/api/assets
188
189 apiassets = $(subst api_assets,api/assets,$(addprefix out/,$(wildcard doc/api_assets/*)))
190
191 doc: $(apidoc_dirs) $(apiassets) $(apidocs) tools/doc/ $(NODE_EXE)
192
193 $(apidoc_dirs):
194         mkdir -p $@
195
196 out/doc/api/assets/%: doc/api_assets/% out/doc/api/assets/
197         cp $< $@
198
199 out/doc/%: doc/%
200         cp -r $< $@
201
202 out/doc/api/%.json: doc/api/%.markdown $(NODE_EXE)
203         $(NODE) tools/doc/generate.js --format=json $< > $@
204
205 out/doc/api/%.html: doc/api/%.markdown $(NODE_EXE)
206         $(NODE) tools/doc/generate.js --format=html --template=doc/template.html $< > $@
207
208 docopen: out/doc/api/all.html
209         -google-chrome out/doc/api/all.html
210
211 docclean:
212         -rm -rf out/doc
213
214 run-ci:
215         $(PYTHON) ./configure $(CONFIG_FLAGS)
216         $(MAKE)
217         $(MAKE) test-ci
218
219 RAWVER=$(shell $(PYTHON) tools/getnodeversion.py)
220 VERSION=v$(RAWVER)
221
222 # For nightly builds, you must set DISTTYPE to "nightly", "next-nightly" or
223 # "custom". For the nightly and next-nightly case, you need to set DATESTRING
224 # and COMMIT in order to properly name the build.
225 # For the rc case you need to set CUSTOMTAG to an appropriate CUSTOMTAG number
226
227 ifndef DISTTYPE
228 DISTTYPE=release
229 endif
230 ifeq ($(DISTTYPE),release)
231 FULLVERSION=$(VERSION)
232 else # ifeq ($(DISTTYPE),release)
233 ifeq ($(DISTTYPE),custom)
234 ifndef CUSTOMTAG
235 $(error CUSTOMTAG is not set for DISTTYPE=custom)
236 endif # ifndef CUSTOMTAG
237 TAG=$(CUSTOMTAG)
238 else # ifeq ($(DISTTYPE),custom)
239 ifndef DATESTRING
240 $(error DATESTRING is not set for nightly)
241 endif # ifndef DATESTRING
242 ifndef COMMIT
243 $(error COMMIT is not set for nightly)
244 endif # ifndef COMMIT
245 ifneq ($(DISTTYPE),nightly)
246 ifneq ($(DISTTYPE),next-nightly)
247 $(error DISTTYPE is not release, custom, nightly or next-nightly)
248 endif # ifneq ($(DISTTYPE),next-nightly)
249 endif # ifneq ($(DISTTYPE),nightly)
250 TAG=$(DISTTYPE)$(DATESTRING)$(COMMIT)
251 endif # ifeq ($(DISTTYPE),custom)
252 FULLVERSION=$(VERSION)-$(TAG)
253 endif # ifeq ($(DISTTYPE),release)
254
255 DISTTYPEDIR ?= $(DISTTYPE)
256 RELEASE=$(shell sed -ne 's/\#define NODE_VERSION_IS_RELEASE \([01]\)/\1/p' src/node_version.h)
257 PLATFORM=$(shell uname | tr '[:upper:]' '[:lower:]')
258 NPMVERSION=v$(shell cat deps/npm/package.json | grep '"version"' | sed 's/^[^:]*: "\([^"]*\)",.*/\1/')
259
260 ifeq ($(findstring x86_64,$(shell uname -m)),x86_64)
261 DESTCPU ?= x64
262 else
263 DESTCPU ?= x86
264 endif
265 ifeq ($(DESTCPU),x64)
266 ARCH=x64
267 else
268 ifeq ($(DESTCPU),arm)
269 ARCH=arm
270 else
271 ifeq ($(DESTCPU),ppc64)
272 ARCH=ppc64
273 else
274 ifeq ($(DESTCPU),ppc)
275 ARCH=ppc
276 else
277 ARCH=x86
278 endif
279 endif
280 endif
281 endif
282
283 # enforce "x86" over "ia32" as the generally accepted way of referring to 32-bit intel
284 ifeq ($(ARCH),ia32)
285 override ARCH=x86
286 endif
287 ifeq ($(DESTCPU),ia32)
288 override DESTCPU=x86
289 endif
290
291 TARNAME=node-$(FULLVERSION)
292 TARBALL=$(TARNAME).tar
293 BINARYNAME=$(TARNAME)-$(PLATFORM)-$(ARCH)
294 BINARYTAR=$(BINARYNAME).tar
295 # OSX doesn't have xz installed by default, http://macpkg.sourceforge.net/
296 XZ=$(shell which xz > /dev/null 2>&1; echo $$?)
297 XZ_COMPRESSION ?= 9
298 PKG=$(TARNAME).pkg
299 PACKAGEMAKER ?= /Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker
300 PKGDIR=out/dist-osx
301
302 release-only:
303         @if [ "$(shell git status --porcelain | egrep -v '^\?\? ')" = "" ]; then \
304                 exit 0 ; \
305         else \
306                 echo "" >&2 ; \
307                 echo "The git repository is not clean." >&2 ; \
308                 echo "Please commit changes before building release tarball." >&2 ; \
309                 echo "" >&2 ; \
310                 git status --porcelain | egrep -v '^\?\?' >&2 ; \
311                 echo "" >&2 ; \
312                 exit 1 ; \
313         fi
314         @if [ "$(DISTTYPE)" != "release" -o "$(RELEASE)" = "1" ]; then \
315                 exit 0; \
316         else \
317                 echo "" >&2 ; \
318                 echo "#NODE_VERSION_IS_RELEASE is set to $(RELEASE)." >&2 ; \
319                 echo "Did you remember to update src/node_version.h?" >&2 ; \
320                 echo "" >&2 ; \
321                 exit 1 ; \
322         fi
323
324 $(PKG): release-only
325         rm -rf $(PKGDIR)
326         rm -rf out/deps out/Release
327         $(PYTHON) ./configure \
328                 --dest-cpu=x64 \
329                 --tag=$(TAG) \
330                 --release-urlbase=$(RELEASE_URLBASE) \
331                 $(CONFIG_FLAGS) $(BUILD_RELEASE_FLAGS)
332         $(MAKE) install V=$(V) DESTDIR=$(PKGDIR)
333         SIGN="$(CODESIGN_CERT)" PKGDIR="$(PKGDIR)" bash tools/osx-codesign.sh
334         cat tools/osx-pkg.pmdoc/index.xml.tmpl \
335                 | sed -E "s/\\{nodeversion\\}/$(FULLVERSION)/g" \
336                 | sed -E "s/\\{npmversion\\}/$(NPMVERSION)/g" \
337                 > tools/osx-pkg.pmdoc/index.xml
338         $(PACKAGEMAKER) \
339                 --id "org.node.pkg" \
340                 --doc tools/osx-pkg.pmdoc \
341                 --out $(PKG)
342         SIGN="$(PRODUCTSIGN_CERT)" PKG="$(PKG)" bash tools/osx-productsign.sh
343
344 pkg: $(PKG)
345
346 pkg-upload: pkg
347         ssh $(STAGINGSERVER) "mkdir -p staging/$(DISTTYPEDIR)/$(FULLVERSION)"
348         scp -p node-$(FULLVERSION).pkg $(STAGINGSERVER):staging/$(DISTTYPEDIR)/$(FULLVERSION)/node-$(FULLVERSION).pkg
349         ssh $(STAGINGSERVER) "touch staging/$(DISTTYPEDIR)/$(FULLVERSION)/node-$(FULLVERSION).pkg.done"
350
351 $(TARBALL): release-only $(NODE_EXE) doc
352         git checkout-index -a -f --prefix=$(TARNAME)/
353         mkdir -p $(TARNAME)/doc/api
354         cp doc/node.1 $(TARNAME)/doc/node.1
355         cp -r out/doc/api/* $(TARNAME)/doc/api/
356         rm -rf $(TARNAME)/deps/v8/{test,samples,tools/profviz} # too big
357         rm -rf $(TARNAME)/doc/images # too big
358         rm -rf $(TARNAME)/deps/uv/{docs,samples,test}
359         rm -rf $(TARNAME)/deps/openssl/{doc,demos,test}
360         rm -rf $(TARNAME)/deps/zlib/contrib # too big, unused
361         find $(TARNAME)/ -type l | xargs rm # annoying on windows
362         tar -cf $(TARNAME).tar $(TARNAME)
363         rm -rf $(TARNAME)
364         gzip -c -f -9 $(TARNAME).tar > $(TARNAME).tar.gz
365 ifeq ($(XZ), 0)
366         xz -c -f -$(XZ_COMPRESSION) $(TARNAME).tar > $(TARNAME).tar.xz
367 endif
368         rm $(TARNAME).tar
369
370 tar: $(TARBALL)
371
372 tar-upload: tar
373         ssh $(STAGINGSERVER) "mkdir -p staging/$(DISTTYPEDIR)/$(FULLVERSION)"
374         scp -p node-$(FULLVERSION).tar.gz $(STAGINGSERVER):staging/$(DISTTYPEDIR)/$(FULLVERSION)/node-$(FULLVERSION).tar.gz
375         ssh $(STAGINGSERVER) "touch staging/$(DISTTYPEDIR)/$(FULLVERSION)/node-$(FULLVERSION).tar.gz.done"
376 ifeq ($(XZ), 0)
377         scp -p node-$(FULLVERSION).tar.xz $(STAGINGSERVER):staging/$(DISTTYPEDIR)/$(FULLVERSION)/node-$(FULLVERSION).tar.xz
378         ssh $(STAGINGSERVER) "touch staging/$(DISTTYPEDIR)/$(FULLVERSION)/node-$(FULLVERSION).tar.xz.done"
379 endif
380
381 doc-upload: tar
382         ssh $(STAGINGSERVER) "mkdir -p staging/$(DISTTYPEDIR)/$(FULLVERSION)"
383         scp -r out/doc/ $(STAGINGSERVER):staging/$(DISTTYPEDIR)/$(FULLVERSION)/
384         ssh $(STAGINGSERVER) "touch staging/$(DISTTYPEDIR)/$(FULLVERSION)/doc.done"
385
386 $(TARBALL)-headers: config.gypi release-only
387         $(PYTHON) ./configure \
388                 --prefix=/ \
389                 --dest-cpu=$(DESTCPU) \
390                 --tag=$(TAG) \
391                 --release-urlbase=$(RELEASE_URLBASE) \
392                 $(CONFIG_FLAGS) $(BUILD_RELEASE_FLAGS)
393         HEADERS_ONLY=1 $(PYTHON) tools/install.py install '$(TARNAME)' '/'
394         find $(TARNAME)/ -type l | xargs rm # annoying on windows
395         tar -cf $(TARNAME)-headers.tar $(TARNAME)
396         rm -rf $(TARNAME)
397         gzip -c -f -9 $(TARNAME)-headers.tar > $(TARNAME)-headers.tar.gz
398 ifeq ($(XZ), 0)
399         xz -c -f -$(XZ_COMPRESSION) $(TARNAME)-headers.tar > $(TARNAME)-headers.tar.xz
400 endif
401         rm $(TARNAME)-headers.tar
402
403 tar-headers: $(TARBALL)-headers
404
405 tar-headers-upload: tar-headers
406         ssh $(STAGINGSERVER) "mkdir -p staging/$(DISTTYPEDIR)/$(FULLVERSION)"
407         scp -p $(TARNAME)-headers.tar.gz $(STAGINGSERVER):staging/$(DISTTYPEDIR)/$(FULLVERSION)/$(TARNAME)-headers.tar.gz
408         ssh $(STAGINGSERVER) "touch staging/$(DISTTYPEDIR)/$(FULLVERSION)/$(TARNAME)-headers.tar.gz.done"
409 ifeq ($(XZ), 0)
410         scp -p $(TARNAME)-headers.tar.xz $(STAGINGSERVER):staging/$(DISTTYPEDIR)/$(FULLVERSION)/$(TARNAME)-headers.tar.xz
411         ssh $(STAGINGSERVER) "touch staging/$(DISTTYPEDIR)/$(FULLVERSION)/$(TARNAME)-headers.tar.xz.done"
412 endif
413
414 $(BINARYTAR): release-only
415         rm -rf $(BINARYNAME)
416         rm -rf out/deps out/Release
417         $(PYTHON) ./configure \
418                 --prefix=/ \
419                 --dest-cpu=$(DESTCPU) \
420                 --tag=$(TAG) \
421                 --release-urlbase=$(RELEASE_URLBASE) \
422                 $(CONFIG_FLAGS) $(BUILD_RELEASE_FLAGS)
423         $(MAKE) install DESTDIR=$(BINARYNAME) V=$(V) PORTABLE=1
424         cp README.md $(BINARYNAME)
425         cp LICENSE $(BINARYNAME)
426         cp CHANGELOG.md $(BINARYNAME)
427         tar -cf $(BINARYNAME).tar $(BINARYNAME)
428         rm -rf $(BINARYNAME)
429         gzip -c -f -9 $(BINARYNAME).tar > $(BINARYNAME).tar.gz
430 ifeq ($(XZ), 0)
431         xz -c -f -$(XZ_COMPRESSION) $(BINARYNAME).tar > $(BINARYNAME).tar.xz
432 endif
433         rm $(BINARYNAME).tar
434
435 binary: $(BINARYTAR)
436
437 binary-upload: binary
438         ssh $(STAGINGSERVER) "mkdir -p staging/$(DISTTYPEDIR)/$(FULLVERSION)"
439         scp -p node-$(FULLVERSION)-$(OSTYPE)-$(ARCH).tar.gz $(STAGINGSERVER):staging/$(DISTTYPEDIR)/$(FULLVERSION)/node-$(FULLVERSION)-$(OSTYPE)-$(ARCH).tar.gz
440         ssh $(STAGINGSERVER) "touch staging/$(DISTTYPEDIR)/$(FULLVERSION)/node-$(FULLVERSION)-$(OSTYPE)-$(ARCH).tar.gz.done"
441 ifeq ($(XZ), 0)
442         scp -p node-$(FULLVERSION)-$(OSTYPE)-$(ARCH).tar.xz $(STAGINGSERVER):staging/$(DISTTYPEDIR)/$(FULLVERSION)/node-$(FULLVERSION)-$(OSTYPE)-$(ARCH).tar.xz
443         ssh $(STAGINGSERVER) "touch staging/$(DISTTYPEDIR)/$(FULLVERSION)/node-$(FULLVERSION)-$(OSTYPE)-$(ARCH).tar.xz.done"
444 endif
445
446 haswrk=$(shell which wrk > /dev/null 2>&1; echo $$?)
447 wrk:
448 ifneq ($(haswrk), 0)
449         @echo "please install wrk before proceeding. More information can be found in benchmark/README.md." >&2
450         @exit 1
451 endif
452
453 bench-net: all
454         @$(NODE) benchmark/common.js net
455
456 bench-crypto: all
457         @$(NODE) benchmark/common.js crypto
458
459 bench-tls: all
460         @$(NODE) benchmark/common.js tls
461
462 bench-http: wrk all
463         @$(NODE) benchmark/common.js http
464
465 bench-fs: all
466         @$(NODE) benchmark/common.js fs
467
468 bench-misc: all
469         @$(MAKE) -C benchmark/misc/function_call/
470         @$(NODE) benchmark/common.js misc
471
472 bench-array: all
473         @$(NODE) benchmark/common.js arrays
474
475 bench-buffer: all
476         @$(NODE) benchmark/common.js buffers
477
478 bench-url: all
479         @$(NODE) benchmark/common.js url
480
481 bench-events: all
482         @$(NODE) benchmark/common.js events
483
484 bench-all: bench bench-misc bench-array bench-buffer bench-url bench-events
485
486 bench: bench-net bench-http bench-fs bench-tls
487
488 bench-http-simple:
489         benchmark/http_simple_bench.sh
490
491 bench-idle:
492         $(NODE) benchmark/idle_server.js &
493         sleep 1
494         $(NODE) benchmark/idle_clients.js &
495
496 jslint:
497         $(NODE) tools/eslint/bin/eslint.js src lib test --rulesdir tools/eslint-rules --reset --quiet
498
499 CPPLINT_EXCLUDE ?=
500 CPPLINT_EXCLUDE += src/node_lttng.cc
501 CPPLINT_EXCLUDE += src/node_root_certs.h
502 CPPLINT_EXCLUDE += src/node_lttng_tp.h
503 CPPLINT_EXCLUDE += src/node_win32_perfctr_provider.cc
504 CPPLINT_EXCLUDE += src/queue.h
505 CPPLINT_EXCLUDE += src/tree.h
506 CPPLINT_EXCLUDE += src/v8abbr.h
507 CPPLINT_EXCLUDE += $(wildcard test/addons/doc-*/*.cc test/addons/doc-*/*.h)
508
509 CPPLINT_FILES = $(filter-out $(CPPLINT_EXCLUDE), $(wildcard \
510         deps/debugger-agent/include/* \
511         deps/debugger-agent/src/* \
512         src/*.c \
513         src/*.cc \
514         src/*.h \
515         test/addons/*/*.cc \
516         test/addons/*/*.h \
517         tools/icu/*.cc \
518         tools/icu/*.h \
519         ))
520
521 cpplint:
522         @$(PYTHON) tools/cpplint.py $(CPPLINT_FILES)
523
524 lint: jslint cpplint
525
526 .PHONY: lint cpplint jslint bench clean docopen docclean doc dist distclean \
527         check uninstall install install-includes install-bin all staticlib \
528         dynamiclib test test-all test-addons build-addons website-upload pkg \
529         blog blogclean tar binary release-only bench-http-simple bench-idle \
530         bench-all bench bench-misc bench-array bench-buffer bench-net \
531         bench-http bench-fs bench-tls cctest run-ci