Skip to content

HTTPS clone URL

Subversion checkout URL

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