Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 253 lines (193 sloc) 7.385 kb
e493b29 Ben Noordhuis build: respect --debug configure switch
bnoordhuis authored
1 -include config.mk
2
14b04b0 ry Remove SCONS deprecate WAF
ry authored
3 BUILDTYPE ?= Release
472a72d Ben Noordhuis build: honour the PYTHON environment variable
bnoordhuis authored
4 PYTHON ?= python
ea50ebd skenqbx build: support make install "DESTDIR=/path"
skenqbx authored
5 DESTDIR ?=
90ab079 ry Use --jobs=1 with WAF
ry authored
6
f89beaf Ben Noordhuis build: compile release build too if BUILDTYPE=Debug
bnoordhuis authored
7 # BUILDTYPE=Debug builds both release and debug builds. If you want to compile
8 # just the debug build, run `make -C out BUILDTYPE=Debug` instead.
10d92b3 ry saner targets
ry authored
9 ifeq ($(BUILDTYPE),Release)
10 all: out/Makefile node
11 else
f89beaf Ben Noordhuis build: compile release build too if BUILDTYPE=Debug
bnoordhuis authored
12 all: out/Makefile node node_g
10d92b3 ry saner targets
ry authored
13 endif
14
bb8f734 ry Fix make targets so they detect changes
ry authored
15 # The .PHONY is needed to ensure that we recursively use the out/Makefile
16 # to check for changes.
17 .PHONY: node node_g
10d92b3 ry saner targets
ry authored
18
21dd53f ry Makefile: Don't force user to run ./configure first
ry authored
19 node: config.gypi
10d92b3 ry saner targets
ry authored
20 $(MAKE) -C out BUILDTYPE=Release
bb8f734 ry Fix make targets so they detect changes
ry authored
21 ln -fs out/Release/node node
10d92b3 ry saner targets
ry authored
22
21dd53f ry Makefile: Don't force user to run ./configure first
ry authored
23 node_g: config.gypi
bb8f734 ry Fix make targets so they detect changes
ry authored
24 $(MAKE) -C out BUILDTYPE=Debug
25 ln -fs out/Debug/node node_g
ade8cf9 Micheil Smith Build API page into build/doc; simplify doctool.
miksago authored
26
21dd53f ry Makefile: Don't force user to run ./configure first
ry authored
27 config.gypi: configure
28 ./configure
29
10d92b3 ry saner targets
ry authored
30 out/Debug/node:
31 $(MAKE) -C out BUILDTYPE=Debug
e5a0fbe Rasmus Added support for cross compilation and also fixed DEST_CPU to represent...
rsms authored
32
624f70e ry GYP: rename options.gypi to config.gypi
ry authored
33 out/Makefile: common.gypi deps/uv/uv.gyp deps/http_parser/http_parser.gyp deps/zlib/zlib.gyp deps/v8/build/common.gypi deps/v8/tools/gyp/v8.gyp node.gyp config.gypi
eda1538 build: regenerate out/Makefile from within the main Makefile
eddy_me08@yahoo.com authored
34 tools/gyp_node -f make
e5a0fbe Rasmus Added support for cross compilation and also fixed DEST_CPU to represent...
rsms authored
35
be23c51 Fedor Indutny Implement make install
indutny authored
36 install: all
ea50ebd skenqbx build: support make install "DESTDIR=/path"
skenqbx authored
37 out/Release/node tools/installer.js install $(DESTDIR)
be23c51 Fedor Indutny Implement make install
indutny authored
38
39 uninstall:
7cb0f5f Nathan Rajlich install: update install.js to use `process.config`
TooTallNate authored
40 out/Release/node tools/installer.js uninstall
1db9a2a Ben Noordhuis build: print "not yet implemented" warning on `make install`
bnoordhuis authored
41
14b04b0 ry Remove SCONS deprecate WAF
ry authored
42 clean:
7abbda8 isaacs Make rules for release blog post and email message
isaacs authored
43 -rm -rf out/Makefile node node_g out/$(BUILDTYPE)/node blog.html email.md
02c1cb5 isaacs Makefile: Don't use ** in globs
isaacs authored
44 -find out/ -name '*.o' -o -name '*.a' | xargs rm -rf
e63c782 isaacs Tests for memory leaks
isaacs authored
45 -rm -rf node_modules
bf0d278 ry Improve "make dist" remove generated doc from repo.
ry authored
46
14b04b0 ry Remove SCONS deprecate WAF
ry authored
47 distclean:
48d21dd ry Force makefile generation in gyp
ry authored
48 -rm -rf out
0787287 Nathan Rajlich build: remove 'config.mk' during `make distclean`
TooTallNate authored
49 -rm -f config.gypi
50 -rm -f config.mk
7abbda8 isaacs Make rules for release blog post and email message
isaacs authored
51 -rm -rf node node_g blog.html email.md
e63c782 isaacs Tests for memory leaks
isaacs authored
52 -rm -rf node_modules
15594ea ry Replace WAF with make/autoconf
ry authored
53
eaf607e isaacs test: No need for weak in 'make test'
isaacs authored
54 test: all
472a72d Ben Noordhuis build: honour the PYTHON environment variable
bnoordhuis authored
55 $(PYTHON) tools/test.py --mode=release simple message
bae4018 isaacs Run jslint after tests, not before
isaacs authored
56 PYTHONPATH=tools/closure_linter/ $(PYTHON) tools/closure_linter/closure_linter/gjslint.py --unix_mode --strict --nojsdoc -r lib/ -r src/ --exclude_files lib/punycode.js
bf0d278 ry Improve "make dist" remove generated doc from repo.
ry authored
57
38f948a Ben Noordhuis http: make http2 the default, legacy backend is available with --use-htt...
bnoordhuis authored
58 test-http1: all
472a72d Ben Noordhuis build: honour the PYTHON environment variable
bnoordhuis authored
59 $(PYTHON) tools/test.py --mode=release --use-http1 simple message
e1bb241 Ben Noordhuis test: add targets `test-http2` and `test-all-http2`
bnoordhuis authored
60
d02131d ry Add 'make test-valgrind'
ry authored
61 test-valgrind: all
472a72d Ben Noordhuis build: honour the PYTHON environment variable
bnoordhuis authored
62 $(PYTHON) tools/test.py --mode=release --valgrind simple message
d02131d ry Add 'make test-valgrind'
ry authored
63
e63c782 isaacs Tests for memory leaks
isaacs authored
64 node_modules/weak:
65 @if [ ! -f node ]; then make all; fi
66 @if [ ! -d node_modules ]; then mkdir -p node_modules; fi
711ecdd isaacs test: Run weak install with --unsafe-perm
isaacs authored
67 ./node deps/npm/bin/npm-cli.js install weak \
c69d7f1 Nathan Rajlich test: make the node-weak install build agaist this repo
TooTallNate authored
68 --nodedir="$(shell pwd)" \
711ecdd isaacs test: Run weak install with --unsafe-perm
isaacs authored
69 --prefix="$(shell pwd)" --unsafe-perm # go ahead and run as root.
e63c782 isaacs Tests for memory leaks
isaacs authored
70
71 test-gc: all node_modules/weak
72 $(PYTHON) tools/test.py --mode=release gc
73
74 test-all: all node_modules/weak
75 $(PYTHON) tools/test.py --mode=debug,release
76 make test-npm
861f28f ry Don't unnecessarily output the makefile from the configure script.
ry authored
77
38f948a Ben Noordhuis http: make http2 the default, legacy backend is available with --use-htt...
bnoordhuis authored
78 test-all-http1: all
472a72d Ben Noordhuis build: honour the PYTHON environment variable
bnoordhuis authored
79 $(PYTHON) tools/test.py --mode=debug,release --use-http1
e1bb241 Ben Noordhuis test: add targets `test-http2` and `test-all-http2`
bnoordhuis authored
80
d02131d ry Add 'make test-valgrind'
ry authored
81 test-all-valgrind: all
472a72d Ben Noordhuis build: honour the PYTHON environment variable
bnoordhuis authored
82 $(PYTHON) tools/test.py --mode=debug,release --valgrind
d02131d ry Add 'make test-valgrind'
ry authored
83
97c9745 ry Back to WAF
ry authored
84 test-release: all
472a72d Ben Noordhuis build: honour the PYTHON environment variable
bnoordhuis authored
85 $(PYTHON) tools/test.py --mode=release
6670154 ry 'make test' only runs the simple test
ry authored
86
97c9745 ry Back to WAF
ry authored
87 test-debug: all
472a72d Ben Noordhuis build: honour the PYTHON environment variable
bnoordhuis authored
88 $(PYTHON) tools/test.py --mode=debug
861f28f ry Don't unnecessarily output the makefile from the configure script.
ry authored
89
97c9745 ry Back to WAF
ry authored
90 test-message: all
472a72d Ben Noordhuis build: honour the PYTHON environment variable
bnoordhuis authored
91 $(PYTHON) tools/test.py message
125b868 ry Add message tests
ry authored
92
97c9745 ry Back to WAF
ry authored
93 test-simple: all
472a72d Ben Noordhuis build: honour the PYTHON environment variable
bnoordhuis authored
94 $(PYTHON) tools/test.py simple
ade8cf9 Micheil Smith Build API page into build/doc; simplify doctool.
miksago authored
95
97c9745 ry Back to WAF
ry authored
96 test-pummel: all
472a72d Ben Noordhuis build: honour the PYTHON environment variable
bnoordhuis authored
97 $(PYTHON) tools/test.py pummel
ade8cf9 Micheil Smith Build API page into build/doc; simplify doctool.
miksago authored
98
97c9745 ry Back to WAF
ry authored
99 test-internet: all
472a72d Ben Noordhuis build: honour the PYTHON environment variable
bnoordhuis authored
100 $(PYTHON) tools/test.py internet
04fac19 Arlo Breault Split tests.
arlolra authored
101
f7f8af8 ry Merge remote branch 'origin/v0.6'
ry authored
102 test-npm: node
d75de86 isaacs add 'make test-npm'
isaacs authored
103 ./node deps/npm/test/run.js
104
f7f8af8 ry Merge remote branch 'origin/v0.6'
ry authored
105 test-npm-publish: node
d75de86 isaacs add 'make test-npm'
isaacs authored
106 npm_package_config_publishtest=true ./node deps/npm/test/run.js
15286c8 ry Start 'make test-uv' command
ry authored
107
ade8cf9 Micheil Smith Build API page into build/doc; simplify doctool.
miksago authored
108 apidoc_sources = $(wildcard doc/api/*.markdown)
7d6d5e2 isaacs Use new doc generation tool
isaacs authored
109 apidocs = $(addprefix out/,$(apidoc_sources:.markdown=.html)) \
110 $(addprefix out/,$(apidoc_sources:.markdown=.json))
ade8cf9 Micheil Smith Build API page into build/doc; simplify doctool.
miksago authored
111
a7af84f isaacs docs: Move images out of the dist tarball
isaacs authored
112 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
113
a7300c8 ry WAF builds in out/ instead of build/
ry authored
114 apiassets = $(subst api_assets,api/assets,$(addprefix out/,$(wildcard doc/api_assets/*)))
320e002 ry fix 'make doc'
ry authored
115
a7af84f isaacs docs: Move images out of the dist tarball
isaacs authored
116 doc_images = $(addprefix out/,$(wildcard doc/images/* doc/*.jpg doc/*.png))
117
90d1e47 ry make doc improvements
ry authored
118 website_files = \
a7300c8 ry WAF builds in out/ instead of build/
ry authored
119 out/doc/index.html \
120 out/doc/v0.4_announcement.html \
121 out/doc/cla.html \
122 out/doc/sh_main.js \
123 out/doc/sh_javascript.min.js \
124 out/doc/sh_vim-dark.css \
5c0d11b isaacs doc: Add images to makefile
isaacs authored
125 out/doc/sh.css \
ae17e2d ry Fix doc generation for new website
ry authored
126 out/doc/favicon.ico \
127 out/doc/pipe.css \
128 out/doc/about/index.html \
129 out/doc/community/index.html \
5c0d11b isaacs doc: Add images to makefile
isaacs authored
130 out/doc/logos/index.html \
e066074 isaacs Fix #3089 Build changelog.html for website
isaacs authored
131 out/doc/changelog.html \
a7af84f isaacs docs: Move images out of the dist tarball
isaacs authored
132 $(doc_images)
a7300c8 ry WAF builds in out/ instead of build/
ry authored
133
06bf070 isaacs makefile: Fix 'make doc'
isaacs authored
134 doc: program $(apidoc_dirs) $(website_files) $(apiassets) $(apidocs) tools/doc/
320e002 ry fix 'make doc'
ry authored
135
ade8cf9 Micheil Smith Build API page into build/doc; simplify doctool.
miksago authored
136 $(apidoc_dirs):
137 mkdir -p $@
2392775 ry Fix make doc
ry authored
138
a7300c8 ry WAF builds in out/ instead of build/
ry authored
139 out/doc/api/assets/%: doc/api_assets/% out/doc/api/assets/
ade8cf9 Micheil Smith Build API page into build/doc; simplify doctool.
miksago authored
140 cp $< $@
141
e066074 isaacs Fix #3089 Build changelog.html for website
isaacs authored
142 out/doc/changelog.html: ChangeLog doc/changelog-head.html doc/changelog-foot.html tools/build-changelog.sh
143 bash tools/build-changelog.sh
144
4637688 isaacs Remove hard-coded version number from docs
isaacs authored
145 out/doc/%.html: doc/%.html
146 cat $< | sed -e 's|__VERSION__|'$(VERSION)'|g' > $@
147
a7300c8 ry WAF builds in out/ instead of build/
ry authored
148 out/doc/%: doc/%
a7af84f isaacs docs: Move images out of the dist tarball
isaacs authored
149 cp -r $< $@
90d1e47 ry make doc improvements
ry authored
150
7d6d5e2 isaacs Use new doc generation tool
isaacs authored
151 out/doc/api/%.json: doc/api/%.markdown
152 out/Release/node tools/doc/generate.js --format=json $< > $@
153
154 out/doc/api/%.html: doc/api/%.markdown
155 out/Release/node tools/doc/generate.js --format=html --template=doc/template.html $< > $@
ade8cf9 Micheil Smith Build API page into build/doc; simplify doctool.
miksago authored
156
7abbda8 isaacs Make rules for release blog post and email message
isaacs authored
157 email.md: ChangeLog tools/email-footer.md
8068f9b isaacs Escape leading # signs in 'make email.md'
isaacs authored
158 bash tools/changelog-head.sh | sed 's|^\* #|* \\#|g' > $@
7abbda8 isaacs Make rules for release blog post and email message
isaacs authored
159 cat tools/email-footer.md | sed -e 's|__VERSION__|'$(VERSION)'|g' >> $@
160
161 blog.html: email.md
3ba9519 isaacs Makefile: minor nit
isaacs authored
162 cat $< | ./node tools/doc/node_modules/.bin/marked > $@
7abbda8 isaacs Make rules for release blog post and email message
isaacs authored
163
861f28f ry Don't unnecessarily output the makefile from the configure script.
ry authored
164 website-upload: doc
ee73132 ry use rsync instead of scp to upload website
ry authored
165 rsync -r out/doc/ node@nodejs.org:~/web/nodejs.org/
066789a isaacs Fix #3001 website update 'latest' links on publish
isaacs authored
166 ssh node@nodejs.org '\
167 rm -f ~/web/nodejs.org/dist/latest &&\
168 ln -s $(VERSION) ~/web/nodejs.org/dist/latest &&\
169 rm -f ~/web/nodejs.org/docs/latest &&\
170 ln -s $(VERSION) ~/web/nodejs.org/docs/latest &&\
171 rm -f ~/web/nodejs.org/dist/node-latest.tar.gz &&\
172 ln -s $(VERSION)/node-$(VERSION).tar.gz ~/web/nodejs.org/dist/node-latest.tar.gz'
ade8cf9 Micheil Smith Build API page into build/doc; simplify doctool.
miksago authored
173
a7300c8 ry WAF builds in out/ instead of build/
ry authored
174 docopen: out/doc/api/all.html
175 -google-chrome out/doc/api/all.html
861f28f ry Don't unnecessarily output the makefile from the configure script.
ry authored
176
2c016ba ry 'make distclean' should not call 'waf clean'
ry authored
177 docclean:
a7300c8 ry WAF builds in out/ instead of build/
ry authored
178 -rm -rf out/doc
2c016ba ry 'make distclean' should not call 'waf clean'
ry authored
179
472a72d Ben Noordhuis build: honour the PYTHON environment variable
bnoordhuis authored
180 VERSION=v$(shell $(PYTHON) tools/getnodeversion.py)
bf0d278 ry Improve "make dist" remove generated doc from repo.
ry authored
181 TARNAME=node-$(VERSION)
317ba9f ry Fix 'make dist'
ry authored
182 TARBALL=$(TARNAME).tar.gz
183 PKG=out/$(TARNAME).pkg
184 packagemaker=/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker
bf0d278 ry Improve "make dist" remove generated doc from repo.
ry authored
185
317ba9f ry Fix 'make dist'
ry authored
186 dist: doc $(TARBALL) $(PKG)
5bc1809 ry Add 'make dist-upload'
ry authored
187
9d1bdbc ry Fixes #2084. Makeify tools/osx-dist.sh
ry authored
188 PKGDIR=out/dist-osx
189
190 pkg: $(PKG)
191
5bc1809 ry Add 'make dist-upload'
ry authored
192 $(PKG):
e60b18b Nathan Rajlich Make a fat binary for the OS X `make pkg`.
TooTallNate authored
193 rm -rf $(PKGDIR)
194 rm -rf out/deps out/Release
195 ./configure --prefix=$(PKGDIR)/32/usr/local --without-snapshot --dest-cpu=ia32
317ba9f ry Fix 'make dist'
ry authored
196 $(MAKE) install
e60b18b Nathan Rajlich Make a fat binary for the OS X `make pkg`.
TooTallNate authored
197 rm -rf out/deps out/Release
198 ./configure --prefix=$(PKGDIR)/usr/local --without-snapshot --dest-cpu=x64
199 $(MAKE) install
200 lipo $(PKGDIR)/32/usr/local/bin/node \
201 $(PKGDIR)/usr/local/bin/node \
202 -output $(PKGDIR)/usr/local/bin/node-universal \
203 -create
204 mv $(PKGDIR)/usr/local/bin/node-universal $(PKGDIR)/usr/local/bin/node
205 rm -rf $(PKGDIR)/32
9d1bdbc ry Fixes #2084. Makeify tools/osx-dist.sh
ry authored
206 $(packagemaker) \
207 --id "org.nodejs.NodeJS-$(VERSION)" \
208 --doc tools/osx-pkg.pmdoc \
209 --out $(PKG)
5bc1809 ry Add 'make dist-upload'
ry authored
210
317ba9f ry Fix 'make dist'
ry authored
211 $(TARBALL): node out/doc
349cab0 isaacs Check the version before building tarball
isaacs authored
212 @if [ $(shell ./node --version) = "$(VERSION)" ]; then \
213 exit 0; \
214 else \
215 echo "" >&2 ; \
216 echo "$(shell ./node --version) doesn't match $(VERSION)." >&2 ; \
217 echo "Did you remember to update src/node_version.cc?" >&2 ; \
218 echo "" >&2 ; \
219 exit 1 ; \
220 fi
a1138c6 Micheil Smith Cleanup Makefile for JSLint, CPPLint
miksago authored
221 git archive --format=tar --prefix=$(TARNAME)/ HEAD | tar xf -
c45522d isaacs build: Prevent duplication of doc/api folder
isaacs authored
222 mkdir -p $(TARNAME)/doc/api
bf0d278 ry Improve "make dist" remove generated doc from repo.
ry authored
223 cp doc/node.1 $(TARNAME)/doc/node.1
c45522d isaacs build: Prevent duplication of doc/api folder
isaacs authored
224 cp -r out/doc/api/* $(TARNAME)/doc/api/
ce2d5ad ry Change the 'make dist' to remove v8 test dir
ry authored
225 rm -rf $(TARNAME)/deps/v8/test # too big
a7af84f isaacs docs: Move images out of the dist tarball
isaacs authored
226 rm -rf $(TARNAME)/doc/images # too big
ce2d5ad ry Change the 'make dist' to remove v8 test dir
ry authored
227 tar -cf $(TARNAME).tar $(TARNAME)
228 rm -rf $(TARNAME)
bf0d278 ry Improve "make dist" remove generated doc from repo.
ry authored
229 gzip -f -9 $(TARNAME).tar
861f28f ry Don't unnecessarily output the makefile from the configure script.
ry authored
230
716f5bc ry Add make dist-upload
ry authored
231 dist-upload: $(TARBALL) $(PKG)
232 ssh node@nodejs.org mkdir -p web/nodejs.org/dist/$(VERSION)
233 scp $(TARBALL) node@nodejs.org:~/web/nodejs.org/dist/$(VERSION)/$(TARBALL)
234 scp $(PKG) node@nodejs.org:~/web/nodejs.org/dist/$(VERSION)/$(TARNAME).pkg
235
ff456b3 ry Add 'make bench' script
ry authored
236 bench:
237 benchmark/http_simple_bench.sh
238
3cf4827 ry Add idle connection test
ry authored
239 bench-idle:
240 ./node benchmark/idle_server.js &
241 sleep 1
242 ./node benchmark/idle_clients.js &
243
ac58d3a ry Import cpplint.py
ry authored
244 jslint:
605927f isaacs Fix test/ jslint failures (by not linting tests)
isaacs authored
245 PYTHONPATH=tools/closure_linter/ $(PYTHON) tools/closure_linter/closure_linter/gjslint.py --unix_mode --strict --nojsdoc -r lib/ -r src/ --exclude_files lib/punycode.js
3cf4827 ry Add idle connection test
ry authored
246
ac58d3a ry Import cpplint.py
ry authored
247 cpplint:
472a72d Ben Noordhuis build: honour the PYTHON environment variable
bnoordhuis authored
248 @$(PYTHON) tools/cpplint.py $(wildcard src/*.cc src/*.h src/*.c)
ac58d3a ry Import cpplint.py
ry authored
249
250 lint: jslint cpplint
a128451 ry Import Google's closure_linter
ry authored
251
317ba9f ry Fix 'make dist'
ry authored
252 .PHONY: lint cpplint jslint bench clean docopen docclean doc dist distclean check uninstall install install-includes install-bin all program staticlib dynamiclib test test-all website-upload pkg
Something went wrong with that request. Please try again.