Makefile 4.46 KB
Newer Older
Russ Cox's avatar
Russ Cox committed
1 2 3 4
# Copyright 2009 The Go Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.

Russ Cox's avatar
Russ Cox committed
5 6 7
# After editing the DIRS= list or adding imports to any Go files
# in any of those directories, run:
#
8
#	./deps.bash
Russ Cox's avatar
Russ Cox committed
9 10 11
#
# to rebuild the dependency information in Make.deps.

12 13
include ../Make.inc

Russ Cox's avatar
Russ Cox committed
14 15 16
all: install

DIRS=\
David Symonds's avatar
David Symonds committed
17
	archive/tar\
18
	archive/zip\
Adam Langley's avatar
Adam Langley committed
19
	asn1\
20
	big\
21
	bufio\
Rob Pike's avatar
Rob Pike committed
22
	bytes\
Charles L. Dorian's avatar
Charles L. Dorian committed
23
	cmath\
Adam Langley's avatar
Adam Langley committed
24
	compress/bzip2\
Russ Cox's avatar
Russ Cox committed
25 26
	compress/flate\
	compress/gzip\
Nigel Tao's avatar
Nigel Tao committed
27
	compress/lzw \
Nigel Tao's avatar
Nigel Tao committed
28
	compress/zlib\
Robert Griesemer's avatar
Robert Griesemer committed
29
	container/heap\
David Symonds's avatar
David Symonds committed
30
	container/list\
31
	container/ring\
32
	container/vector\
Adam Langley's avatar
Adam Langley committed
33
	crypto\
Russ Cox's avatar
Russ Cox committed
34
	crypto/aes\
Raif S. Naffah's avatar
Raif S. Naffah committed
35
	crypto/blowfish\
Adam Langley's avatar
Adam Langley committed
36
	crypto/cast5\
Adam Langley's avatar
Adam Langley committed
37
	crypto/cipher\
Adam Langley's avatar
Adam Langley committed
38
	crypto/des\
Adam Langley's avatar
Adam Langley committed
39
	crypto/dsa\
Adam Langley's avatar
Adam Langley committed
40
	crypto/ecdsa\
Adam Langley's avatar
Adam Langley committed
41
	crypto/elliptic\
Rob Pike's avatar
Rob Pike committed
42
	crypto/hmac\
43
	crypto/md4\
Russ Cox's avatar
Russ Cox committed
44
	crypto/md5\
45
	crypto/ocsp\
Adam Langley's avatar
Adam Langley committed
46 47
	crypto/openpgp\
	crypto/openpgp/armor\
48
	crypto/openpgp/elgamal\
Adam Langley's avatar
Adam Langley committed
49 50 51
	crypto/openpgp/error\
	crypto/openpgp/packet\
	crypto/openpgp/s2k\
Russ Cox's avatar
Russ Cox committed
52
	crypto/rand\
Adam Langley's avatar
Adam Langley committed
53
	crypto/rc4\
Raif S. Naffah's avatar
Raif S. Naffah committed
54
	crypto/ripemd160\
Adam Langley's avatar
Adam Langley committed
55
	crypto/rsa\
Russ Cox's avatar
Russ Cox committed
56
	crypto/sha1\
Andy Davis's avatar
Andy Davis committed
57
	crypto/sha256\
Conrad Meyer's avatar
Conrad Meyer committed
58
	crypto/sha512\
59
	crypto/subtle\
Adam Langley's avatar
Adam Langley committed
60
	crypto/tls\
Berengar Lehr's avatar
Berengar Lehr committed
61
	crypto/twofish\
Adam Langley's avatar
Adam Langley committed
62
	crypto/x509\
63
	crypto/x509/pkix\
64
	crypto/xtea\
Paul Borman's avatar
Paul Borman committed
65
	csv\
Russ Cox's avatar
Russ Cox committed
66
	debug/dwarf\
Russ Cox's avatar
Russ Cox committed
67
	debug/macho\
Russ Cox's avatar
Russ Cox committed
68
	debug/elf\
69
	debug/gosym\
70
	debug/pe\
Robert Griesemer's avatar
Robert Griesemer committed
71
	ebnf\
Russ Cox's avatar
Russ Cox committed
72
	encoding/ascii85\
Miek Gieben's avatar
Miek Gieben committed
73
	encoding/base32\
Russ Cox's avatar
Russ Cox committed
74 75 76
	encoding/base64\
	encoding/binary\
	encoding/git85\
Adam Langley's avatar
Adam Langley committed
77
	encoding/hex\
Adam Langley's avatar
Adam Langley committed
78
	encoding/pem\
79
	exec\
Russ Cox's avatar
Russ Cox committed
80
	exp/datafmt\
81 82
	exp/gui\
	exp/gui/x11\
83
	exp/norm\
84
	exp/regexp/syntax\
85
	exp/template\
86
	expvar\
87
	flag\
Russ Cox's avatar
Russ Cox committed
88
	fmt\
89
	go/ast\
90
	go/build\
91 92
	go/doc\
	go/parser\
93
	go/printer\
94 95
	go/scanner\
	go/token\
96
	go/typechecker\
97
	go/types\
Rob Pike's avatar
Rob Pike committed
98
	gob\
Russ Cox's avatar
Russ Cox committed
99
	hash\
100 101
	hash/adler32\
	hash/crc32\
102
	hash/crc64\
103
	hash/fnv\
104
	html\
Russ Cox's avatar
Russ Cox committed
105
	http\
106
	http/cgi\
Evan Shaw's avatar
Evan Shaw committed
107
	http/fcgi\
108
	http/pprof\
109
	http/httptest\
Ross Light's avatar
Ross Light committed
110
	http/spdy\
Nigel Tao's avatar
Nigel Tao committed
111
	image\
112
	image/bmp\
113
	image/draw\
Rob Pike's avatar
Rob Pike committed
114
	image/gif\
Nigel Tao's avatar
Nigel Tao committed
115
	image/jpeg\
Nigel Tao's avatar
Nigel Tao committed
116
	image/png\
117
	image/tiff\
Nigel Tao's avatar
Nigel Tao committed
118
	image/ycbcr\
119
	index/suffixarray\
120
	io\
121
	io/ioutil\
Russ Cox's avatar
Russ Cox committed
122
	json\
123
	log\
David Symonds's avatar
David Symonds committed
124
	mail\
Russ Cox's avatar
Russ Cox committed
125
	math\
126
	mime\
127
	mime/multipart\
Russ Cox's avatar
Russ Cox committed
128
	net\
129 130
	net/dict\
	net/textproto\
131
	netchan\
Russ Cox's avatar
Russ Cox committed
132
	os\
David Symonds's avatar
David Symonds committed
133
	os/signal\
134
	os/user\
Russ Cox's avatar
Russ Cox committed
135
	patch\
136
	path\
137
	path/filepath\
138
	rand\
Russ Cox's avatar
Russ Cox committed
139 140
	reflect\
	regexp\
Rob Pike's avatar
Rob Pike committed
141
	rpc\
142
	rpc/jsonrpc\
143
	runtime\
144
	runtime/cgo\
Rob Pike's avatar
Rob Pike committed
145
	runtime/debug\
146
	runtime/pprof\
147
	scanner\
Evan Shaw's avatar
Evan Shaw committed
148
	smtp\
149
	sort\
Russ Cox's avatar
Russ Cox committed
150
	strconv\
151
	strings\
Russ Cox's avatar
Russ Cox committed
152
	sync\
Russ Cox's avatar
Russ Cox committed
153
	sync/atomic\
154
	syscall\
Yves Junqueira's avatar
Yves Junqueira committed
155
	syslog\
156
	tabwriter\
157
	template\
158
	testing\
Russ Cox's avatar
Russ Cox committed
159
	testing/iotest\
160
	testing/quick\
Adam Langley's avatar
Adam Langley committed
161
	testing/script\
Russ Cox's avatar
Russ Cox committed
162
	time\
Rob Pike's avatar
Rob Pike committed
163
	try\
Russ Cox's avatar
Russ Cox committed
164
	unicode\
Russ Cox's avatar
Russ Cox committed
165
	utf16\
Russ Cox's avatar
Russ Cox committed
166
	utf8\
167
	websocket\
Russ Cox's avatar
Russ Cox committed
168
	xml\
169 170 171
	../cmd/cgo\
	../cmd/ebnflint\
	../cmd/godoc\
172
	../cmd/gofix\
173 174
	../cmd/gofmt\
	../cmd/goinstall\
175 176
	../cmd/gotest\
	../cmd/gotype\
177
	../cmd/govet\
178 179
	../cmd/goyacc\
	../cmd/hgpatch\
Russ Cox's avatar
Russ Cox committed
180

Balazs Lecz's avatar
Balazs Lecz committed
181 182 183 184 185 186
ifeq ($(GOOS),linux)
DIRS+=\
	os/inotify\

endif

187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215
ifeq ($(GOOS),plan9)
NOPLAN9BUILD=\
	crypto/tls\
	exp/gui/x11\
	expvar\
	http\
	http/cgi\
	http/fcgi\
	http/httptest\
	http/pprof\
	http/spdy\
	mail\
	mime/multipart\
	net\
	net/dict\
	net/textproto\
	netchan\
	os/signal\
	rpc\
	rpc/jsonrpc\
	smtp\
	syslog\
	websocket\
	../cmd/godoc\
	../cmd/goinstall\

DIRS:=$(filter-out $(NOPLAN9BUILD),$(DIRS))
endif

216
NOTEST+=\
Adam Langley's avatar
Adam Langley committed
217
	crypto\
Adam Langley's avatar
Adam Langley committed
218
	crypto/openpgp/error\
219
	crypto/x509/pkix\
220 221
	exp/gui\
	exp/gui/x11\
222 223 224 225
	go/ast\
	go/doc\
	go/token\
	hash\
226
	http/pprof\
227
	http/httptest\
228
	image/bmp\
Rob Pike's avatar
Rob Pike committed
229
	image/gif\
230
	net/dict\
231
	rand\
232
	runtime/cgo\
233
	syscall\
Rob Pike's avatar
Rob Pike committed
234
	testing\
235
	testing/iotest\
Rob Pike's avatar
Rob Pike committed
236
	try\
237 238 239
	../cmd/cgo\
	../cmd/ebnflint\
	../cmd/godoc\
240
	../cmd/goinstall\
241
	../cmd/gotest\
242 243
	../cmd/goyacc\
	../cmd/hgpatch\
244

245
NOBENCH+=\
246 247
	container/vector\

248 249 250 251 252 253 254
# Disable tests that windows cannot run yet.
ifeq ($(GOOS),windows)
NOTEST+=os/signal    # no signals
NOTEST+=syslog       # no network
NOTEST+=time         # no syscall.Kill, syscall.SIGCHLD for sleep tests
endif

255 256 257 258 259 260
TEST=\
	$(filter-out $(NOTEST),$(DIRS))

BENCH=\
	$(filter-out $(NOBENCH),$(TEST))

261 262 263 264
clean.dirs: $(addsuffix .clean, $(DIRS))
install.dirs: $(addsuffix .install, $(DIRS))
nuke.dirs: $(addsuffix .nuke, $(DIRS))
test.dirs: $(addsuffix .test, $(TEST))
265
testshort.dirs: $(addsuffix .testshort, $(TEST))
266
bench.dirs: $(addsuffix .bench, $(BENCH))
Russ Cox's avatar
Russ Cox committed
267

Russ Cox's avatar
Russ Cox committed
268
%.clean:
269
	+$(MAKE) -C $* clean
Russ Cox's avatar
Russ Cox committed
270

271
%.install:
272
	+@echo install $*
273
	+@$(MAKE) -C $* install.clean >$*/build.out 2>&1 || (echo INSTALL FAIL $*; cat $*/build.out; exit 1)
Russ Cox's avatar
Russ Cox committed
274

275
%.nuke:
276
	+$(MAKE) -C $* nuke
Russ Cox's avatar
Russ Cox committed
277

278
%.test:
279
	+@echo test $*
280
	+@$(MAKE) -C $* test.clean >$*/test.out 2>&1 || (echo TEST FAIL $*; cat $*/test.out; exit 1)
Russ Cox's avatar
Russ Cox committed
281

282
%.testshort:
283
	+@echo test $*
284
	+@$(MAKE) -C $* testshort.clean >$*/test.out 2>&1 || (echo TEST FAIL $*; cat $*/test.out; exit 1)
285

286
%.bench:
287
	+$(MAKE) -C $* bench	
288

289
clean: clean.dirs
Russ Cox's avatar
Russ Cox committed
290

291
install: install.dirs
Russ Cox's avatar
Russ Cox committed
292

293
test:	test.dirs
Russ Cox's avatar
Russ Cox committed
294

295 296
testshort: testshort.dirs

297
bench:	bench.dirs ../../test/garbage.bench
298

299
nuke: nuke.dirs
300
	rm -rf "$(GOROOT)"/pkg/*
Russ Cox's avatar
Russ Cox committed
301

302 303
deps:
	./deps.bash
Russ Cox's avatar
Russ Cox committed
304

Balazs Lecz's avatar
Balazs Lecz committed
305 306 307
echo-dirs:
	@echo $(DIRS)

308
-include Make.deps
309

310
runtime/cgo.install: ../cmd/cgo.install