Makefile 4.5 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\
71
	debug/proc\
Robert Griesemer's avatar
Robert Griesemer committed
72
	ebnf\
Russ Cox's avatar
Russ Cox committed
73
	encoding/ascii85\
Miek Gieben's avatar
Miek Gieben committed
74
	encoding/base32\
Russ Cox's avatar
Russ Cox committed
75 76 77
	encoding/base64\
	encoding/binary\
	encoding/git85\
Adam Langley's avatar
Adam Langley committed
78
	encoding/hex\
Adam Langley's avatar
Adam Langley committed
79
	encoding/pem\
80
	exec\
Russ Cox's avatar
Russ Cox committed
81
	exp/datafmt\
Russ Cox's avatar
Russ Cox committed
82
	exp/eval\
83 84
	exp/gui\
	exp/gui/x11\
85
	exp/regexp/syntax\
86
	exp/template\
87
	expvar\
88
	flag\
Russ Cox's avatar
Russ Cox committed
89
	fmt\
90
	go/ast\
91
	go/build\
92 93
	go/doc\
	go/parser\
94
	go/printer\
95 96
	go/scanner\
	go/token\
97
	go/typechecker\
98
	go/types\
Rob Pike's avatar
Rob Pike committed
99
	gob\
Russ Cox's avatar
Russ Cox committed
100
	hash\
101 102
	hash/adler32\
	hash/crc32\
103
	hash/crc64\
104
	hash/fnv\
105
	html\
Russ Cox's avatar
Russ Cox committed
106
	http\
107
	http/cgi\
Evan Shaw's avatar
Evan Shaw committed
108
	http/fcgi\
109
	http/pprof\
110
	http/httptest\
Ross Light's avatar
Ross Light committed
111
	http/spdy\
Nigel Tao's avatar
Nigel Tao committed
112
	image\
113
	image/bmp\
114
	image/draw\
Rob Pike's avatar
Rob Pike committed
115
	image/gif\
Nigel Tao's avatar
Nigel Tao committed
116
	image/jpeg\
Nigel Tao's avatar
Nigel Tao committed
117
	image/png\
118
	image/tiff\
Nigel Tao's avatar
Nigel Tao committed
119
	image/ycbcr\
120
	index/suffixarray\
121
	io\
122
	io/ioutil\
Russ Cox's avatar
Russ Cox committed
123
	json\
124
	log\
David Symonds's avatar
David Symonds committed
125
	mail\
Russ Cox's avatar
Russ Cox committed
126
	math\
127
	mime\
128
	mime/multipart\
Russ Cox's avatar
Russ Cox committed
129
	net\
130 131
	net/dict\
	net/textproto\
132
	netchan\
Russ Cox's avatar
Russ Cox committed
133
	os\
David Symonds's avatar
David Symonds committed
134
	os/signal\
135
	os/user\
Russ Cox's avatar
Russ Cox committed
136
	patch\
137
	path\
138
	path/filepath\
139
	rand\
Russ Cox's avatar
Russ Cox committed
140 141
	reflect\
	regexp\
Rob Pike's avatar
Rob Pike committed
142
	rpc\
143
	rpc/jsonrpc\
144
	runtime\
145
	runtime/cgo\
Rob Pike's avatar
Rob Pike committed
146
	runtime/debug\
147
	runtime/pprof\
148
	scanner\
Evan Shaw's avatar
Evan Shaw committed
149
	smtp\
150
	sort\
Russ Cox's avatar
Russ Cox committed
151
	strconv\
152
	strings\
Russ Cox's avatar
Russ Cox committed
153
	sync\
Russ Cox's avatar
Russ Cox committed
154
	sync/atomic\
155
	syscall\
Yves Junqueira's avatar
Yves Junqueira committed
156
	syslog\
157
	tabwriter\
158
	template\
159
	testing\
Russ Cox's avatar
Russ Cox committed
160
	testing/iotest\
161
	testing/quick\
Adam Langley's avatar
Adam Langley committed
162
	testing/script\
Russ Cox's avatar
Russ Cox committed
163
	time\
Rob Pike's avatar
Rob Pike committed
164
	try\
Russ Cox's avatar
Russ Cox committed
165
	unicode\
Russ Cox's avatar
Russ Cox committed
166
	utf16\
Russ Cox's avatar
Russ Cox committed
167
	utf8\
168
	websocket\
Russ Cox's avatar
Russ Cox committed
169
	xml\
170 171 172
	../cmd/cgo\
	../cmd/ebnflint\
	../cmd/godoc\
173
	../cmd/gofix\
174 175
	../cmd/gofmt\
	../cmd/goinstall\
176 177
	../cmd/gotest\
	../cmd/gotype\
178
	../cmd/govet\
179 180
	../cmd/goyacc\
	../cmd/hgpatch\
Russ Cox's avatar
Russ Cox committed
181

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

endif

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 216 217
ifeq ($(GOOS),plan9)
NOPLAN9BUILD=\
	crypto/tls\
	debug/proc\
	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

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

248
NOBENCH+=\
249 250
	container/vector\

251 252 253 254 255 256 257
# 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

258 259 260 261 262 263
TEST=\
	$(filter-out $(NOTEST),$(DIRS))

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

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

Russ Cox's avatar
Russ Cox committed
271
%.clean:
272
	+$(MAKE) -C $* clean
Russ Cox's avatar
Russ Cox committed
273

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

278
%.nuke:
279
	+$(MAKE) -C $* nuke
Russ Cox's avatar
Russ Cox committed
280

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

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

289
%.bench:
290
	+$(MAKE) -C $* bench	
291

292
clean: clean.dirs
Russ Cox's avatar
Russ Cox committed
293

294
install: install.dirs
Russ Cox's avatar
Russ Cox committed
295

296
test:	test.dirs
Russ Cox's avatar
Russ Cox committed
297

298 299
testshort: testshort.dirs

300
bench:	bench.dirs ../../test/garbage.bench
301

302
nuke: nuke.dirs
303
	rm -rf "$(GOROOT)"/pkg/*
Russ Cox's avatar
Russ Cox committed
304

305 306
deps:
	./deps.bash
Russ Cox's avatar
Russ Cox committed
307

Balazs Lecz's avatar
Balazs Lecz committed
308 309 310
echo-dirs:
	@echo $(DIRS)

311
-include Make.deps
312

313
runtime/cgo.install: ../cmd/cgo.install