Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 243 lines (181 sloc) 6.761 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
8cd2b0e @isaacs test: No need for weak in 'make test'
isaacs 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
91120e0 @isaacs Tests for memory leaks
isaacs authored
44 node_modules/weak:
45 @if [ ! -f node ]; then make all; fi
46 @if [ ! -d node_modules ]; then mkdir -p node_modules; fi
711ecdd @isaacs test: Run weak install with --unsafe-perm
isaacs authored
47 ./node deps/npm/bin/npm-cli.js install weak \
48 --prefix="$(shell pwd)" --unsafe-perm # go ahead and run as root.
91120e0 @isaacs Tests for memory leaks
isaacs authored
49
50 test-gc: all node_modules/weak
51 $(PYTHON) tools/test.py --mode=release gc
52
53 test-all: all node_modules/weak
472a72d @bnoordhuis build: honour the PYTHON environment variable
bnoordhuis authored
54 $(PYTHON) tools/test.py --mode=debug,release
d75de86 @isaacs add 'make test-npm'
isaacs authored
55 make test-npm
861f28f @ry Don't unnecessarily output the makefile from the configure script.
ry authored
56
38f948a @bnoordhuis http: make http2 the default, legacy backend is available with --use-…
bnoordhuis authored
57 test-all-http1: all
472a72d @bnoordhuis build: honour the PYTHON environment variable
bnoordhuis authored
58 $(PYTHON) tools/test.py --mode=debug,release --use-http1
e1bb241 @bnoordhuis test: add targets `test-http2` and `test-all-http2`
bnoordhuis authored
59
d02131d @ry Add 'make test-valgrind'
ry authored
60 test-all-valgrind: all
472a72d @bnoordhuis build: honour the PYTHON environment variable
bnoordhuis authored
61 $(PYTHON) tools/test.py --mode=debug,release --valgrind
d02131d @ry Add 'make test-valgrind'
ry authored
62
97c9745 @ry Back to WAF
ry authored
63 test-release: all
472a72d @bnoordhuis build: honour the PYTHON environment variable
bnoordhuis authored
64 $(PYTHON) tools/test.py --mode=release
6670154 @ry 'make test' only runs the simple test
ry authored
65
97c9745 @ry Back to WAF
ry authored
66 test-debug: all
472a72d @bnoordhuis build: honour the PYTHON environment variable
bnoordhuis authored
67 $(PYTHON) tools/test.py --mode=debug
861f28f @ry Don't unnecessarily output the makefile from the configure script.
ry authored
68
97c9745 @ry Back to WAF
ry authored
69 test-message: all
472a72d @bnoordhuis build: honour the PYTHON environment variable
bnoordhuis authored
70 $(PYTHON) tools/test.py message
125b868 @ry Add message tests
ry authored
71
97c9745 @ry Back to WAF
ry authored
72 test-simple: all
472a72d @bnoordhuis build: honour the PYTHON environment variable
bnoordhuis authored
73 $(PYTHON) tools/test.py simple
ade8cf9 @miksago Build API page into build/doc; simplify doctool.
miksago authored
74
97c9745 @ry Back to WAF
ry authored
75 test-pummel: all
472a72d @bnoordhuis build: honour the PYTHON environment variable
bnoordhuis authored
76 $(PYTHON) tools/test.py pummel
ade8cf9 @miksago Build API page into build/doc; simplify doctool.
miksago authored
77
97c9745 @ry Back to WAF
ry authored
78 test-internet: all
472a72d @bnoordhuis build: honour the PYTHON environment variable
bnoordhuis authored
79 $(PYTHON) tools/test.py internet
04fac19 @arlolra Split tests.
arlolra authored
80
d75de86 @isaacs add 'make test-npm'
isaacs authored
81 test-npm: all
82 ./node deps/npm/test/run.js
83
84 test-npm-publish: all
85 npm_package_config_publishtest=true ./node deps/npm/test/run.js
15286c8 @ry Start 'make test-uv' command
ry authored
86
a7300c8 @ry WAF builds in out/ instead of build/
ry authored
87 out/Release/node: all
ade8cf9 @miksago Build API page into build/doc; simplify doctool.
miksago authored
88
89 apidoc_sources = $(wildcard doc/api/*.markdown)
ffcdcc7 @isaacs Use new doc generation tool
isaacs authored
90 apidocs = $(addprefix out/,$(apidoc_sources:.markdown=.html)) \
91 $(addprefix out/,$(apidoc_sources:.markdown=.json))
ade8cf9 @miksago Build API page into build/doc; simplify doctool.
miksago authored
92
4051c28 @isaacs docs: Move images out of the dist tarball
isaacs authored
93 apidoc_dirs = out/doc out/doc/api/ out/doc/api/assets out/doc/about out/doc/community out/doc/logos out/doc/images
2392775 @ry Fix make doc
ry authored
94
a7300c8 @ry WAF builds in out/ instead of build/
ry authored
95 apiassets = $(subst api_assets,api/assets,$(addprefix out/,$(wildcard doc/api_assets/*)))
320e002 @ry fix 'make doc'
ry authored
96
4051c28 @isaacs docs: Move images out of the dist tarball
isaacs authored
97 doc_images = $(addprefix out/,$(wildcard doc/images/* doc/*.jpg doc/*.png))
98
90d1e47 @ry make doc improvements
ry authored
99 website_files = \
a7300c8 @ry WAF builds in out/ instead of build/
ry authored
100 out/doc/index.html \
101 out/doc/v0.4_announcement.html \
102 out/doc/cla.html \
103 out/doc/sh_main.js \
104 out/doc/sh_javascript.min.js \
105 out/doc/sh_vim-dark.css \
5c0d11b @isaacs doc: Add images to makefile
isaacs authored
106 out/doc/sh.css \
ae17e2d @ry Fix doc generation for new website
ry authored
107 out/doc/favicon.ico \
108 out/doc/pipe.css \
109 out/doc/about/index.html \
110 out/doc/community/index.html \
5c0d11b @isaacs doc: Add images to makefile
isaacs authored
111 out/doc/logos/index.html \
8b82abb @isaacs Fix #3089 Build changelog.html for website
isaacs authored
112 out/doc/changelog.html \
4051c28 @isaacs docs: Move images out of the dist tarball
isaacs authored
113 $(doc_images)
a7300c8 @ry WAF builds in out/ instead of build/
ry authored
114
06bf070 @isaacs makefile: Fix 'make doc'
isaacs authored
115 doc: program $(apidoc_dirs) $(website_files) $(apiassets) $(apidocs) tools/doc/
320e002 @ry fix 'make doc'
ry authored
116
ade8cf9 @miksago Build API page into build/doc; simplify doctool.
miksago authored
117 $(apidoc_dirs):
118 mkdir -p $@
2392775 @ry Fix make doc
ry authored
119
a7300c8 @ry WAF builds in out/ instead of build/
ry authored
120 out/doc/api/assets/%: doc/api_assets/% out/doc/api/assets/
ade8cf9 @miksago Build API page into build/doc; simplify doctool.
miksago authored
121 cp $< $@
122
8b82abb @isaacs Fix #3089 Build changelog.html for website
isaacs authored
123 out/doc/changelog.html: ChangeLog doc/changelog-head.html doc/changelog-foot.html tools/build-changelog.sh
124 bash tools/build-changelog.sh
125
76f31fa @isaacs Remove hard-coded version number from docs
isaacs authored
126 out/doc/%.html: doc/%.html
127 cat $< | sed -e 's|__VERSION__|'$(VERSION)'|g' > $@
128
a7300c8 @ry WAF builds in out/ instead of build/
ry authored
129 out/doc/%: doc/%
4051c28 @isaacs docs: Move images out of the dist tarball
isaacs authored
130 cp -r $< $@
90d1e47 @ry make doc improvements
ry authored
131
ffcdcc7 @isaacs Use new doc generation tool
isaacs authored
132 out/doc/api/%.json: doc/api/%.markdown
133 out/Release/node tools/doc/generate.js --format=json $< > $@
134
135 out/doc/api/%.html: doc/api/%.markdown
136 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
137
08e2e57 @isaacs Make rules for release blog post and email message
isaacs authored
138 email.md: ChangeLog tools/email-footer.md
8068f9b @isaacs Escape leading # signs in 'make email.md'
isaacs authored
139 bash tools/changelog-head.sh | sed 's|^\* #|* \\#|g' > $@
08e2e57 @isaacs Make rules for release blog post and email message
isaacs authored
140 cat tools/email-footer.md | sed -e 's|__VERSION__|'$(VERSION)'|g' >> $@
141
142 blog.html: email.md
d0365fd @isaacs Makefile: minor nit
isaacs authored
143 cat $< | ./node tools/doc/node_modules/.bin/marked > $@
2392775 @ry Fix make doc
ry authored
144
861f28f @ry Don't unnecessarily output the makefile from the configure script.
ry authored
145 website-upload: doc
ee73132 @ry use rsync instead of scp to upload website
ry authored
146 rsync -r out/doc/ node@nodejs.org:~/web/nodejs.org/
066789a @isaacs Fix #3001 website update 'latest' links on publish
isaacs authored
147 ssh node@nodejs.org '\
148 rm -f ~/web/nodejs.org/dist/latest &&\
149 ln -s $(VERSION) ~/web/nodejs.org/dist/latest &&\
150 rm -f ~/web/nodejs.org/docs/latest &&\
151 ln -s $(VERSION) ~/web/nodejs.org/docs/latest &&\
152 rm -f ~/web/nodejs.org/dist/node-latest.tar.gz &&\
153 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
154
a7300c8 @ry WAF builds in out/ instead of build/
ry authored
155 docopen: out/doc/api/all.html
156 -google-chrome out/doc/api/all.html
861f28f @ry Don't unnecessarily output the makefile from the configure script.
ry authored
157
2c016ba @ry 'make distclean' should not call 'waf clean'
ry authored
158 docclean:
a7300c8 @ry WAF builds in out/ instead of build/
ry authored
159 -rm -rf out/doc
2c016ba @ry 'make distclean' should not call 'waf clean'
ry authored
160
d67fdcc @ry clean should not docclean
ry authored
161 clean:
1dad95a @ry Print 'make clean' commands
ry authored
162 $(WAF) clean
163 -find tools -name "*.pyc" | xargs rm -f
08e2e57 @isaacs Make rules for release blog post and email message
isaacs authored
164 -rm -rf blog.html email.md
91120e0 @isaacs Tests for memory leaks
isaacs authored
165 -rm -rf node_modules
861f28f @ry Don't unnecessarily output the makefile from the configure script.
ry authored
166
ff64094 @ry Make 'make distclean' work on solaris
ry authored
167 distclean: docclean
1dad95a @ry Print 'make clean' commands
ry authored
168 -find tools -name "*.pyc" | xargs rm -f
dc39ab3 @ry Improve OSX installer
ry authored
169 -rm -rf dist-osx
a7300c8 @ry WAF builds in out/ instead of build/
ry authored
170 -rm -rf out/ node node_g
08e2e57 @isaacs Make rules for release blog post and email message
isaacs authored
171 -rm -rf blog.html email.md
861f28f @ry Don't unnecessarily output the makefile from the configure script.
ry authored
172
97c9745 @ry Back to WAF
ry authored
173 check:
174 @tools/waf-light check
861f28f @ry Don't unnecessarily output the makefile from the configure script.
ry authored
175
472a72d @bnoordhuis build: honour the PYTHON environment variable
bnoordhuis authored
176 VERSION=v$(shell $(PYTHON) tools/getnodeversion.py)
bf0d278 @ry Improve "make dist" remove generated doc from repo.
ry authored
177 TARNAME=node-$(VERSION)
5bc1809 @ry Add 'make dist-upload'
ry authored
178 TARBALL=$(TARNAME).tar.gz
9d1bdbc @ry Fixes #2084. Makeify tools/osx-dist.sh
ry authored
179 PKG=out/$(TARNAME).pkg
180
181 packagemaker=/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker
bf0d278 @ry Improve "make dist" remove generated doc from repo.
ry authored
182
ade8cf9 @miksago Build API page into build/doc; simplify doctool.
miksago authored
183 #dist: doc/node.1 doc/api
5bc1809 @ry Add 'make dist-upload'
ry authored
184 dist: $(TARBALL) $(PKG)
185
9d1bdbc @ry Fixes #2084. Makeify tools/osx-dist.sh
ry authored
186 PKGDIR=out/dist-osx
187
188 pkg: $(PKG)
189
5bc1809 @ry Add 'make dist-upload'
ry authored
190 $(PKG):
9d1bdbc @ry Fixes #2084. Makeify tools/osx-dist.sh
ry authored
191 -rm -rf $(PKGDIR)
e004721 @isaacs Make a fat binary for the OS X pkg
isaacs authored
192 # Need to remove deps between architecture changes.
193 rm -rf out/*/deps
4672872 @isaacs Fix #2770 Compile the OS X pkg as ia32
isaacs authored
194 $(WAF) configure --prefix=/usr/local --without-snapshot --dest-cpu=ia32
e004721 @isaacs Make a fat binary for the OS X pkg
isaacs authored
195 CFLAGS=-m32 DESTDIR=$(PKGDIR)/32 $(WAF) install
196 rm -rf out/*/deps
197 $(WAF) configure --prefix=/usr/local --without-snapshot --dest-cpu=x64
198 CFLAGS=-m64 DESTDIR=$(PKGDIR) $(WAF) install
199 lipo $(PKGDIR)/32/usr/local/bin/node \
200 $(PKGDIR)/usr/local/bin/node \
201 -output $(PKGDIR)/usr/local/bin/node-universal \
202 -create
203 mv $(PKGDIR)/usr/local/bin/node-universal $(PKGDIR)/usr/local/bin/node
204 rm -rf $(PKGDIR)/32
9d1bdbc @ry Fixes #2084. Makeify tools/osx-dist.sh
ry authored
205 $(packagemaker) \
206 --id "org.nodejs.NodeJS-$(VERSION)" \
207 --doc tools/osx-pkg.pmdoc \
208 --out $(PKG)
5bc1809 @ry Add 'make dist-upload'
ry authored
209
210 $(TARBALL): out/doc
a1138c6 @miksago Cleanup Makefile for JSLint, CPPLint
miksago authored
211 git archive --format=tar --prefix=$(TARNAME)/ HEAD | tar xf -
bf0d278 @ry Improve "make dist" remove generated doc from repo.
ry authored
212 mkdir -p $(TARNAME)/doc
213 cp doc/node.1 $(TARNAME)/doc/node.1
a7300c8 @ry WAF builds in out/ instead of build/
ry authored
214 cp -r out/doc/api $(TARNAME)/doc/api
ce2d5ad @ry Change the 'make dist' to remove v8 test dir
ry authored
215 rm -rf $(TARNAME)/deps/v8/test # too big
4051c28 @isaacs docs: Move images out of the dist tarball
isaacs authored
216 rm -rf $(TARNAME)/doc/images # too big
ce2d5ad @ry Change the 'make dist' to remove v8 test dir
ry authored
217 tar -cf $(TARNAME).tar $(TARNAME)
218 rm -rf $(TARNAME)
bf0d278 @ry Improve "make dist" remove generated doc from repo.
ry authored
219 gzip -f -9 $(TARNAME).tar
861f28f @ry Don't unnecessarily output the makefile from the configure script.
ry authored
220
5bc1809 @ry Add 'make dist-upload'
ry authored
221 dist-upload: $(TARBALL) $(PKG)
222 ssh node@nodejs.org mkdir -p web/nodejs.org/dist/$(VERSION)
223 scp $(TARBALL) node@nodejs.org:~/web/nodejs.org/dist/$(VERSION)/$(TARBALL)
224 scp $(PKG) node@nodejs.org:~/web/nodejs.org/dist/$(VERSION)/$(TARNAME).pkg
225
ff456b3 @ry Add 'make bench' script
ry authored
226 bench:
227 benchmark/http_simple_bench.sh
228
3cf4827 @ry Add idle connection test
ry authored
229 bench-idle:
230 ./node benchmark/idle_server.js &
231 sleep 1
232 ./node benchmark/idle_clients.js &
233
ac58d3a @ry Import cpplint.py
ry authored
234 jslint:
b073989 @mmalecki makefile: ignore `lib/punycode.js` while linting
mmalecki authored
235 PYTHONPATH=tools/closure_linter/ $(PYTHON) tools/closure_linter/closure_linter/gjslint.py --unix_mode --strict --nojsdoc -r lib/ -r src/ -r test/ --exclude_files lib/punycode.js
3cf4827 @ry Add idle connection test
ry authored
236
ac58d3a @ry Import cpplint.py
ry authored
237 cpplint:
472a72d @bnoordhuis build: honour the PYTHON environment variable
bnoordhuis authored
238 @$(PYTHON) tools/cpplint.py $(wildcard src/*.cc src/*.h src/*.c)
ac58d3a @ry Import cpplint.py
ry authored
239
240 lint: jslint cpplint
a128451 @ry Import Google's closure_linter
ry authored
241
5bc1809 @ry Add 'make dist-upload'
ry authored
242 .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.