Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

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