Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 206 lines (151 sloc) 5.136 kB
472a72d @bnoordhuis build: honour the PYTHON environment variable
bnoordhuis authored
1 PYTHON ?= python
2 WAF = $(PYTHON) tools/waf-light
90ab079 @ry Use --jobs=1 with WAF
ry authored
3
8af0abd @ry prepare for release - website under new user
ry authored
4 web_root = node@nodejs.org:~/web/nodejs.org/
ade8cf9 @miksago Build API page into build/doc; simplify doctool.
miksago authored
5
7ea19d0 @rmustacc Use same make as when originally invoked
rmustacc authored
6 #
7 # Because we recursively call make from waf we need to make sure that we are
8 # using the correct make. Not all makes are GNU Make, but this likely only
9 # works with gnu make. To deal with this we remember how the user invoked us
10 # via a make builtin variable and use that in all subsequent operations
11 #
12 export NODE_MAKE := $(MAKE)
13
e5a0fbe @rsms Added support for cross compilation and also fixed DEST_CPU to repres…
rsms authored
14 all: program
a7300c8 @ry WAF builds in out/ instead of build/
ry authored
15 @-[ -f out/Release/node ] && ls -lh out/Release/node
861f28f @ry Don't unnecessarily output the makefile from the configure script.
ry authored
16
97c9745 @ry Back to WAF
ry authored
17 all-progress:
18 @$(WAF) -p build
861f28f @ry Don't unnecessarily output the makefile from the configure script.
ry authored
19
e5a0fbe @rsms Added support for cross compilation and also fixed DEST_CPU to repres…
rsms authored
20 program:
21 @$(WAF) --product-type=program build
22
23 staticlib:
24 @$(WAF) --product-type=cstaticlib build
25
26 dynamiclib:
27 @$(WAF) --product-type=cshlib build
28
97c9745 @ry Back to WAF
ry authored
29 install:
30 @$(WAF) install
bf0d278 @ry Improve "make dist" remove generated doc from repo.
ry authored
31
97c9745 @ry Back to WAF
ry authored
32 uninstall:
33 @$(WAF) uninstall
15594ea @ry Replace WAF with make/autoconf
ry authored
34
97c9745 @ry Back to WAF
ry authored
35 test: all
472a72d @bnoordhuis build: honour the PYTHON environment variable
bnoordhuis authored
36 $(PYTHON) tools/test.py --mode=release simple message
bf0d278 @ry Improve "make dist" remove generated doc from repo.
ry authored
37
38f948a @bnoordhuis http: make http2 the default, legacy backend is available with --use-…
bnoordhuis authored
38 test-http1: all
472a72d @bnoordhuis build: honour the PYTHON environment variable
bnoordhuis authored
39 $(PYTHON) tools/test.py --mode=release --use-http1 simple message
e1bb241 @bnoordhuis test: add targets `test-http2` and `test-all-http2`
bnoordhuis authored
40
d02131d @ry Add 'make test-valgrind'
ry authored
41 test-valgrind: all
472a72d @bnoordhuis build: honour the PYTHON environment variable
bnoordhuis authored
42 $(PYTHON) tools/test.py --mode=release --valgrind simple message
d02131d @ry Add 'make test-valgrind'
ry authored
43
97c9745 @ry Back to WAF
ry authored
44 test-all: all
472a72d @bnoordhuis build: honour the PYTHON environment variable
bnoordhuis authored
45 $(PYTHON) tools/test.py --mode=debug,release
d75de86 @isaacs add 'make test-npm'
isaacs authored
46 make test-npm
861f28f @ry Don't unnecessarily output the makefile from the configure script.
ry authored
47
38f948a @bnoordhuis http: make http2 the default, legacy backend is available with --use-…
bnoordhuis authored
48 test-all-http1: all
472a72d @bnoordhuis build: honour the PYTHON environment variable
bnoordhuis authored
49 $(PYTHON) tools/test.py --mode=debug,release --use-http1
e1bb241 @bnoordhuis test: add targets `test-http2` and `test-all-http2`
bnoordhuis authored
50
d02131d @ry Add 'make test-valgrind'
ry authored
51 test-all-valgrind: all
472a72d @bnoordhuis build: honour the PYTHON environment variable
bnoordhuis authored
52 $(PYTHON) tools/test.py --mode=debug,release --valgrind
d02131d @ry Add 'make test-valgrind'
ry authored
53
97c9745 @ry Back to WAF
ry authored
54 test-release: all
472a72d @bnoordhuis build: honour the PYTHON environment variable
bnoordhuis authored
55 $(PYTHON) tools/test.py --mode=release
6670154 @ry 'make test' only runs the simple test
ry authored
56
97c9745 @ry Back to WAF
ry authored
57 test-debug: all
472a72d @bnoordhuis build: honour the PYTHON environment variable
bnoordhuis authored
58 $(PYTHON) tools/test.py --mode=debug
861f28f @ry Don't unnecessarily output the makefile from the configure script.
ry authored
59
97c9745 @ry Back to WAF
ry authored
60 test-message: all
472a72d @bnoordhuis build: honour the PYTHON environment variable
bnoordhuis authored
61 $(PYTHON) tools/test.py message
125b868 @ry Add message tests
ry authored
62
97c9745 @ry Back to WAF
ry authored
63 test-simple: all
472a72d @bnoordhuis build: honour the PYTHON environment variable
bnoordhuis authored
64 $(PYTHON) tools/test.py simple
ade8cf9 @miksago Build API page into build/doc; simplify doctool.
miksago authored
65
97c9745 @ry Back to WAF
ry authored
66 test-pummel: all
472a72d @bnoordhuis build: honour the PYTHON environment variable
bnoordhuis authored
67 $(PYTHON) tools/test.py pummel
ade8cf9 @miksago Build API page into build/doc; simplify doctool.
miksago authored
68
97c9745 @ry Back to WAF
ry authored
69 test-internet: all
472a72d @bnoordhuis build: honour the PYTHON environment variable
bnoordhuis authored
70 $(PYTHON) tools/test.py internet
04fac19 @arlolra Split tests.
arlolra authored
71
d75de86 @isaacs add 'make test-npm'
isaacs authored
72 test-npm: all
73 ./node deps/npm/test/run.js
74
75 test-npm-publish: all
76 npm_package_config_publishtest=true ./node deps/npm/test/run.js
15286c8 @ry Start 'make test-uv' command
ry authored
77
a7300c8 @ry WAF builds in out/ instead of build/
ry authored
78 out/Release/node: all
ade8cf9 @miksago Build API page into build/doc; simplify doctool.
miksago authored
79
80 apidoc_sources = $(wildcard doc/api/*.markdown)
a7300c8 @ry WAF builds in out/ instead of build/
ry authored
81 apidocs = $(addprefix out/,$(apidoc_sources:.markdown=.html))
ade8cf9 @miksago Build API page into build/doc; simplify doctool.
miksago authored
82
ae17e2d @ry Fix doc generation for new website
ry authored
83 apidoc_dirs = out/doc out/doc/api/ out/doc/api/assets out/doc/about out/doc/community out/doc/logos
2392775 @ry Fix make doc
ry authored
84
a7300c8 @ry WAF builds in out/ instead of build/
ry authored
85 apiassets = $(subst api_assets,api/assets,$(addprefix out/,$(wildcard doc/api_assets/*)))
320e002 @ry fix 'make doc'
ry authored
86
90d1e47 @ry make doc improvements
ry authored
87 website_files = \
a7300c8 @ry WAF builds in out/ instead of build/
ry authored
88 out/doc/index.html \
89 out/doc/v0.4_announcement.html \
90 out/doc/cla.html \
91 out/doc/sh_main.js \
92 out/doc/sh_javascript.min.js \
93 out/doc/sh_vim-dark.css \
94 out/doc/logo.png \
95 out/doc/sponsored.png \
ae17e2d @ry Fix doc generation for new website
ry authored
96 out/doc/favicon.ico \
97 out/doc/pipe.css \
98 out/doc/about/index.html \
99 out/doc/close-downloads.png \
100 out/doc/community/index.html \
101 out/doc/community/not-invented-here.png \
102 out/doc/download-logo.png \
103 out/doc/ebay-logo.png \
104 out/doc/footer-logo.png \
105 out/doc/icons.png \
106 out/doc/linkedin-logo.png \
107 out/doc/logos/index.html \
108 out/doc/microsoft-logo.png \
109 out/doc/platform-icons.png \
110 out/doc/ryan-speaker.jpg \
111 out/doc/yahoo-logo.png
a7300c8 @ry WAF builds in out/ instead of build/
ry authored
112
ce3ccc8 @bnoordhuis build: fix circular dependency in doc target
bnoordhuis authored
113 doc docs: out/Release/node $(apidoc_dirs) $(website_files) $(apiassets) $(apidocs)
320e002 @ry fix 'make doc'
ry authored
114
ade8cf9 @miksago Build API page into build/doc; simplify doctool.
miksago authored
115 $(apidoc_dirs):
116 mkdir -p $@
2392775 @ry Fix make doc
ry authored
117
a7300c8 @ry WAF builds in out/ instead of build/
ry authored
118 out/doc/api/assets/%: doc/api_assets/% out/doc/api/assets/
ade8cf9 @miksago Build API page into build/doc; simplify doctool.
miksago authored
119 cp $< $@
120
a7300c8 @ry WAF builds in out/ instead of build/
ry authored
121 out/doc/%: doc/%
90d1e47 @ry make doc improvements
ry authored
122 cp $< $@
123
a7300c8 @ry WAF builds in out/ instead of build/
ry authored
124 out/doc/api/%.html: doc/api/%.markdown out/Release/node $(apidoc_dirs) $(apiassets) tools/doctool/doctool.js
125 out/Release/node tools/doctool/doctool.js doc/template.html $< > $@
ade8cf9 @miksago Build API page into build/doc; simplify doctool.
miksago authored
126
a7300c8 @ry WAF builds in out/ instead of build/
ry authored
127 out/doc/%:
2392775 @ry Fix make doc
ry authored
128
861f28f @ry Don't unnecessarily output the makefile from the configure script.
ry authored
129 website-upload: doc
ee73132 @ry use rsync instead of scp to upload website
ry authored
130 rsync -r out/doc/ node@nodejs.org:~/web/nodejs.org/
ade8cf9 @miksago Build API page into build/doc; simplify doctool.
miksago authored
131
a7300c8 @ry WAF builds in out/ instead of build/
ry authored
132 docopen: out/doc/api/all.html
133 -google-chrome out/doc/api/all.html
861f28f @ry Don't unnecessarily output the makefile from the configure script.
ry authored
134
2c016ba @ry 'make distclean' should not call 'waf clean'
ry authored
135 docclean:
a7300c8 @ry WAF builds in out/ instead of build/
ry authored
136 -rm -rf out/doc
2c016ba @ry 'make distclean' should not call 'waf clean'
ry authored
137
d67fdcc @ry clean should not docclean
ry authored
138 clean:
1dad95a @ry Print 'make clean' commands
ry authored
139 $(WAF) clean
140 -find tools -name "*.pyc" | xargs rm -f
861f28f @ry Don't unnecessarily output the makefile from the configure script.
ry authored
141
ff64094 @ry Make 'make distclean' work on solaris
ry authored
142 distclean: docclean
1dad95a @ry Print 'make clean' commands
ry authored
143 -find tools -name "*.pyc" | xargs rm -f
dc39ab3 @ry Improve OSX installer
ry authored
144 -rm -rf dist-osx
a7300c8 @ry WAF builds in out/ instead of build/
ry authored
145 -rm -rf out/ node node_g
861f28f @ry Don't unnecessarily output the makefile from the configure script.
ry authored
146
97c9745 @ry Back to WAF
ry authored
147 check:
148 @tools/waf-light check
861f28f @ry Don't unnecessarily output the makefile from the configure script.
ry authored
149
472a72d @bnoordhuis build: honour the PYTHON environment variable
bnoordhuis authored
150 VERSION=v$(shell $(PYTHON) tools/getnodeversion.py)
bf0d278 @ry Improve "make dist" remove generated doc from repo.
ry authored
151 TARNAME=node-$(VERSION)
5bc1809 @ry Add 'make dist-upload'
ry authored
152 TARBALL=$(TARNAME).tar.gz
9d1bdbc @ry Fixes #2084. Makeify tools/osx-dist.sh
ry authored
153 PKG=out/$(TARNAME).pkg
154
155 packagemaker=/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker
bf0d278 @ry Improve "make dist" remove generated doc from repo.
ry authored
156
ade8cf9 @miksago Build API page into build/doc; simplify doctool.
miksago authored
157 #dist: doc/node.1 doc/api
5bc1809 @ry Add 'make dist-upload'
ry authored
158 dist: $(TARBALL) $(PKG)
159
9d1bdbc @ry Fixes #2084. Makeify tools/osx-dist.sh
ry authored
160 PKGDIR=out/dist-osx
161
162 pkg: $(PKG)
163
5bc1809 @ry Add 'make dist-upload'
ry authored
164 $(PKG):
9d1bdbc @ry Fixes #2084. Makeify tools/osx-dist.sh
ry authored
165 -rm -rf $(PKGDIR)
d84a6ba @isaacs Remove snapshot from Mac binary build
isaacs authored
166 $(WAF) configure --prefix=/usr/local --without-snapshot
167 DESTDIR=$(PKGDIR) $(WAF) install
9d1bdbc @ry Fixes #2084. Makeify tools/osx-dist.sh
ry authored
168 $(packagemaker) \
169 --id "org.nodejs.NodeJS-$(VERSION)" \
170 --doc tools/osx-pkg.pmdoc \
171 --out $(PKG)
5bc1809 @ry Add 'make dist-upload'
ry authored
172
173 $(TARBALL): out/doc
a1138c6 @miksago Cleanup Makefile for JSLint, CPPLint
miksago authored
174 git archive --format=tar --prefix=$(TARNAME)/ HEAD | tar xf -
bf0d278 @ry Improve "make dist" remove generated doc from repo.
ry authored
175 mkdir -p $(TARNAME)/doc
176 cp doc/node.1 $(TARNAME)/doc/node.1
a7300c8 @ry WAF builds in out/ instead of build/
ry authored
177 cp -r out/doc/api $(TARNAME)/doc/api
ce2d5ad @ry Change the 'make dist' to remove v8 test dir
ry authored
178 rm -rf $(TARNAME)/deps/v8/test # too big
a0198d0 @ry Remove logos from package
ry authored
179 rm -rf $(TARNAME)/doc/logos # too big
ce2d5ad @ry Change the 'make dist' to remove v8 test dir
ry authored
180 tar -cf $(TARNAME).tar $(TARNAME)
181 rm -rf $(TARNAME)
bf0d278 @ry Improve "make dist" remove generated doc from repo.
ry authored
182 gzip -f -9 $(TARNAME).tar
861f28f @ry Don't unnecessarily output the makefile from the configure script.
ry authored
183
5bc1809 @ry Add 'make dist-upload'
ry authored
184 dist-upload: $(TARBALL) $(PKG)
185 ssh node@nodejs.org mkdir -p web/nodejs.org/dist/$(VERSION)
186 scp $(TARBALL) node@nodejs.org:~/web/nodejs.org/dist/$(VERSION)/$(TARBALL)
187 scp $(PKG) node@nodejs.org:~/web/nodejs.org/dist/$(VERSION)/$(TARNAME).pkg
188
ff456b3 @ry Add 'make bench' script
ry authored
189 bench:
190 benchmark/http_simple_bench.sh
191
3cf4827 @ry Add idle connection test
ry authored
192 bench-idle:
193 ./node benchmark/idle_server.js &
194 sleep 1
195 ./node benchmark/idle_clients.js &
196
ac58d3a @ry Import cpplint.py
ry authored
197 jslint:
472a72d @bnoordhuis build: honour the PYTHON environment variable
bnoordhuis authored
198 PYTHONPATH=tools/closure_linter/ $(PYTHON) tools/closure_linter/closure_linter/gjslint.py --unix_mode --strict --nojsdoc -r lib/ -r src/ -r test/
3cf4827 @ry Add idle connection test
ry authored
199
ac58d3a @ry Import cpplint.py
ry authored
200 cpplint:
472a72d @bnoordhuis build: honour the PYTHON environment variable
bnoordhuis authored
201 @$(PYTHON) tools/cpplint.py $(wildcard src/*.cc src/*.h src/*.c)
ac58d3a @ry Import cpplint.py
ry authored
202
203 lint: jslint cpplint
a128451 @ry Import Google's closure_linter
ry authored
204
5bc1809 @ry Add 'make dist-upload'
ry authored
205 .PHONY: lint cpplint jslint bench clean docopen docclean doc dist distclean dist-upload check uninstall install all program staticlib dynamiclib test test-all website-upload
Something went wrong with that request. Please try again.