Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 215 lines (157 sloc) 5.593 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
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-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
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-htt...
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)
ffcdcc7 @isaacs Use new doc generation tool
isaacs authored
81 apidocs = $(addprefix out/,$(apidoc_sources:.markdown=.html)) \
82 $(addprefix out/,$(apidoc_sources:.markdown=.json))
ade8cf9 @miksago Build API page into build/doc; simplify doctool.
miksago authored
83
4051c28 @isaacs docs: Move images out of the dist tarball
isaacs authored
84 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
85
a7300c8 @ry WAF builds in out/ instead of build/
ry authored
86 apiassets = $(subst api_assets,api/assets,$(addprefix out/,$(wildcard doc/api_assets/*)))
320e002 @ry fix 'make doc'
ry authored
87
4051c28 @isaacs docs: Move images out of the dist tarball
isaacs authored
88 doc_images = $(addprefix out/,$(wildcard doc/images/* doc/*.jpg doc/*.png))
89
90d1e47 @ry make doc improvements
ry authored
90 website_files = \
a7300c8 @ry WAF builds in out/ instead of build/
ry authored
91 out/doc/index.html \
92 out/doc/v0.4_announcement.html \
93 out/doc/cla.html \
94 out/doc/sh_main.js \
95 out/doc/sh_javascript.min.js \
96 out/doc/sh_vim-dark.css \
5c0d11b @isaacs doc: Add images to makefile
isaacs authored
97 out/doc/sh.css \
ae17e2d @ry Fix doc generation for new website
ry authored
98 out/doc/favicon.ico \
99 out/doc/pipe.css \
100 out/doc/about/index.html \
101 out/doc/community/index.html \
5c0d11b @isaacs doc: Add images to makefile
isaacs authored
102 out/doc/logos/index.html \
4051c28 @isaacs docs: Move images out of the dist tarball
isaacs authored
103 $(doc_images)
a7300c8 @ry WAF builds in out/ instead of build/
ry authored
104
06bf070 @isaacs makefile: Fix 'make doc'
isaacs authored
105 doc: program $(apidoc_dirs) $(website_files) $(apiassets) $(apidocs) tools/doc/
320e002 @ry fix 'make doc'
ry authored
106
ade8cf9 @miksago Build API page into build/doc; simplify doctool.
miksago authored
107 $(apidoc_dirs):
108 mkdir -p $@
2392775 @ry Fix make doc
ry authored
109
a7300c8 @ry WAF builds in out/ instead of build/
ry authored
110 out/doc/api/assets/%: doc/api_assets/% out/doc/api/assets/
ade8cf9 @miksago Build API page into build/doc; simplify doctool.
miksago authored
111 cp $< $@
112
76f31fa @isaacs Remove hard-coded version number from docs
isaacs authored
113 out/doc/%.html: doc/%.html
114 cat $< | sed -e 's|__VERSION__|'$(VERSION)'|g' > $@
115
a7300c8 @ry WAF builds in out/ instead of build/
ry authored
116 out/doc/%: doc/%
4051c28 @isaacs docs: Move images out of the dist tarball
isaacs authored
117 cp -r $< $@
90d1e47 @ry make doc improvements
ry authored
118
ffcdcc7 @isaacs Use new doc generation tool
isaacs authored
119 out/doc/api/%.json: doc/api/%.markdown
120 out/Release/node tools/doc/generate.js --format=json $< > $@
121
122 out/doc/api/%.html: doc/api/%.markdown
123 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
124
a7300c8 @ry WAF builds in out/ instead of build/
ry authored
125 out/doc/%:
2392775 @ry Fix make doc
ry authored
126
861f28f @ry Don't unnecessarily output the makefile from the configure script.
ry authored
127 website-upload: doc
ee73132 @ry use rsync instead of scp to upload website
ry authored
128 rsync -r out/doc/ node@nodejs.org:~/web/nodejs.org/
ade8cf9 @miksago Build API page into build/doc; simplify doctool.
miksago authored
129
a7300c8 @ry WAF builds in out/ instead of build/
ry authored
130 docopen: out/doc/api/all.html
131 -google-chrome out/doc/api/all.html
861f28f @ry Don't unnecessarily output the makefile from the configure script.
ry authored
132
2c016ba @ry 'make distclean' should not call 'waf clean'
ry authored
133 docclean:
a7300c8 @ry WAF builds in out/ instead of build/
ry authored
134 -rm -rf out/doc
2c016ba @ry 'make distclean' should not call 'waf clean'
ry authored
135
d67fdcc @ry clean should not docclean
ry authored
136 clean:
1dad95a @ry Print 'make clean' commands
ry authored
137 $(WAF) clean
138 -find tools -name "*.pyc" | xargs rm -f
861f28f @ry Don't unnecessarily output the makefile from the configure script.
ry authored
139
ff64094 @ry Make 'make distclean' work on solaris
ry authored
140 distclean: docclean
1dad95a @ry Print 'make clean' commands
ry authored
141 -find tools -name "*.pyc" | xargs rm -f
dc39ab3 @ry Improve OSX installer
ry authored
142 -rm -rf dist-osx
a7300c8 @ry WAF builds in out/ instead of build/
ry authored
143 -rm -rf out/ node node_g
861f28f @ry Don't unnecessarily output the makefile from the configure script.
ry authored
144
97c9745 @ry Back to WAF
ry authored
145 check:
146 @tools/waf-light check
861f28f @ry Don't unnecessarily output the makefile from the configure script.
ry authored
147
472a72d @bnoordhuis build: honour the PYTHON environment variable
bnoordhuis authored
148 VERSION=v$(shell $(PYTHON) tools/getnodeversion.py)
bf0d278 @ry Improve "make dist" remove generated doc from repo.
ry authored
149 TARNAME=node-$(VERSION)
5bc1809 @ry Add 'make dist-upload'
ry authored
150 TARBALL=$(TARNAME).tar.gz
9d1bdbc @ry Fixes #2084. Makeify tools/osx-dist.sh
ry authored
151 PKG=out/$(TARNAME).pkg
152
153 packagemaker=/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker
bf0d278 @ry Improve "make dist" remove generated doc from repo.
ry authored
154
ade8cf9 @miksago Build API page into build/doc; simplify doctool.
miksago authored
155 #dist: doc/node.1 doc/api
5bc1809 @ry Add 'make dist-upload'
ry authored
156 dist: $(TARBALL) $(PKG)
157
9d1bdbc @ry Fixes #2084. Makeify tools/osx-dist.sh
ry authored
158 PKGDIR=out/dist-osx
159
160 pkg: $(PKG)
161
5bc1809 @ry Add 'make dist-upload'
ry authored
162 $(PKG):
9d1bdbc @ry Fixes #2084. Makeify tools/osx-dist.sh
ry authored
163 -rm -rf $(PKGDIR)
e004721 @isaacs Make a fat binary for the OS X pkg
isaacs authored
164 # Need to remove deps between architecture changes.
165 rm -rf out/*/deps
4672872 @isaacs Fix #2770 Compile the OS X pkg as ia32
isaacs authored
166 $(WAF) configure --prefix=/usr/local --without-snapshot --dest-cpu=ia32
e004721 @isaacs Make a fat binary for the OS X pkg
isaacs authored
167 CFLAGS=-m32 DESTDIR=$(PKGDIR)/32 $(WAF) install
168 rm -rf out/*/deps
169 $(WAF) configure --prefix=/usr/local --without-snapshot --dest-cpu=x64
170 CFLAGS=-m64 DESTDIR=$(PKGDIR) $(WAF) install
171 lipo $(PKGDIR)/32/usr/local/bin/node \
172 $(PKGDIR)/usr/local/bin/node \
173 -output $(PKGDIR)/usr/local/bin/node-universal \
174 -create
175 mv $(PKGDIR)/usr/local/bin/node-universal $(PKGDIR)/usr/local/bin/node
176 rm -rf $(PKGDIR)/32
9d1bdbc @ry Fixes #2084. Makeify tools/osx-dist.sh
ry authored
177 $(packagemaker) \
178 --id "org.nodejs.NodeJS-$(VERSION)" \
179 --doc tools/osx-pkg.pmdoc \
180 --out $(PKG)
5bc1809 @ry Add 'make dist-upload'
ry authored
181
182 $(TARBALL): out/doc
a1138c6 @miksago Cleanup Makefile for JSLint, CPPLint
miksago authored
183 git archive --format=tar --prefix=$(TARNAME)/ HEAD | tar xf -
bf0d278 @ry Improve "make dist" remove generated doc from repo.
ry authored
184 mkdir -p $(TARNAME)/doc
185 cp doc/node.1 $(TARNAME)/doc/node.1
a7300c8 @ry WAF builds in out/ instead of build/
ry authored
186 cp -r out/doc/api $(TARNAME)/doc/api
ce2d5ad @ry Change the 'make dist' to remove v8 test dir
ry authored
187 rm -rf $(TARNAME)/deps/v8/test # too big
4051c28 @isaacs docs: Move images out of the dist tarball
isaacs authored
188 rm -rf $(TARNAME)/doc/images # too big
ce2d5ad @ry Change the 'make dist' to remove v8 test dir
ry authored
189 tar -cf $(TARNAME).tar $(TARNAME)
190 rm -rf $(TARNAME)
bf0d278 @ry Improve "make dist" remove generated doc from repo.
ry authored
191 gzip -f -9 $(TARNAME).tar
861f28f @ry Don't unnecessarily output the makefile from the configure script.
ry authored
192
5bc1809 @ry Add 'make dist-upload'
ry authored
193 dist-upload: $(TARBALL) $(PKG)
194 ssh node@nodejs.org mkdir -p web/nodejs.org/dist/$(VERSION)
195 scp $(TARBALL) node@nodejs.org:~/web/nodejs.org/dist/$(VERSION)/$(TARBALL)
196 scp $(PKG) node@nodejs.org:~/web/nodejs.org/dist/$(VERSION)/$(TARNAME).pkg
197
ff456b3 @ry Add 'make bench' script
ry authored
198 bench:
199 benchmark/http_simple_bench.sh
200
3cf4827 @ry Add idle connection test
ry authored
201 bench-idle:
202 ./node benchmark/idle_server.js &
203 sleep 1
204 ./node benchmark/idle_clients.js &
205
ac58d3a @ry Import cpplint.py
ry authored
206 jslint:
b073989 @mmalecki makefile: ignore `lib/punycode.js` while linting
mmalecki authored
207 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
208
ac58d3a @ry Import cpplint.py
ry authored
209 cpplint:
472a72d @bnoordhuis build: honour the PYTHON environment variable
bnoordhuis authored
210 @$(PYTHON) tools/cpplint.py $(wildcard src/*.cc src/*.h src/*.c)
ac58d3a @ry Import cpplint.py
ry authored
211
212 lint: jslint cpplint
a128451 @ry Import Google's closure_linter
ry authored
213
5bc1809 @ry Add 'make dist-upload'
ry authored
214 .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.