OSDN Git Service

e3b33a83bdca3decb760a4c4a7ed42fa66409caf
[pf3gnuchains/gcc-fork.git] / libgo / Makefile.am
1 # Makefile.am -- Go library Makefile.
2
3 # Copyright 2009 The Go Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style
5 # license that can be found in the LICENSE file.
6
7 # Process this file with autoreconf to produce Makefile.in.
8
9 # Go support.
10 SUFFIXES = .c .go .gox .o .obj .lo .a
11
12 if LIBGO_IS_RTEMS
13 subdirs = testsuite
14 endif
15
16 SUBDIRS = ${subdirs}
17
18 gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
19
20 MAINT_CHARSET = latin1
21
22 mkinstalldirs = $(SHELL) $(toplevel_srcdir)/mkinstalldirs
23 PWD_COMMAND = $${PWDCMD-pwd}
24 STAMP = echo timestamp >
25
26 toolexecdir = $(glibgo_toolexecdir)
27 toolexeclibdir = $(glibgo_toolexeclibdir)
28
29 LIBFFI = @LIBFFI@
30 LIBFFIINCS = @LIBFFIINCS@
31
32 WARN_CFLAGS = $(WARN_FLAGS) $(WERROR)
33
34 # -I/-D flags to pass when compiling.
35 AM_CPPFLAGS = -I $(srcdir)/runtime $(LIBFFIINCS) $(PTHREAD_CFLAGS)
36
37 ACLOCAL_AMFLAGS = -I ./config -I ../config
38
39 AM_CFLAGS = -fexceptions -fplan9-extensions $(SPLIT_STACK) $(WARN_CFLAGS) \
40         $(STRINGOPS_FLAG) \
41         -I $(srcdir)/../libgcc -I $(MULTIBUILDTOP)../../gcc/include
42
43 if USING_SPLIT_STACK
44 AM_LDFLAGS = -XCClinker $(SPLIT_STACK)
45 endif
46
47 # Multilib support.
48 MAKEOVERRIDES=
49
50 # Work around what appears to be a GNU make  handling MAKEFLAGS
51 # values defined in terms of make variables, as is the case for CC and
52 # friends when we are called from the top level Makefile.
53 AM_MAKEFLAGS = \
54         "AR_FLAGS=$(AR_FLAGS)" \
55         "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
56         "CC_FOR_TARGET=$(CC_FOR_TARGET)" \
57         "CFLAGS=$(CFLAGS)" \
58         "CXXFLAGS=$(CXXFLAGS)" \
59         "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
60         "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
61         "GOC_FOR_TARGET=$(GOC_FOR_TARGET)" \
62         "GOC=$(GOC)" \
63         "GOCFLAGS=$(GOCFLAGS)" \
64         "INSTALL=$(INSTALL)" \
65         "INSTALL_DATA=$(INSTALL_DATA)" \
66         "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
67         "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
68         "LDFLAGS=$(LDFLAGS)" \
69         "LIBCFLAGS=$(LIBCFLAGS)" \
70         "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
71         "MAKE=$(MAKE)" \
72         "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
73         "PICFLAG=$(PICFLAG)" \
74         "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
75         "SHELL=$(SHELL)" \
76         "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
77         "exec_prefix=$(exec_prefix)" \
78         "infodir=$(infodir)" \
79         "libdir=$(libdir)" \
80         "includedir=$(includedir)" \
81         "prefix=$(prefix)" \
82         "tooldir=$(tooldir)" \
83         "gxx_include_dir=$(gxx_include_dir)" \
84         "AR=$(AR)" \
85         "AS=$(AS)" \
86         "LD=$(LD)" \
87         "RANLIB=$(RANLIB)" \
88         "NM=$(NM)" \
89         "NM_FOR_BUILD=$(NM_FOR_BUILD)" \
90         "NM_FOR_TARGET=$(NM_FOR_TARGET)" \
91         "DESTDIR=$(DESTDIR)" \
92         "WERROR=$(WERROR)"
93
94 # Subdir rules rely on $(FLAGS_TO_PASS)
95 FLAGS_TO_PASS = $(AM_MAKEFLAGS)
96
97 toolexeclib_LTLIBRARIES = libgo.la
98 toolexeclib_LIBRARIES = libgobegin.a
99
100 toolexeclibgodir = $(toolexeclibdir)/go/$(gcc_version)/$(target_alias)
101
102 toolexeclibgo_DATA = \
103         asn1.gox \
104         big.gox \
105         bufio.gox \
106         bytes.gox \
107         cmath.gox \
108         crypto.gox \
109         csv.gox \
110         exec.gox \
111         expvar.gox \
112         flag.gox \
113         fmt.gox \
114         gob.gox \
115         hash.gox \
116         html.gox \
117         http.gox \
118         image.gox \
119         io.gox \
120         json.gox \
121         log.gox \
122         math.gox \
123         mail.gox \
124         mime.gox \
125         net.gox \
126         os.gox \
127         patch.gox \
128         path.gox \
129         rand.gox \
130         reflect.gox \
131         regexp.gox \
132         rpc.gox \
133         runtime.gox \
134         scanner.gox \
135         smtp.gox \
136         sort.gox \
137         strconv.gox \
138         strings.gox \
139         sync.gox \
140         syscall.gox \
141         syslog.gox \
142         tabwriter.gox \
143         template.gox \
144         testing.gox \
145         time.gox \
146         unicode.gox \
147         url.gox \
148         utf16.gox \
149         utf8.gox \
150         websocket.gox \
151         xml.gox
152
153 toolexeclibgoarchivedir = $(toolexeclibgodir)/archive
154
155 toolexeclibgoarchive_DATA = \
156         archive/tar.gox \
157         archive/zip.gox
158
159 toolexeclibgocompressdir = $(toolexeclibgodir)/compress
160
161 toolexeclibgocompress_DATA = \
162         compress/bzip2.gox \
163         compress/flate.gox \
164         compress/gzip.gox \
165         compress/lzw.gox \
166         compress/zlib.gox
167
168 toolexeclibgocontainerdir = $(toolexeclibgodir)/container
169
170 toolexeclibgocontainer_DATA = \
171         container/heap.gox \
172         container/list.gox \
173         container/ring.gox
174
175 toolexeclibgocryptodir = $(toolexeclibgodir)/crypto
176
177 toolexeclibgocrypto_DATA = \
178         crypto/aes.gox \
179         crypto/bcrypt.gox \
180         crypto/blowfish.gox \
181         crypto/cast5.gox \
182         crypto/cipher.gox \
183         crypto/des.gox \
184         crypto/dsa.gox \
185         crypto/ecdsa.gox \
186         crypto/elliptic.gox \
187         crypto/hmac.gox \
188         crypto/md4.gox \
189         crypto/md5.gox \
190         crypto/ocsp.gox \
191         crypto/openpgp.gox \
192         crypto/rand.gox \
193         crypto/rc4.gox \
194         crypto/ripemd160.gox \
195         crypto/rsa.gox \
196         crypto/sha1.gox \
197         crypto/sha256.gox \
198         crypto/sha512.gox \
199         crypto/subtle.gox \
200         crypto/tls.gox \
201         crypto/twofish.gox \
202         crypto/x509.gox \
203         crypto/xtea.gox
204
205 toolexeclibgocryptoopenpgpdir = $(toolexeclibgocryptodir)/openpgp
206
207 toolexeclibgocryptoopenpgp_DATA = \
208         crypto/openpgp/armor.gox \
209         crypto/openpgp/elgamal.gox \
210         crypto/openpgp/error.gox \
211         crypto/openpgp/packet.gox \
212         crypto/openpgp/s2k.gox
213
214 toolexeclibgocryptox509dir = $(toolexeclibgocryptodir)/x509
215
216 toolexeclibgocryptox509_DATA = \
217         crypto/x509/pkix.gox
218
219 toolexeclibgodebugdir = $(toolexeclibgodir)/debug
220
221 toolexeclibgodebug_DATA = \
222         debug/dwarf.gox \
223         debug/elf.gox \
224         debug/gosym.gox \
225         debug/macho.gox \
226         debug/pe.gox
227
228 toolexeclibgoencodingdir = $(toolexeclibgodir)/encoding
229
230 toolexeclibgoencoding_DATA = \
231         encoding/ascii85.gox \
232         encoding/base32.gox \
233         encoding/base64.gox \
234         encoding/binary.gox \
235         encoding/git85.gox \
236         encoding/hex.gox \
237         encoding/pem.gox
238
239 toolexeclibgoexpdir = $(toolexeclibgodir)/exp
240
241 toolexeclibgoexp_DATA = \
242         exp/ebnf.gox \
243         exp/gui.gox \
244         exp/norm.gox \
245         exp/spdy.gox \
246         exp/sql.gox \
247         exp/ssh.gox \
248         exp/terminal.gox \
249         exp/types.gox
250
251 toolexeclibgoexpguidir = $(toolexeclibgoexpdir)/gui
252
253 toolexeclibgoexpgui_DATA = \
254         exp/gui/x11.gox
255
256 toolexeclibgoexpsqldir = $(toolexeclibgoexpdir)/sql
257
258 toolexeclibgoexpsql_DATA = \
259         exp/sql/driver.gox
260
261 toolexeclibgoexptemplatedir = $(toolexeclibgoexpdir)/template
262
263 toolexeclibgoexptemplate_DATA = \
264         exp/template/html.gox
265
266 toolexeclibgogodir = $(toolexeclibgodir)/go
267
268 toolexeclibgogo_DATA = \
269         go/ast.gox \
270         go/build.gox \
271         go/doc.gox \
272         go/parser.gox \
273         go/printer.gox \
274         go/scanner.gox \
275         go/token.gox
276
277 toolexeclibgohashdir = $(toolexeclibgodir)/hash
278
279 toolexeclibgohash_DATA = \
280         hash/adler32.gox \
281         hash/crc32.gox \
282         hash/crc64.gox \
283         hash/fnv.gox
284
285 toolexeclibgohttpdir = $(toolexeclibgodir)/http
286
287 toolexeclibgohttp_DATA = \
288         http/cgi.gox \
289         http/fcgi.gox \
290         http/httptest.gox \
291         http/pprof.gox
292
293 toolexeclibgoimagedir = $(toolexeclibgodir)/image
294
295 toolexeclibgoimage_DATA = \
296         image/bmp.gox \
297         image/color.gox \
298         image/draw.gox \
299         image/gif.gox \
300         image/jpeg.gox \
301         image/png.gox \
302         image/tiff.gox \
303         image/ycbcr.gox
304
305 toolexeclibgoindexdir = $(toolexeclibgodir)/index
306
307 toolexeclibgoindex_DATA = \
308         index/suffixarray.gox
309
310 toolexeclibgoiodir = $(toolexeclibgodir)/io
311
312 toolexeclibgoio_DATA = \
313         io/ioutil.gox
314
315 toolexeclibgomimedir = $(toolexeclibgodir)/mime
316
317 toolexeclibgomime_DATA = \
318         mime/multipart.gox
319
320 toolexeclibgonetdir = $(toolexeclibgodir)/net
321
322 toolexeclibgonet_DATA = \
323         net/dict.gox \
324         net/textproto.gox
325
326 toolexeclibgoolddir = $(toolexeclibgodir)/old
327
328 toolexeclibgoold_DATA = \
329         old/netchan.gox \
330         old/regexp.gox \
331         old/template.gox
332
333 toolexeclibgoosdir = $(toolexeclibgodir)/os
334
335 if LIBGO_IS_LINUX
336 # os_inotify_gox = os/inotify.gox
337 os_inotify_gox =
338 else
339 os_inotify_gox =
340 endif
341
342 toolexeclibgoos_DATA = \
343         $(os_inotify_gox) \
344         os/user.gox \
345         os/signal.gox
346
347 toolexeclibgopathdir = $(toolexeclibgodir)/path
348
349 toolexeclibgopath_DATA = \
350         path/filepath.gox
351
352 toolexeclibgoregexpdir = $(toolexeclibgodir)/regexp
353
354 toolexeclibgoregexp_DATA = \
355         regexp/syntax.gox
356
357 toolexeclibgorpcdir = $(toolexeclibgodir)/rpc
358
359 toolexeclibgorpc_DATA = \
360         rpc/jsonrpc.gox
361
362 toolexeclibgoruntimedir = $(toolexeclibgodir)/runtime
363
364 toolexeclibgoruntime_DATA = \
365         runtime/debug.gox \
366         runtime/pprof.gox
367
368 toolexeclibgotemplatedir = $(toolexeclibgodir)/template
369
370 toolexeclibgotemplate_DATA = \
371         template/parse.gox
372
373 toolexeclibgosyncdir = $(toolexeclibgodir)/sync
374
375 toolexeclibgosync_DATA = \
376         sync/atomic.gox
377
378 toolexeclibgotestingdir = $(toolexeclibgodir)/testing
379
380 toolexeclibgotesting_DATA = \
381         testing/iotest.gox \
382         testing/quick.gox \
383         testing/script.gox
384
385 if HAVE_SYS_MMAN_H
386 runtime_mem_file = runtime/mem.c
387 else
388 runtime_mem_file = runtime/mem_posix_memalign.c
389 endif
390
391 if LIBGO_IS_RTEMS
392 rtems_task_variable_add_file = runtime/rtems-task-variable-add.c
393 else
394 rtems_task_variable_add_file =
395 endif
396
397 runtime_files = \
398         runtime/go-append.c \
399         runtime/go-assert.c \
400         runtime/go-assert-interface.c \
401         runtime/go-byte-array-to-string.c \
402         runtime/go-breakpoint.c \
403         runtime/go-caller.c \
404         runtime/go-can-convert-interface.c \
405         runtime/go-cgo.c \
406         runtime/go-chan-cap.c \
407         runtime/go-chan-len.c \
408         runtime/go-check-interface.c \
409         runtime/go-close.c \
410         runtime/go-construct-map.c \
411         runtime/go-convert-interface.c \
412         runtime/go-copy.c \
413         runtime/go-defer.c \
414         runtime/go-deferred-recover.c \
415         runtime/go-eface-compare.c \
416         runtime/go-eface-val-compare.c \
417         runtime/go-getgoroot.c \
418         runtime/go-go.c \
419         runtime/go-gomaxprocs.c \
420         runtime/go-int-array-to-string.c \
421         runtime/go-int-to-string.c \
422         runtime/go-interface-compare.c \
423         runtime/go-interface-eface-compare.c \
424         runtime/go-interface-val-compare.c \
425         runtime/go-lock-os-thread.c \
426         runtime/go-make-slice.c \
427         runtime/go-map-delete.c \
428         runtime/go-map-index.c \
429         runtime/go-map-len.c \
430         runtime/go-map-range.c \
431         runtime/go-nanotime.c \
432         runtime/go-new-channel.c \
433         runtime/go-new-map.c \
434         runtime/go-new.c \
435         runtime/go-note.c \
436         runtime/go-panic.c \
437         runtime/go-panic-defer.c \
438         runtime/go-print.c \
439         runtime/go-rand.c \
440         runtime/go-rec-big.c \
441         runtime/go-rec-nb-big.c \
442         runtime/go-rec-nb-small.c \
443         runtime/go-rec-small.c \
444         runtime/go-recover.c \
445         runtime/go-reflect.c \
446         runtime/go-reflect-call.c \
447         runtime/go-reflect-chan.c \
448         runtime/go-reflect-map.c \
449         runtime/go-rune.c \
450         runtime/go-runtime-error.c \
451         runtime/go-sched.c \
452         runtime/go-select.c \
453         runtime/go-semacquire.c \
454         runtime/go-send-big.c \
455         runtime/go-send-nb-big.c \
456         runtime/go-send-nb-small.c \
457         runtime/go-send-small.c \
458         runtime/go-setenv.c \
459         runtime/go-signal.c \
460         runtime/go-strcmp.c \
461         runtime/go-string-to-byte-array.c \
462         runtime/go-string-to-int-array.c \
463         runtime/go-strplus.c \
464         runtime/go-strslice.c \
465         runtime/go-trampoline.c \
466         runtime/go-type-eface.c \
467         runtime/go-type-error.c \
468         runtime/go-type-identity.c \
469         runtime/go-type-interface.c \
470         runtime/go-type-string.c \
471         runtime/go-typedesc-equal.c \
472         runtime/go-typestring.c \
473         runtime/go-unreflect.c \
474         runtime/go-unsafe-new.c \
475         runtime/go-unsafe-newarray.c \
476         runtime/go-unsafe-pointer.c \
477         runtime/go-unwind.c \
478         runtime/cpuprof.c \
479         runtime/mcache.c \
480         runtime/mcentral.c \
481         $(runtime_mem_file) \
482         runtime/mfinal.c \
483         runtime/mfixalloc.c \
484         runtime/mgc0.c \
485         runtime/mheap.c \
486         runtime/msize.c \
487         runtime/proc.c \
488         runtime/thread.c \
489         runtime/yield.c \
490         $(rtems_task_variable_add_file) \
491         chan.c \
492         iface.c \
493         malloc.c \
494         map.c \
495         mprof.c \
496         reflect.c \
497         sigqueue.c \
498         string.c
499
500 goc2c.$(OBJEXT): runtime/goc2c.c
501         $(CC_FOR_BUILD) -c $(CFLAGS_FOR_BUILD) $<
502
503 goc2c: goc2c.$(OBJEXT)
504         $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) -o $@ $<
505
506 malloc.c: $(srcdir)/runtime/malloc.goc goc2c
507         ./goc2c --gcc --go-prefix libgo_runtime $< > $@.tmp
508         mv -f $@.tmp $@
509
510 mprof.c: $(srcdir)/runtime/mprof.goc goc2c
511         ./goc2c --gcc --go-prefix libgo_runtime $< > $@.tmp
512         mv -f $@.tmp $@
513
514 reflect.c: $(srcdir)/runtime/reflect.goc goc2c
515         ./goc2c --gcc --go-prefix libgo_reflect $< > $@.tmp
516         mv -f $@.tmp $@
517
518 sigqueue.c: $(srcdir)/runtime/sigqueue.goc goc2c
519         ./goc2c --gcc --go-prefix libgo_runtime $< > $@.tmp
520         mv -f $@.tmp $@
521
522 %.c: $(srcdir)/runtime/%.goc goc2c
523         ./goc2c --gcc $< > $@.tmp
524         mv -f $@.tmp $@
525
526 go_asn1_files = \
527         go/asn1/asn1.go \
528         go/asn1/common.go \
529         go/asn1/marshal.go
530
531 go_big_files = \
532         go/big/arith.go \
533         go/big/int.go \
534         go/big/nat.go \
535         go/big/rat.go
536
537 go_bufio_files = \
538         go/bufio/bufio.go
539
540 go_bytes_files = \
541         go/bytes/buffer.go \
542         go/bytes/bytes.go \
543         go/bytes/bytes_decl.go
544 go_bytes_c_files = \
545         go/bytes/indexbyte.c
546
547 go_cmath_files = \
548         go/cmath/abs.go \
549         go/cmath/asin.go \
550         go/cmath/conj.go \
551         go/cmath/exp.go \
552         go/cmath/isinf.go \
553         go/cmath/isnan.go \
554         go/cmath/log.go \
555         go/cmath/phase.go \
556         go/cmath/polar.go \
557         go/cmath/pow.go \
558         go/cmath/rect.go \
559         go/cmath/sin.go \
560         go/cmath/sqrt.go \
561         go/cmath/tan.go
562
563 go_crypto_files = \
564         go/crypto/crypto.go
565
566 go_csv_files = \
567         go/csv/reader.go \
568         go/csv/writer.go
569
570 go_exec_files = \
571         go/exec/exec.go \
572         go/exec/lp_unix.go
573
574 go_expvar_files = \
575         go/expvar/expvar.go
576
577 go_flag_files = \
578         go/flag/flag.go
579
580 go_fmt_files = \
581         go/fmt/doc.go \
582         go/fmt/format.go \
583         go/fmt/print.go \
584         go/fmt/scan.go
585
586 go_gob_files = \
587         go/gob/decode.go \
588         go/gob/decoder.go \
589         go/gob/doc.go \
590         go/gob/encode.go \
591         go/gob/encoder.go \
592         go/gob/error.go \
593         go/gob/type.go
594
595 go_hash_files = \
596         go/hash/hash.go
597
598 go_html_files = \
599         go/html/const.go \
600         go/html/doc.go \
601         go/html/entity.go \
602         go/html/escape.go \
603         go/html/node.go \
604         go/html/parse.go \
605         go/html/render.go \
606         go/html/token.go
607
608 go_http_files = \
609         go/http/chunked.go \
610         go/http/client.go \
611         go/http/cookie.go \
612         go/http/dump.go \
613         go/http/filetransport.go \
614         go/http/fs.go \
615         go/http/header.go \
616         go/http/lex.go \
617         go/http/persist.go \
618         go/http/request.go \
619         go/http/response.go \
620         go/http/reverseproxy.go \
621         go/http/server.go \
622         go/http/sniff.go \
623         go/http/status.go \
624         go/http/transfer.go \
625         go/http/transport.go
626
627 go_image_files = \
628         go/image/format.go \
629         go/image/geom.go \
630         go/image/image.go \
631         go/image/names.go
632
633 go_io_files = \
634         go/io/multi.go \
635         go/io/io.go \
636         go/io/pipe.go
637
638 go_json_files = \
639         go/json/decode.go \
640         go/json/encode.go \
641         go/json/indent.go \
642         go/json/scanner.go \
643         go/json/stream.go \
644         go/json/tags.go
645
646 go_log_files = \
647         go/log/log.go
648
649 go_math_files = \
650         go/math/abs.go \
651         go/math/acosh.go \
652         go/math/asin.go \
653         go/math/asinh.go \
654         go/math/atan.go \
655         go/math/atanh.go \
656         go/math/atan2.go \
657         go/math/bits.go \
658         go/math/cbrt.go \
659         go/math/const.go \
660         go/math/copysign.go \
661         go/math/dim.go \
662         go/math/erf.go \
663         go/math/exp.go \
664         go/math/exp_port.go \
665         go/math/exp2.go \
666         go/math/expm1.go \
667         go/math/floor.go \
668         go/math/frexp.go \
669         go/math/gamma.go \
670         go/math/hypot.go \
671         go/math/hypot_port.go \
672         go/math/j0.go \
673         go/math/j1.go \
674         go/math/jn.go \
675         go/math/ldexp.go \
676         go/math/lgamma.go \
677         go/math/log.go \
678         go/math/log1p.go \
679         go/math/log10.go \
680         go/math/logb.go \
681         go/math/mod.go \
682         go/math/modf.go \
683         go/math/nextafter.go \
684         go/math/pow.go \
685         go/math/pow10.go \
686         go/math/remainder.go \
687         go/math/signbit.go \
688         go/math/sin.go \
689         go/math/sincos.go \
690         go/math/sinh.go \
691         go/math/sqrt.go \
692         go/math/sqrt_port.go \
693         go/math/tan.go \
694         go/math/tanh.go \
695         go/math/unsafe.go
696
697 go_mail_files = \
698         go/mail/message.go
699
700 go_mime_files = \
701         go/mime/grammar.go \
702         go/mime/mediatype.go \
703         go/mime/type.go
704
705 if LIBGO_IS_RTEMS
706 go_net_fd_os_file = go/net/fd_select.go
707 go_net_newpollserver_file = go/net/newpollserver_rtems.go
708 else # !LIBGO_IS_RTEMS
709 if LIBGO_IS_LINUX
710 go_net_fd_os_file = go/net/fd_linux.go
711 go_net_newpollserver_file = go/net/newpollserver.go
712 else # !LIBGO_IS_LINUX && !LIBGO_IS_RTEMS
713 # By default use select with pipes.  Most systems should have
714 # something better.
715 go_net_fd_os_file = go/net/fd_select.go
716 go_net_newpollserver_file = go/net/newpollserver.go
717 endif # !LIBGO_IS_LINUX
718 endif # !LIBGO_IS_RTEMS
719
720 if LIBGO_IS_LINUX
721 go_net_cgo_file = go/net/cgo_linux.go
722 go_net_sock_file = go/net/sock_linux.go
723 else
724 if LIBGO_IS_IRIX
725 go_net_cgo_file = go/net/cgo_linux.go
726 go_net_sock_file = go/net/sock_linux.go
727 else
728 if LIBGO_IS_SOLARIS
729 go_net_cgo_file = go/net/cgo_linux.go
730 go_net_sock_file = go/net/sock_linux.go
731 else
732 go_net_cgo_file = go/net/cgo_bsd.go
733 go_net_sock_file = go/net/sock_bsd.go
734 endif
735 endif
736 endif
737
738 if LIBGO_IS_LINUX
739 go_net_sendfile_file = go/net/sendfile_linux.go
740 else
741 go_net_sendfile_file = go/net/sendfile_stub.go
742 endif
743
744 if LIBGO_IS_LINUX
745 go_net_interface_file = go/net/interface_linux.go
746 else
747 go_net_interface_file = go/net/interface_stub.go
748 endif
749
750 go_net_files = \
751         go/net/cgo_unix.go \
752         $(go_net_cgo_file) \
753         go/net/dial.go \
754         go/net/dnsclient.go \
755         go/net/dnsclient_unix.go \
756         go/net/dnsconfig.go \
757         go/net/dnsmsg.go \
758         $(go_net_newpollserver_file) \
759         go/net/fd.go \
760         $(go_net_fd_os_file) \
761         go/net/file.go \
762         go/net/hosts.go \
763         go/net/interface.go \
764         $(go_net_interface_file) \
765         go/net/ip.go \
766         go/net/iprawsock.go \
767         go/net/iprawsock_posix.go \
768         go/net/ipsock.go \
769         go/net/ipsock_posix.go \
770         go/net/lookup_unix.go \
771         go/net/net.go \
772         go/net/parse.go \
773         go/net/pipe.go \
774         go/net/port.go \
775         $(go_net_sendfile_file) \
776         go/net/sock.go \
777         $(go_net_sock_file) \
778         go/net/tcpsock.go \
779         go/net/tcpsock_posix.go \
780         go/net/udpsock.go \
781         go/net/udpsock_posix.go \
782         go/net/unixsock.go \
783         go/net/unixsock_posix.go
784
785 if LIBGO_IS_SOLARIS
786 if LIBGO_IS_386
787 go_os_dir_file = go/os/dir_largefile.go
788 else
789 if LIBGO_IS_SPARC
790 go_os_dir_file = go/os/dir_largefile.go
791 else
792 go_os_dir_file = go/os/dir_regfile.go
793 endif
794 endif
795 else
796 if LIBGO_IS_LINUX
797 go_os_dir_file = go/os/dir_largefile.go
798 else
799 go_os_dir_file = go/os/dir_regfile.go
800 endif
801 endif
802
803 if LIBGO_IS_LINUX
804 go_os_sys_file = go/os/sys_linux.go
805 else
806 if LIBGO_IS_SOLARIS
807 go_os_sys_file = go/os/sys_uname.go
808 else
809 if LIBGO_IS_IRIX
810 go_os_sys_file = go/os/sys_uname.go
811 else
812 if LIBGO_IS_RTEMS
813 go_os_sys_file = go/os/sys_uname.go
814 else
815 go_os_sys_file = go/os/sys_bsd.go
816 endif
817 endif
818 endif
819 endif
820
821 go_os_files = \
822         $(go_os_dir_file) \
823         go/os/dir.go \
824         go/os/env.go \
825         go/os/env_unix.go \
826         go/os/error.go \
827         go/os/error_posix.go \
828         go/os/exec.go \
829         go/os/exec_posix.go \
830         go/os/exec_unix.go \
831         go/os/file.go \
832         go/os/file_posix.go \
833         go/os/file_unix.go \
834         go/os/getwd.go \
835         go/os/path.go \
836         go/os/path_unix.go \
837         go/os/proc.go \
838         go/os/stat.go \
839         go/os/str.go \
840         $(go_os_sys_file) \
841         go/os/time.go \
842         go/os/types.go \
843         signal_unix.go
844
845 go_patch_files = \
846         go/patch/apply.go \
847         go/patch/git.go \
848         go/patch/patch.go \
849         go/patch/textdiff.go
850
851 go_path_files = \
852         go/path/match.go \
853         go/path/path.go
854
855 go_rand_files = \
856         go/rand/exp.go \
857         go/rand/normal.go \
858         go/rand/rand.go \
859         go/rand/rng.go \
860         go/rand/zipf.go
861
862 go_reflect_files = \
863         go/reflect/deepequal.go \
864         go/reflect/type.go \
865         go/reflect/value.go
866
867 go_regexp_files = \
868         go/regexp/exec.go \
869         go/regexp/regexp.go
870
871 go_rpc_files = \
872         go/rpc/client.go \
873         go/rpc/debug.go \
874         go/rpc/server.go
875
876 go_runtime_files = \
877         go/runtime/debug.go \
878         go/runtime/error.go \
879         go/runtime/extern.go \
880         go/runtime/mem.go \
881         go/runtime/sig.go \
882         go/runtime/softfloat64.go \
883         go/runtime/type.go \
884         version.go
885
886 version.go: s-version; @true
887 s-version: Makefile
888         rm -f version.go.tmp
889         echo "package runtime" > version.go.tmp
890         echo 'const defaultGoroot = "$(prefix)"' >> version.go.tmp
891         echo 'const theVersion = "'`$(CC) --version | sed 1q`'"' >> version.go.tmp
892         echo 'const theGoarch = "'$(GOARCH)'"' >> version.go.tmp
893         echo 'const theGoos = "'$(GOOS)'"' >> version.go.tmp
894         $(SHELL) $(srcdir)/../move-if-change version.go.tmp version.go
895         $(STAMP) $@
896
897 go_scanner_files = \
898         go/scanner/scanner.go
899
900 go_smtp_files = \
901         go/smtp/auth.go \
902         go/smtp/smtp.go
903
904 go_sort_files = \
905         go/sort/search.go \
906         go/sort/sort.go
907
908 go_strconv_files = \
909         go/strconv/atob.go \
910         go/strconv/atof.go \
911         go/strconv/atoi.go \
912         go/strconv/decimal.go \
913         go/strconv/ftoa.go \
914         go/strconv/itoa.go \
915         go/strconv/quote.go
916
917 go_strings_files = \
918         go/strings/reader.go \
919         go/strings/replace.go \
920         go/strings/strings.go
921
922 go_sync_files = \
923         go/sync/cond.go \
924         go/sync/mutex.go \
925         go/sync/once.go \
926         go/sync/rwmutex.go \
927         go/sync/waitgroup.go
928
929 if LIBGO_IS_SOLARIS
930 go_syslog_file = go/syslog/syslog_libc.go
931 else
932 if LIBGO_IS_IRIX
933 go_syslog_file = go/syslog/syslog_libc.go
934 else
935 go_syslog_file = go/syslog/syslog_unix.go
936 endif
937 endif
938
939 go_syslog_files = \
940         go/syslog/syslog.go \
941         $(go_syslog_file)
942 go_syslog_c_files = \
943         go/syslog/syslog_c.c
944
945 go_tabwriter_files = \
946         go/tabwriter/tabwriter.go
947
948 go_template_files = \
949         go/template/doc.go \
950         go/template/exec.go \
951         go/template/funcs.go \
952         go/template/helper.go \
953         go/template/parse.go \
954         go/template/set.go
955
956 go_testing_files = \
957         go/testing/benchmark.go \
958         go/testing/example.go \
959         go/testing/testing.go
960
961 go_time_files = \
962         go/time/format.go \
963         go/time/sleep.go \
964         go/time/sys.go \
965         go/time/sys_unix.go \
966         go/time/tick.go \
967         go/time/time.go \
968         go/time/zoneinfo_posix.go \
969         go/time/zoneinfo_unix.go
970
971 go_unicode_files = \
972         go/unicode/casetables.go \
973         go/unicode/digit.go \
974         go/unicode/graphic.go \
975         go/unicode/letter.go \
976         go/unicode/tables.go
977
978 go_url_files = \
979         go/url/url.go
980
981 go_utf16_files = \
982         go/utf16/utf16.go
983
984 go_utf8_files = \
985         go/utf8/string.go \
986         go/utf8/utf8.go
987
988 go_websocket_files = \
989         go/websocket/client.go \
990         go/websocket/hixie.go \
991         go/websocket/hybi.go \
992         go/websocket/server.go \
993         go/websocket/websocket.go
994
995 go_xml_files = \
996         go/xml/marshal.go \
997         go/xml/read.go \
998         go/xml/xml.go
999
1000 go_archive_tar_files = \
1001         go/archive/tar/common.go \
1002         go/archive/tar/reader.go \
1003         go/archive/tar/writer.go
1004
1005 go_archive_zip_files = \
1006         go/archive/zip/reader.go \
1007         go/archive/zip/struct.go \
1008         go/archive/zip/writer.go
1009
1010 go_compress_bzip2_files = \
1011         go/compress/bzip2/bit_reader.go \
1012         go/compress/bzip2/bzip2.go \
1013         go/compress/bzip2/huffman.go \
1014         go/compress/bzip2/move_to_front.go
1015
1016 go_compress_flate_files = \
1017         go/compress/flate/deflate.go \
1018         go/compress/flate/huffman_bit_writer.go \
1019         go/compress/flate/huffman_code.go \
1020         go/compress/flate/inflate.go \
1021         go/compress/flate/reverse_bits.go \
1022         go/compress/flate/token.go \
1023         go/compress/flate/util.go
1024
1025 go_compress_gzip_files = \
1026         go/compress/gzip/gzip.go \
1027         go/compress/gzip/gunzip.go
1028
1029 go_compress_lzw_files = \
1030         go/compress/lzw/reader.go \
1031         go/compress/lzw/writer.go
1032
1033 go_compress_zlib_files = \
1034         go/compress/zlib/reader.go \
1035         go/compress/zlib/writer.go
1036
1037 go_container_heap_files = \
1038         go/container/heap/heap.go
1039
1040 go_container_list_files = \
1041         go/container/list/list.go
1042
1043 go_container_ring_files = \
1044         go/container/ring/ring.go
1045
1046 go_crypto_aes_files = \
1047         go/crypto/aes/block.go \
1048         go/crypto/aes/cipher.go \
1049         go/crypto/aes/const.go
1050 go_crypto_bcrypt_files = \
1051         go/crypto/bcrypt/base64.go \
1052         go/crypto/bcrypt/bcrypt.go
1053 go_crypto_blowfish_files = \
1054         go/crypto/blowfish/block.go \
1055         go/crypto/blowfish/const.go \
1056         go/crypto/blowfish/cipher.go
1057 go_crypto_cast5_files = \
1058         go/crypto/cast5/cast5.go
1059 go_crypto_cipher_files = \
1060         go/crypto/cipher/cbc.go \
1061         go/crypto/cipher/cfb.go \
1062         go/crypto/cipher/cipher.go \
1063         go/crypto/cipher/ctr.go \
1064         go/crypto/cipher/io.go \
1065         go/crypto/cipher/ocfb.go \
1066         go/crypto/cipher/ofb.go
1067 go_crypto_des_files = \
1068         go/crypto/des/block.go \
1069         go/crypto/des/cipher.go \
1070         go/crypto/des/const.go
1071 go_crypto_dsa_files = \
1072         go/crypto/dsa/dsa.go
1073 go_crypto_ecdsa_files = \
1074         go/crypto/ecdsa/ecdsa.go
1075 go_crypto_elliptic_files = \
1076         go/crypto/elliptic/elliptic.go
1077 go_crypto_hmac_files = \
1078         go/crypto/hmac/hmac.go
1079 go_crypto_md4_files = \
1080         go/crypto/md4/md4.go \
1081         go/crypto/md4/md4block.go
1082 go_crypto_md5_files = \
1083         go/crypto/md5/md5.go \
1084         go/crypto/md5/md5block.go
1085 go_crypto_ocsp_files = \
1086         go/crypto/ocsp/ocsp.go
1087 go_crypto_openpgp_files = \
1088         go/crypto/openpgp/canonical_text.go \
1089         go/crypto/openpgp/keys.go \
1090         go/crypto/openpgp/read.go \
1091         go/crypto/openpgp/write.go
1092 go_crypto_rand_files = \
1093         go/crypto/rand/rand.go \
1094         go/crypto/rand/rand_unix.go \
1095         go/crypto/rand/util.go
1096 go_crypto_rc4_files = \
1097         go/crypto/rc4/rc4.go
1098 go_crypto_ripemd160_files = \
1099         go/crypto/ripemd160/ripemd160.go \
1100         go/crypto/ripemd160/ripemd160block.go
1101 go_crypto_rsa_files = \
1102         go/crypto/rsa/pkcs1v15.go \
1103         go/crypto/rsa/rsa.go
1104 go_crypto_sha1_files = \
1105         go/crypto/sha1/sha1.go \
1106         go/crypto/sha1/sha1block.go
1107 go_crypto_sha256_files = \
1108         go/crypto/sha256/sha256.go \
1109         go/crypto/sha256/sha256block.go
1110 go_crypto_sha512_files = \
1111         go/crypto/sha512/sha512.go \
1112         go/crypto/sha512/sha512block.go
1113 go_crypto_subtle_files = \
1114         go/crypto/subtle/constant_time.go
1115 go_crypto_tls_files = \
1116         go/crypto/tls/alert.go \
1117         go/crypto/tls/cipher_suites.go \
1118         go/crypto/tls/common.go \
1119         go/crypto/tls/conn.go \
1120         go/crypto/tls/handshake_client.go \
1121         go/crypto/tls/handshake_messages.go \
1122         go/crypto/tls/handshake_server.go \
1123         go/crypto/tls/key_agreement.go \
1124         go/crypto/tls/prf.go \
1125         go/crypto/tls/root_unix.go \
1126         go/crypto/tls/tls.go
1127 go_crypto_twofish_files = \
1128         go/crypto/twofish/twofish.go
1129 go_crypto_x509_files = \
1130         go/crypto/x509/cert_pool.go \
1131         go/crypto/x509/pkcs1.go \
1132         go/crypto/x509/verify.go \
1133         go/crypto/x509/x509.go
1134 go_crypto_xtea_files = \
1135         go/crypto/xtea/block.go \
1136         go/crypto/xtea/cipher.go
1137
1138 go_crypto_openpgp_armor_files = \
1139         go/crypto/openpgp/armor/armor.go \
1140         go/crypto/openpgp/armor/encode.go
1141 go_crypto_openpgp_elgamal_files = \
1142         go/crypto/openpgp/elgamal/elgamal.go
1143 go_crypto_openpgp_error_files = \
1144         go/crypto/openpgp/error/error.go
1145 go_crypto_openpgp_packet_files = \
1146         go/crypto/openpgp/packet/compressed.go \
1147         go/crypto/openpgp/packet/encrypted_key.go \
1148         go/crypto/openpgp/packet/literal.go \
1149         go/crypto/openpgp/packet/one_pass_signature.go \
1150         go/crypto/openpgp/packet/packet.go \
1151         go/crypto/openpgp/packet/private_key.go \
1152         go/crypto/openpgp/packet/public_key.go \
1153         go/crypto/openpgp/packet/reader.go \
1154         go/crypto/openpgp/packet/signature.go \
1155         go/crypto/openpgp/packet/symmetric_key_encrypted.go \
1156         go/crypto/openpgp/packet/symmetrically_encrypted.go \
1157         go/crypto/openpgp/packet/userid.go
1158 go_crypto_openpgp_s2k_files = \
1159         go/crypto/openpgp/s2k/s2k.go
1160
1161 go_crypto_x509_pkix_files = \
1162         go/crypto/x509/pkix/pkix.go
1163
1164 go_debug_dwarf_files = \
1165         go/debug/dwarf/buf.go \
1166         go/debug/dwarf/const.go \
1167         go/debug/dwarf/entry.go \
1168         go/debug/dwarf/open.go \
1169         go/debug/dwarf/type.go \
1170         go/debug/dwarf/unit.go
1171 go_debug_elf_files = \
1172         go/debug/elf/elf.go \
1173         go/debug/elf/file.go
1174 go_debug_gosym_files = \
1175         go/debug/gosym/pclntab.go \
1176         go/debug/gosym/symtab.go
1177 go_debug_macho_files = \
1178         go/debug/macho/file.go \
1179         go/debug/macho/macho.go
1180 go_debug_pe_files = \
1181         go/debug/pe/file.go \
1182         go/debug/pe/pe.go
1183
1184 go_encoding_ascii85_files = \
1185         go/encoding/ascii85/ascii85.go
1186 go_encoding_base32_files = \
1187         go/encoding/base32/base32.go
1188 go_encoding_base64_files = \
1189         go/encoding/base64/base64.go
1190 go_encoding_binary_files = \
1191         go/encoding/binary/binary.go \
1192         go/encoding/binary/varint.go
1193 go_encoding_git85_files = \
1194         go/encoding/git85/git.go
1195 go_encoding_hex_files = \
1196         go/encoding/hex/hex.go
1197 go_encoding_pem_files = \
1198         go/encoding/pem/pem.go
1199
1200 go_exp_ebnf_files = \
1201         go/exp/ebnf/ebnf.go \
1202         go/exp/ebnf/parser.go
1203 go_exp_gui_files = \
1204         go/exp/gui/gui.go
1205 go_exp_norm_files = \
1206         go/exp/norm/composition.go \
1207         go/exp/norm/forminfo.go \
1208         go/exp/norm/input.go \
1209         go/exp/norm/normalize.go \
1210         go/exp/norm/readwriter.go \
1211         go/exp/norm/tables.go \
1212         go/exp/norm/trie.go
1213 go_exp_spdy_files = \
1214         go/exp/spdy/read.go \
1215         go/exp/spdy/types.go \
1216         go/exp/spdy/write.go
1217 go_exp_sql_files = \
1218         go/exp/sql/convert.go \
1219         go/exp/sql/sql.go
1220 go_exp_ssh_files = \
1221         go/exp/ssh/channel.go \
1222         go/exp/ssh/common.go \
1223         go/exp/ssh/doc.go \
1224         go/exp/ssh/messages.go \
1225         go/exp/ssh/server.go \
1226         go/exp/ssh/server_shell.go \
1227         go/exp/ssh/transport.go
1228 go_exp_terminal_files = \
1229         go/exp/terminal/shell.go \
1230         go/exp/terminal/terminal.go
1231 go_exp_types_files = \
1232         go/exp/types/check.go \
1233         go/exp/types/const.go \
1234         go/exp/types/exportdata.go \
1235         go/exp/types/gcimporter.go \
1236         go/exp/types/types.go \
1237         go/exp/types/universe.go
1238
1239 go_exp_gui_x11_files = \
1240         go/exp/gui/x11/auth.go \
1241         go/exp/gui/x11/conn.go
1242
1243 go_exp_sql_driver_files = \
1244         go/exp/sql/driver/driver.go \
1245         go/exp/sql/driver/types.go
1246
1247 go_exp_template_html_files = \
1248         go/exp/template/html/attr.go \
1249         go/exp/template/html/clone.go \
1250         go/exp/template/html/content.go \
1251         go/exp/template/html/context.go \
1252         go/exp/template/html/css.go \
1253         go/exp/template/html/doc.go \
1254         go/exp/template/html/error.go \
1255         go/exp/template/html/escape.go \
1256         go/exp/template/html/html.go \
1257         go/exp/template/html/js.go \
1258         go/exp/template/html/transition.go \
1259         go/exp/template/html/url.go
1260
1261 go_go_ast_files = \
1262         go/go/ast/ast.go \
1263         go/go/ast/filter.go \
1264         go/go/ast/print.go \
1265         go/go/ast/resolve.go \
1266         go/go/ast/scope.go \
1267         go/go/ast/walk.go
1268 go_go_build_files = \
1269         go/go/build/build.go \
1270         go/go/build/dir.go \
1271         go/go/build/path.go \
1272         syslist.go
1273 go_go_doc_files = \
1274         go/go/doc/comment.go \
1275         go/go/doc/doc.go \
1276         go/go/doc/example.go
1277 go_go_parser_files = \
1278         go/go/parser/interface.go \
1279         go/go/parser/parser.go
1280 go_go_printer_files = \
1281         go/go/printer/nodes.go \
1282         go/go/printer/printer.go
1283 go_go_scanner_files = \
1284         go/go/scanner/errors.go \
1285         go/go/scanner/scanner.go
1286 go_go_token_files = \
1287         go/go/token/position.go \
1288         go/go/token/serialize.go \
1289         go/go/token/token.go
1290
1291 go_hash_adler32_files = \
1292         go/hash/adler32/adler32.go
1293 go_hash_crc32_files = \
1294         go/hash/crc32/crc32.go \
1295         go/hash/crc32/crc32_generic.go
1296 go_hash_crc64_files = \
1297         go/hash/crc64/crc64.go
1298 go_hash_fnv_files = \
1299         go/hash/fnv/fnv.go
1300
1301 go_http_cgi_files = \
1302         go/http/cgi/child.go \
1303         go/http/cgi/host.go
1304 go_http_fcgi_files = \
1305         go/http/fcgi/child.go \
1306         go/http/fcgi/fcgi.go
1307 go_http_httptest_files = \
1308         go/http/httptest/recorder.go \
1309         go/http/httptest/server.go
1310 go_http_pprof_files = \
1311         go/http/pprof/pprof.go
1312
1313 go_image_bmp_files = \
1314         go/image/bmp/reader.go
1315
1316 go_image_color_files = \
1317         go/image/color/color.go
1318
1319 go_image_draw_files = \
1320         go/image/draw/draw.go
1321
1322 go_image_gif_files = \
1323         go/image/gif/reader.go
1324
1325 go_image_jpeg_files = \
1326         go/image/jpeg/fdct.go \
1327         go/image/jpeg/huffman.go \
1328         go/image/jpeg/idct.go \
1329         go/image/jpeg/reader.go \
1330         go/image/jpeg/writer.go
1331
1332 go_image_png_files = \
1333         go/image/png/reader.go \
1334         go/image/png/writer.go
1335
1336 go_image_tiff_files = \
1337         go/image/tiff/buffer.go \
1338         go/image/tiff/compress.go \
1339         go/image/tiff/consts.go \
1340         go/image/tiff/reader.go
1341
1342 go_image_ycbcr_files = \
1343         go/image/ycbcr/ycbcr.go
1344
1345 go_index_suffixarray_files = \
1346         go/index/suffixarray/qsufsort.go \
1347         go/index/suffixarray/suffixarray.go
1348
1349 go_io_ioutil_files = \
1350         go/io/ioutil/ioutil.go \
1351         go/io/ioutil/tempfile.go
1352
1353 go_mime_multipart_files = \
1354         go/mime/multipart/formdata.go \
1355         go/mime/multipart/multipart.go \
1356         go/mime/multipart/writer.go
1357
1358 go_net_dict_files = \
1359         go/net/dict/dict.go
1360
1361 go_net_textproto_files = \
1362         go/net/textproto/header.go \
1363         go/net/textproto/pipeline.go \
1364         go/net/textproto/reader.go \
1365         go/net/textproto/textproto.go \
1366         go/net/textproto/writer.go
1367
1368 go_old_netchan_files = \
1369         go/old/netchan/common.go \
1370         go/old/netchan/export.go \
1371         go/old/netchan/import.go
1372 go_old_regexp_files = \
1373         go/old/regexp/regexp.go
1374 go_old_template_files = \
1375         go/old/template/doc.go \
1376         go/old/template/execute.go \
1377         go/old/template/format.go \
1378         go/old/template/parse.go
1379
1380 go_os_inotify_files = \
1381         go/os/inotify/inotify_linux.go
1382
1383 go_os_user_files = \
1384         go/os/user/user.go \
1385         go/os/user/lookup_unix.go
1386
1387 go_os_signal_files = \
1388         go/os/signal/signal.go
1389
1390 go_path_filepath_files = \
1391         go/path/filepath/match.go \
1392         go/path/filepath/path.go \
1393         go/path/filepath/path_unix.go
1394
1395 go_regexp_syntax_files = \
1396         go/regexp/syntax/compile.go \
1397         go/regexp/syntax/parse.go \
1398         go/regexp/syntax/perl_groups.go \
1399         go/regexp/syntax/prog.go \
1400         go/regexp/syntax/regexp.go \
1401         go/regexp/syntax/simplify.go
1402
1403 go_rpc_jsonrpc_files = \
1404         go/rpc/jsonrpc/client.go \
1405         go/rpc/jsonrpc/server.go
1406
1407 go_runtime_debug_files = \
1408         go/runtime/debug/stack.go
1409 go_runtime_pprof_files = \
1410         go/runtime/pprof/pprof.go
1411
1412 go_template_parse_files = \
1413         go/template/parse/lex.go \
1414         go/template/parse/node.go \
1415         go/template/parse/parse.go \
1416         go/template/parse/set.go
1417
1418 go_sync_atomic_files = \
1419         go/sync/atomic/doc.go
1420 go_sync_atomic_c_files = \
1421         go/sync/atomic/atomic.c
1422
1423 go_testing_iotest_files = \
1424         go/testing/iotest/logger.go \
1425         go/testing/iotest/reader.go \
1426         go/testing/iotest/writer.go
1427 go_testing_quick_files = \
1428         go/testing/quick/quick.go
1429 go_testing_script_files = \
1430         go/testing/script/script.go
1431
1432 # Define Syscall and Syscall6.
1433 if LIBGO_IS_RTEMS
1434 syscall_syscall_file = go/syscall/syscall_stubs.go
1435 else
1436 syscall_syscall_file = go/syscall/syscall_unix.go
1437 endif
1438
1439 # Define ForkExec and Exec.
1440 if LIBGO_IS_RTEMS
1441 syscall_exec_file = go/syscall/exec_stubs.go
1442 else
1443 syscall_exec_file = go/syscall/exec_unix.go
1444 endif
1445
1446 # Define Wait4.
1447 if HAVE_WAIT4
1448 syscall_wait_file = go/syscall/libcall_wait4.go
1449 else
1450 syscall_wait_file = go/syscall/libcall_waitpid.go
1451 endif
1452
1453 # Define Sleep.
1454 if LIBGO_IS_RTEMS
1455 syscall_sleep_file = go/syscall/sleep_rtems.go
1456 else
1457 syscall_sleep_file = go/syscall/sleep_select.go
1458 endif
1459
1460 # Define Errstr.
1461 if LIBGO_IS_LINUX
1462 syscall_errstr_file = go/syscall/errstr_linux.go
1463 else
1464 if LIBGO_IS_RTEMS
1465 syscall_errstr_file = go/syscall/errstr_linux.go
1466 else
1467 if HAVE_STRERROR_R
1468 syscall_errstr_file = go/syscall/errstr.go
1469 else
1470 syscall_errstr_file = go/syscall/errstr_nor.go
1471 endif
1472 endif
1473 endif
1474
1475 # Declare libc functions that vary for largefile systems.
1476 if LIBGO_IS_LINUX
1477 # Always use lseek64 on GNU/Linux.
1478 syscall_size_file = go/syscall/libcall_posix_largefile.go
1479 else # !LIBGO_IS_LINUX
1480 if LIBGO_IS_SOLARIS
1481 if LIBGO_IS_386
1482 # Use lseek64 on 32-bit Solaris/x86.
1483 syscall_size_file = go/syscall/libcall_posix_largefile.go
1484 else # !LIBGO_IS_386
1485 if LIBGO_IS_SPARC
1486 # Use lseek64 on 32-bit Solaris/SPARC.
1487 syscall_size_file = go/syscall/libcall_posix_largefile.go
1488 else # !LIBGO_IS_386 && !LIBGO_IS_SPARC
1489 # Use lseek on 64-bit Solaris.
1490 syscall_size_file = go/syscall/libcall_posix_regfile.go
1491 endif # !LIBGO_IS_386 && !LIBGO_IS_SPARC
1492 endif # !LIBGO_IS_SOLARIS
1493 else # !LIBGO_IS_LINUX && !LIBGO_IS_SOLARIS
1494 # Use lseek by default.
1495 syscall_size_file = go/syscall/libcall_posix_regfile.go
1496 endif # !LIBGO_IS_SOLARIS
1497 endif # !LIBGO_IS_LINUX
1498
1499 # Define socket sizes and types.
1500 if LIBGO_IS_LINUX
1501 syscall_socket_file = go/syscall/socket_linux.go
1502 else
1503 if LIBGO_IS_SOLARIS
1504 syscall_socket_file = go/syscall/socket_solaris.go
1505 else
1506 if LIBGO_IS_IRIX
1507 syscall_socket_file = go/syscall/socket_irix.go
1508 else
1509 syscall_socket_file = go/syscall/socket_bsd.go
1510 endif
1511 endif
1512 endif
1513
1514 # Support for uname.
1515 if LIBGO_IS_SOLARIS
1516 if LIBGO_IS_386
1517 # 32-bit Solaris 2/x86 needs _nuname, handled in libcall_solaris_386.go.
1518 syscall_uname_file =
1519 else # !LIBGO_IS_386 && LIBGO_IS_SOLARIS
1520 syscall_uname_file = go/syscall/libcall_uname.go
1521 endif
1522 else # !LIBGO_IS_SOLARIS
1523 syscall_uname_file = go/syscall/libcall_uname.go
1524 endif
1525
1526 # Support for netlink sockets and messages.
1527 if LIBGO_IS_LINUX
1528 syscall_netlink_file = go/syscall/netlink_linux.go
1529 else
1530 syscall_netlink_file =
1531 endif
1532
1533 go_base_syscall_files = \
1534         go/syscall/libcall_support.go \
1535         go/syscall/libcall_posix.go \
1536         go/syscall/socket.go \
1537         go/syscall/str.go \
1538         go/syscall/syscall.go \
1539         $(syscall_syscall_file) \
1540         $(syscall_exec_file) \
1541         $(syscall_wait_file) \
1542         $(syscall_sleep_file) \
1543         $(syscall_errstr_file) \
1544         $(syscall_size_file) \
1545         $(syscall_socket_file) \
1546         $(syscall_uname_file) \
1547         $(syscall_netlink_file) \
1548         $(GO_LIBCALL_OS_FILE) \
1549         $(GO_LIBCALL_OS_ARCH_FILE) \
1550         $(GO_SYSCALL_OS_FILE) \
1551         $(GO_SYSCALL_OS_ARCH_FILE)
1552
1553 go_syscall_files = \
1554         $(go_base_syscall_files) \
1555         libcalls.go \
1556         sysinfo.go \
1557         syscall_arch.go
1558 go_syscall_c_files = \
1559         go/syscall/errno.c \
1560         go/syscall/wait.c
1561
1562 libcalls.go: s-libcalls; @true
1563 s-libcalls: Makefile go/syscall/mksyscall.awk $(go_base_syscall_files)
1564         rm -f libcalls.go.tmp
1565         files=`echo $^ | sed -e 's/Makefile//' -e 's|[^ ]*go/syscall/mksyscall.awk||'`; \
1566         $(AWK) -f $(srcdir)/go/syscall/mksyscall.awk $${files} > libcalls.go.tmp
1567         $(SHELL) $(srcdir)/../move-if-change libcalls.go.tmp libcalls.go
1568         $(STAMP) $@
1569
1570 syscall_arch.go: s-syscall_arch; @true
1571 s-syscall_arch: Makefile
1572         rm -f syscall_arch.go.tmp
1573         echo "package syscall" > syscall_arch.go.tmp
1574         echo 'const ARCH = "'$(GOARCH)'"' >> syscall_arch.go.tmp
1575         echo 'const OS = "'$(GOOS)'"' >> syscall_arch.go.tmp
1576         $(SHELL) $(srcdir)/../move-if-change syscall_arch.go.tmp syscall_arch.go
1577         $(STAMP) $@
1578
1579 sysinfo.go: s-sysinfo; @true
1580 s-sysinfo: $(srcdir)/mksysinfo.sh config.h
1581         CC="$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(OSCFLAGS)" $(SHELL) $(srcdir)/mksysinfo.sh
1582         $(SHELL) $(srcdir)/../move-if-change tmp-sysinfo.go sysinfo.go
1583         $(STAMP) $@
1584
1585 if LIBGO_IS_LINUX
1586 # os_lib_inotify_lo = os/inotify.lo
1587 os_lib_inotify_lo =
1588 else
1589 os_lib_inotify_lo =
1590 endif
1591
1592 libgo_go_objs = \
1593         asn1/asn1.lo \
1594         big/big.lo \
1595         bufio/bufio.lo \
1596         bytes/bytes.lo \
1597         bytes/index.lo \
1598         cmath/cmath.lo \
1599         crypto/crypto.lo \
1600         csv/csv.lo \
1601         exec/exec.lo \
1602         expvar/expvar.lo \
1603         flag/flag.lo \
1604         fmt/fmt.lo \
1605         gob/gob.lo \
1606         hash/hash.lo \
1607         html/html.lo \
1608         http/http.lo \
1609         image/image.lo \
1610         io/io.lo \
1611         json/json.lo \
1612         log/log.lo \
1613         math/math.lo \
1614         mail/mail.lo \
1615         mime/mime.lo \
1616         net/net.lo \
1617         os/os.lo \
1618         patch/patch.lo \
1619         path/path.lo \
1620         rand/rand.lo \
1621         reflect/reflect.lo \
1622         regexp/regexp.lo \
1623         rpc/rpc.lo \
1624         runtime/runtime.lo \
1625         scanner/scanner.lo \
1626         smtp/smtp.lo \
1627         sort/sort.lo \
1628         strconv/strconv.lo \
1629         strings/strings.lo \
1630         sync/sync.lo \
1631         syslog/syslog.lo \
1632         syslog/syslog_c.lo \
1633         tabwriter/tabwriter.lo \
1634         template/template.lo \
1635         time/time.lo \
1636         unicode/unicode.lo \
1637         url/url.lo \
1638         utf16/utf16.lo \
1639         utf8/utf8.lo \
1640         websocket/websocket.lo \
1641         xml/xml.lo \
1642         archive/tar.lo \
1643         archive/zip.lo \
1644         compress/bzip2.lo \
1645         compress/flate.lo \
1646         compress/gzip.lo \
1647         compress/lzw.lo \
1648         compress/zlib.lo \
1649         container/heap.lo \
1650         container/list.lo \
1651         container/ring.lo \
1652         crypto/aes.lo \
1653         crypto/bcrypt.lo \
1654         crypto/blowfish.lo \
1655         crypto/cast5.lo \
1656         crypto/cipher.lo \
1657         crypto/des.lo \
1658         crypto/dsa.lo \
1659         crypto/ecdsa.lo \
1660         crypto/elliptic.lo \
1661         crypto/hmac.lo \
1662         crypto/md4.lo \
1663         crypto/md5.lo \
1664         crypto/ocsp.lo \
1665         crypto/openpgp.lo \
1666         crypto/rand.lo \
1667         crypto/rc4.lo \
1668         crypto/ripemd160.lo \
1669         crypto/rsa.lo \
1670         crypto/sha1.lo \
1671         crypto/sha256.lo \
1672         crypto/sha512.lo \
1673         crypto/subtle.lo \
1674         crypto/tls.lo \
1675         crypto/twofish.lo \
1676         crypto/x509.lo \
1677         crypto/xtea.lo \
1678         crypto/openpgp/armor.lo \
1679         crypto/openpgp/elgamal.lo \
1680         crypto/openpgp/error.lo \
1681         crypto/openpgp/packet.lo \
1682         crypto/openpgp/s2k.lo \
1683         crypto/x509/pkix.lo \
1684         debug/dwarf.lo \
1685         debug/elf.lo \
1686         debug/gosym.lo \
1687         debug/macho.lo \
1688         debug/pe.lo \
1689         encoding/ascii85.lo \
1690         encoding/base32.lo \
1691         encoding/base64.lo \
1692         encoding/binary.lo \
1693         encoding/git85.lo \
1694         encoding/hex.lo \
1695         encoding/pem.lo \
1696         exp/ebnf.lo \
1697         exp/gui.lo \
1698         exp/norm.lo \
1699         exp/spdy.lo \
1700         exp/sql.lo \
1701         exp/ssh.lo \
1702         exp/terminal.lo \
1703         exp/types.lo \
1704         exp/gui/x11.lo \
1705         exp/sql/driver.lo \
1706         exp/template/html.lo \
1707         go/ast.lo \
1708         go/build.lo \
1709         go/doc.lo \
1710         go/parser.lo \
1711         go/printer.lo \
1712         go/scanner.lo \
1713         go/token.lo \
1714         hash/adler32.lo \
1715         hash/crc32.lo \
1716         hash/crc64.lo \
1717         hash/fnv.lo \
1718         http/cgi.lo \
1719         http/fcgi.lo \
1720         http/httptest.lo \
1721         http/pprof.lo \
1722         image/bmp.lo \
1723         image/color.lo \
1724         image/draw.lo \
1725         image/gif.lo \
1726         image/jpeg.lo \
1727         image/png.lo \
1728         image/tiff.lo \
1729         image/ycbcr.lo \
1730         index/suffixarray.lo \
1731         io/ioutil.lo \
1732         mime/multipart.lo \
1733         net/dict.lo \
1734         net/textproto.lo \
1735         old/netchan.lo \
1736         old/regexp.lo \
1737         old/template.lo \
1738         $(os_lib_inotify_lo) \
1739         os/user.lo \
1740         os/signal.lo \
1741         path/filepath.lo \
1742         regexp/syntax.lo \
1743         rpc/jsonrpc.lo \
1744         runtime/debug.lo \
1745         runtime/pprof.lo \
1746         sync/atomic.lo \
1747         sync/atomic_c.lo \
1748         syscall/syscall.lo \
1749         syscall/errno.lo \
1750         syscall/wait.lo \
1751         template/parse.lo \
1752         testing/testing.lo \
1753         testing/iotest.lo \
1754         testing/quick.lo \
1755         testing/script.lo
1756
1757 libgo_la_SOURCES = $(runtime_files)
1758
1759 libgo_la_LDFLAGS = $(PTHREAD_CFLAGS) $(AM_LDFLAGS)
1760
1761 libgo_la_LIBADD = \
1762         $(libgo_go_objs) $(LIBFFI) $(PTHREAD_LIBS) $(MATH_LIBS) $(NET_LIBS)
1763
1764 libgobegin_a_SOURCES = \
1765         runtime/go-main.c
1766
1767 LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/../libtool-ldflags $(LDFLAGS))
1768
1769 GOCFLAGS = $(CFLAGS)
1770 AM_GOCFLAGS = $(STRINGOPS_FLAG)
1771 GOCOMPILE = $(GOC) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_GOCFLAGS) $(GOCFLAGS)
1772
1773 LTGOCOMPILE = $(LIBTOOL) --tag GO --mode=compile $(GOC) $(INCLUDES) \
1774         $(AM_GOCFLAGS) $(GOCFLAGS)
1775
1776 GOLINK = $(LIBTOOL) --tag GO --mode-link $(GOC) \
1777         $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_GOCFLAGS) $(LTLDFLAGS) -o $@
1778
1779 # Build the .go files for a package, generating a .lo file.
1780 BUILDPACKAGE = \
1781         $(MKDIR_P) $(@D); \
1782         files=`echo $^ | sed -e 's/[^ ]*\.gox//g'`; \
1783         $(LTGOCOMPILE) -I . -c -fgo-prefix="libgo_$(@D)" -o $@ $$files
1784
1785 if LIBGO_IS_RTEMS
1786 use_dejagnu = yes
1787 else
1788 use_dejagnu = no
1789 endif
1790
1791 GOTESTFLAGS =
1792
1793 # Check a package.
1794 CHECK = \
1795         GC="$(GOC) $(GOCFLAGS) -L `${PWD_COMMAND}` -L `${PWD_COMMAND}`/.libs"; \
1796         export GC; \
1797         GOLIBS="$(MATH_LIBS) $(NET_LIBS)"; \
1798         export GOLIBS; \
1799         RUNTESTFLAGS="$(RUNTESTFLAGS)"; \
1800         export RUNTESTFLAGS; \
1801         MAKE="$(MAKE)"; \
1802         export MAKE; \
1803         libgccdir=`${GOC} -print-libgcc-file-name | sed -e 's|/[^/]*$$||'`; \
1804         LD_LIBRARY_PATH="`${PWD_COMMAND}`/.libs:$${libgccdir}:${LD_LIBRARY_PATH}"; \
1805         LD_LIBRARY_PATH=`echo $${LD_LIBRARY_PATH} | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; \
1806         export LD_LIBRARY_PATH; \
1807         rm -f $@-testsum $@-testlog; \
1808         prefix=`if test "$(@D)" = "regexp"; then echo regexp-test; else dirname $(@D); fi`; \
1809         test "$${prefix}" != "." || prefix="$(@D)"; \
1810         if test "$(use_dejagnu)" = "yes"; then \
1811           $(SHELL) $(srcdir)/testsuite/gotest --dejagnu=yes --basedir=$(srcdir) --srcdir=$(srcdir)/go/$(@D) --prefix="libgo_$${prefix}" --pkgfiles="$(go_$(subst /,_,$(@D))_files)" --testname="$(@D)" $(GOTESTFLAGS); \
1812         else \
1813           if $(SHELL) $(srcdir)/testsuite/gotest --basedir=$(srcdir) --srcdir=$(srcdir)/go/$(@D) --prefix="libgo_$${prefix}" --pkgfiles="$(go_$(subst /,_,$(@D))_files)" $(GOTESTFLAGS) >>$@-testlog 2>&1; then \
1814             echo "PASS: $(@D)" >> $@-testlog; \
1815             echo "PASS: $(@D)"; \
1816             echo "PASS: $(@D)" > $@-testsum; \
1817           else \
1818             echo "FAIL: $(@D)" >> $@-testlog; \
1819             cat $@-testlog; \
1820             echo "FAIL: $(@D)" > $@-testsum; \
1821             exit 1; \
1822           fi; \
1823         fi
1824
1825 # Build all packages before checking any.
1826 CHECK_DEPS = libgo.la libgobegin.a \
1827         $(toolexeclibgo_DATA) \
1828         $(toolexeclibgoarchive_DATA) \
1829         $(toolexeclibgocompress_DATA) \
1830         $(toolexeclibgocontainer_DATA) \
1831         $(toolexeclibgocrypto_DATA) \
1832         $(toolexeclibgocryptoopenpgp_DATA) \
1833         $(toolexeclibgodebug_DATA) \
1834         $(toolexeclibgoencoding_DATA) \
1835         $(toolexeclibgoexp_DATA) \
1836         $(toolexeclibgogo_DATA) \
1837         $(toolexeclibgohash_DATA) \
1838         $(toolexeclibgohttp_DATA) \
1839         $(toolexeclibgoimage_DATA) \
1840         $(toolexeclibgoindex_DATA) \
1841         $(toolexeclibgoio_DATA) \
1842         $(toolexeclibgomime_DATA) \
1843         $(toolexeclibgonet_DATA) \
1844         $(toolexeclibgoos_DATA) \
1845         $(toolexeclibgopath_DATA) \
1846         $(toolexeclibgorpc_DATA) \
1847         $(toolexeclibgoruntime_DATA) \
1848         $(toolexeclibgosync_DATA) \
1849         $(toolexeclibgotesting_DATA)
1850
1851 asn1/asn1.lo: $(go_asn1_files) big.gox bytes.gox fmt.gox io.gox os.gox \
1852                 reflect.gox strconv.gox strings.gox time.gox
1853         $(BUILDPACKAGE)
1854 asn1/check: $(CHECK_DEPS)
1855         @$(CHECK)
1856 .PHONY: asn1/check
1857
1858 big/big.lo: $(go_big_files) encoding/binary.gox fmt.gox io.gox os.gox \
1859                 rand.gox strings.gox
1860         $(BUILDPACKAGE)
1861 big/check: $(CHECK_DEPS)
1862         @$(CHECK)
1863 .PHONY: big/check
1864
1865 bufio/bufio.lo: $(go_bufio_files) bytes.gox io.gox os.gox strconv.gox utf8.gox
1866         $(BUILDPACKAGE)
1867 bufio/check: $(CHECK_DEPS)
1868         @$(CHECK)
1869 .PHONY: bufio/check
1870
1871 bytes/bytes.lo: $(go_bytes_files) io.gox os.gox unicode.gox utf8.gox
1872         $(BUILDPACKAGE)
1873 bytes/index.lo: $(go_bytes_c_files) bytes/bytes.lo
1874         $(LTCOMPILE) -c -o bytes/index.lo $(srcdir)/go/bytes/indexbyte.c
1875 bytes/check: $(CHECK_DEPS)
1876         @$(CHECK)
1877 .PHONY: bytes/check
1878
1879 cmath/cmath.lo: $(go_cmath_files) math.gox
1880         $(BUILDPACKAGE)
1881 cmath/check: $(CHECK_DEPS)
1882         @$(CHECK)
1883 .PHONY: cmath/check
1884
1885 crypto/crypto.lo: $(go_crypto_files) hash.gox
1886         $(BUILDPACKAGE)
1887 crypto/check: $(CHECK_DEPS)
1888         @$(CHECK)
1889 .PHONY: crypto/check
1890
1891 csv/csv.lo: $(go_csv_files) bufio.gox bytes.gox fmt.gox io.gox os.gox \
1892                 strings.gox unicode.gox utf8.gox
1893         $(BUILDPACKAGE)
1894 csv/check: $(CHECK_DEPS)
1895         @$(CHECK)
1896 .PHONY: csv/check
1897
1898 exec/exec.lo: $(go_exec_files) bytes.gox io.gox os.gox strconv.gox \
1899                 strings.gox syscall.gox
1900         $(BUILDPACKAGE)
1901 exec/check: $(CHECK_DEPS)
1902         @$(CHECK)
1903 .PHONY: exec/check
1904
1905 expvar/expvar.lo: $(go_expvar_files) bytes.gox fmt.gox http.gox json.gox \
1906                 log.gox os.gox runtime.gox strconv.gox sync.gox
1907         $(BUILDPACKAGE)
1908 expvar/check: $(CHECK_DEPS)
1909         @$(CHECK)
1910 .PHONY: expvar/check
1911
1912 flag/flag.lo: $(go_flag_files) fmt.gox os.gox strconv.gox
1913         $(BUILDPACKAGE)
1914 flag/check: $(CHECK_DEPS)
1915         @$(CHECK)
1916 .PHONY: flag/check
1917
1918 fmt/fmt.lo: $(go_fmt_files) bytes.gox io.gox math.gox os.gox reflect.gox \
1919                 strconv.gox strings.gox sync.gox unicode.gox utf8.gox
1920         $(BUILDPACKAGE)
1921 fmt/check: $(CHECK_DEPS)
1922         @$(CHECK)
1923 .PHONY: fmt/check
1924
1925 gob/gob.lo: $(go_gob_files) bufio.gox bytes.gox fmt.gox io.gox math.gox \
1926                 os.gox reflect.gox runtime.gox strings.gox sync.gox \
1927                 unicode.gox utf8.gox
1928         $(BUILDPACKAGE)
1929 gob/check: $(CHECK_DEPS)
1930         @$(CHECK)
1931 .PHONY: gob/check
1932
1933 hash/hash.lo: $(go_hash_files) io.gox
1934         $(BUILDPACKAGE)
1935 hash/check: $(CHECK_DEPS)
1936         @$(CHECK)
1937 .PHONY: hash/check
1938
1939 html/html.lo: $(go_html_files) bufio.gox bytes.gox fmt.gox io.gox os.gox \
1940                 strconv.gox strings.gox utf8.gox
1941         $(BUILDPACKAGE)
1942 html/check: $(CHECK_DEPS)
1943         @$(CHECK)
1944 .PHONY: html/check
1945
1946 http/http.lo: $(go_http_files) bufio.gox bytes.gox compress/gzip.gox \
1947                 crypto/rand.gox crypto/tls.gox encoding/base64.gox \
1948                 encoding/binary.gox fmt.gox io.gox io/ioutil.gox log.gox \
1949                 mime.gox mime/multipart.gox net.gox net/textproto.gox os.gox \
1950                 path.gox path/filepath.gox runtime/debug.gox sort.gox \
1951                 strconv.gox strings.gox sync.gox time.gox url.gox utf8.gox
1952         $(BUILDPACKAGE)
1953 http/check: $(CHECK_DEPS)
1954         @$(CHECK)
1955 .PHONY: http/check
1956
1957 image/image.lo: $(go_image_files) bufio.gox image/color.gox io.gox os.gox \
1958                 strconv.gox
1959         $(BUILDPACKAGE)
1960 image/check: $(CHECK_DEPS)
1961         @$(CHECK)
1962 .PHONY: image/check
1963
1964 io/io.lo: $(go_io_files) os.gox sync.gox
1965         $(BUILDPACKAGE)
1966 io/check: $(CHECK_DEPS)
1967         @$(CHECK)
1968 .PHONY: io/check
1969
1970 json/json.lo: $(go_json_files) bytes.gox encoding/base64.gox fmt.gox io.gox \
1971                 math.gox os.gox reflect.gox runtime.gox strconv.gox \
1972                 strings.gox unicode.gox utf16.gox utf8.gox
1973         $(BUILDPACKAGE)
1974 json/check: $(CHECK_DEPS)
1975         @$(CHECK)
1976 .PHONY: json/check
1977
1978 log/log.lo: $(go_log_files) bytes.gox fmt.gox io.gox runtime.gox os.gox \
1979                 sync.gox time.gox
1980         $(BUILDPACKAGE)
1981 log/check: $(CHECK_DEPS)
1982         @$(CHECK)
1983 .PHONY: log/check
1984
1985 math/math.lo: $(go_math_files)
1986         $(BUILDPACKAGE)
1987 math/check: $(CHECK_DEPS)
1988         @$(CHECK)
1989 .PHONY: math/check
1990
1991 mail/mail.lo: $(go_mail_files) bufio.gox bytes.gox encoding/base64.gox \
1992                 fmt.gox io.gox io/ioutil.gox log.gox net/textproto.gox os.gox \
1993                 strconv.gox strings.gox time.gox
1994         $(BUILDPACKAGE)
1995 mail/check: $(CHECK_DEPS)
1996         @$(CHECK)
1997 .PHONY: mail/check
1998
1999 mime/mime.lo: $(go_mime_files) bufio.gox bytes.gox fmt.gox os.gox strings.gox \
2000                 sync.gox unicode.gox
2001         $(BUILDPACKAGE)
2002 mime/check: $(CHECK_DEPS)
2003         @$(CHECK)
2004 .PHONY: mime/check
2005
2006 net/net.lo: $(go_net_files) bytes.gox fmt.gox io.gox os.gox rand.gox \
2007                 reflect.gox sort.gox strconv.gox strings.gox sync.gox \
2008                 syscall.gox time.gox
2009         $(BUILDPACKAGE)
2010 net/check: $(CHECK_DEPS)
2011         @$(CHECK)
2012 .PHONY: net/check
2013
2014 os/os.lo: $(go_os_files) runtime.gox sync.gox syscall.gox
2015         $(BUILDPACKAGE)
2016 os/check: $(CHECK_DEPS)
2017         @$(CHECK)
2018 .PHONY: os/check
2019
2020 signal_unix.go: $(srcdir)/go/os/mkunixsignals.sh sysinfo.go
2021         $(SHELL) $(srcdir)/go/os/mkunixsignals.sh sysinfo.go > $@.tmp
2022         mv -f $@.tmp $@
2023
2024 patch/patch.lo: $(go_patch_files) bytes.gox compress/zlib.gox \
2025                 crypto/sha1.gox encoding/git85.gox fmt.gox io.gox os.gox \
2026                 path.gox strings.gox
2027         $(BUILDPACKAGE)
2028 patch/check: $(CHECK_DEPS)
2029         @$(CHECK)
2030 .PHONY: patch/check
2031
2032 path/path.lo: $(go_path_files) os.gox strings.gox utf8.gox
2033         $(BUILDPACKAGE)
2034 path/check: $(CHECK_DEPS)
2035         @$(CHECK)
2036 .PHONY: path/check
2037
2038 rand/rand.lo: $(go_rand_files) math.gox sync.gox
2039         $(BUILDPACKAGE)
2040 rand/check: $(CHECK_DEPS)
2041         @$(CHECK)
2042 .PHONY: rand/check
2043
2044 reflect/reflect.lo: $(go_reflect_files) math.gox runtime.gox strconv.gox \
2045                 sync.gox
2046         $(BUILDPACKAGE)
2047 reflect/check: $(CHECK_DEPS)
2048         @$(CHECK)
2049 .PHONY: reflect/check
2050
2051 regexp/regexp.lo: $(go_regexp_files) bytes.gox io.gox os.gox \
2052                 regexp/syntax.gox strconv.gox strings.gox sync.gox utf8.gox
2053         $(BUILDPACKAGE)
2054 regexp/check: $(CHECK_DEPS)
2055         @$(CHECK)
2056 .PHONY: regexp/check
2057
2058 rpc/rpc.lo: $(go_rpc_files) bufio.gox fmt.gox gob.gox http.gox io.gox log.gox \
2059                 net.gox os.gox reflect.gox sort.gox strings.gox strconv.gox \
2060                 sync.gox template.gox unicode.gox utf8.gox
2061         $(BUILDPACKAGE)
2062 rpc/check: $(CHECK_DEPS)
2063         @$(CHECK)
2064 .PHONY: rpc/check
2065
2066 runtime/runtime.lo: $(go_runtime_files)
2067         $(BUILDPACKAGE)
2068 runtime/check: $(CHECK_DEPS)
2069         @$(CHECK)
2070 .PHONY: runtime/check
2071
2072 scanner/scanner.lo: $(go_scanner_files) bytes.gox fmt.gox io.gox os.gox \
2073                 unicode.gox utf8.gox
2074         $(BUILDPACKAGE)
2075 scanner/check: $(CHECK_DEPS)
2076         @$(CHECK)
2077 .PHONY: scanner/check
2078
2079 smtp/smtp.lo: $(go_smtp_files) crypto/tls.gox encoding/base64.gox io.gox \
2080                 net.gox net/textproto.gox os.gox strings.gox
2081         $(BUILDPACKAGE)
2082 smtp/check: $(CHECK_DEPS)
2083         @$(CHECK)
2084 .PHONY: smtp/check
2085
2086 sort/sort.lo: $(go_sort_files) math.gox
2087         $(BUILDPACKAGE)
2088 sort/check: $(CHECK_DEPS)
2089         @$(CHECK)
2090 .PHONY: sort/check
2091
2092 strconv/strconv.lo: $(go_strconv_files) bytes.gox math.gox os.gox strings.gox \
2093                 unicode.gox utf8.gox
2094         $(BUILDPACKAGE)
2095 strconv/check: $(CHECK_DEPS)
2096         @$(CHECK)
2097 .PHONY: strconv/check
2098
2099 strings/strings.lo: $(go_strings_files) io.gox os.gox unicode.gox utf8.gox
2100         $(BUILDPACKAGE)
2101 strings/check: $(CHECK_DEPS)
2102         @$(CHECK)
2103 .PHONY: strings/check
2104
2105 sync/sync.lo: $(go_sync_files) runtime.gox sync/atomic.gox
2106         $(BUILDPACKAGE)
2107 sync/check: $(CHECK_DEPS)
2108         @$(CHECK)
2109 .PHONY: sync/check
2110
2111 syslog/syslog.lo: $(go_syslog_files) fmt.gox log.gox net.gox os.gox syscall.gox
2112         $(BUILDPACKAGE)
2113 syslog/syslog_c.lo: $(go_syslog_c_files) syslog/syslog.lo
2114         $(LTCOMPILE) -c -o $@ $(srcdir)/go/syslog/syslog_c.c
2115 syslog/check: $(CHECK_DEPS)
2116         @$(CHECK)
2117 .PHONY: syslog/check
2118
2119 tabwriter/tabwriter.lo: $(go_tabwriter_files) bytes.gox io.gox os.gox utf8.gox
2120         $(BUILDPACKAGE)
2121 tabwriter/check: $(CHECK_DEPS)
2122         @$(CHECK)
2123 .PHONY: tabwriter/check
2124
2125 template/template.lo: $(go_template_files) bytes.gox fmt.gox io.gox \
2126                 io/ioutil.gox os.gox path/filepath.gox reflect.gox \
2127                 runtime.gox strings.gox template/parse.gox unicode.gox \
2128                 url.gox utf8.gox
2129         $(BUILDPACKAGE)
2130 template/check: $(CHECK_DEPS)
2131         @$(CHECK)
2132 .PHONY: template/check
2133
2134 testing/testing.lo: $(go_testing_files) bytes.gox flag.gox fmt.gox io.gox \
2135                 os.gox regexp.gox runtime.gox runtime/pprof.gox strings.gox \
2136                 strconv.gox time.gox
2137         $(BUILDPACKAGE)
2138 testing/check: $(CHECK_DEPS)
2139         @$(CHECK)
2140 .PHONY: testing/check
2141
2142 time/time.lo: $(go_time_files) bytes.gox container/heap.gox io/ioutil.gox \
2143                 os.gox strconv.gox sync.gox syscall.gox
2144         $(BUILDPACKAGE)
2145 time/check: $(CHECK_DEPS)
2146         @$(CHECK)
2147 .PHONY: time/check
2148
2149 unicode/unicode.lo: $(go_unicode_files)
2150         $(BUILDPACKAGE)
2151 unicode/check: $(CHECK_DEPS)
2152         @$(CHECK)
2153 .PHONY: unicode/check
2154
2155 url/url.lo: $(go_url_files) os.gox strconv.gox strings.gox
2156         $(BUILDPACKAGE)
2157 url/check: $(CHECK_DEPS)
2158         @$(CHECK)
2159 .PHONY: url/check
2160
2161 utf16/utf16.lo: $(go_utf16_files) unicode.gox
2162         $(BUILDPACKAGE)
2163 utf16/check: $(CHECK_DEPS)
2164         @$(CHECK)
2165 .PHONY: utf16/check
2166
2167 utf8/utf8.lo: $(go_utf8_files) unicode.gox
2168         $(BUILDPACKAGE)
2169 utf8/check: $(CHECK_DEPS)
2170         @$(CHECK)
2171 .PHONY: utf8/check
2172
2173 websocket/websocket.lo: $(go_websocket_files) bufio.gox bytes.gox \
2174                 crypto/md5.gox crypto/rand.gox crypto/sha1.gox crypto/tls.gox \
2175                 encoding/base64.gox encoding/binary.gox fmt.gox http.gox \
2176                 io.gox io/ioutil.gox json.gox net.gox os.gox rand.gox \
2177                 strings.gox strconv.gox sync.gox url.gox
2178         $(BUILDPACKAGE)
2179 websocket/check: $(CHECK_DEPS)
2180         @$(CHECK)
2181 .PHONY: websocket/check
2182
2183 xml/xml.lo: $(go_xml_files) bufio.gox bytes.gox fmt.gox io.gox os.gox \
2184                 reflect.gox strconv.gox strings.gox unicode.gox utf8.gox
2185         $(BUILDPACKAGE)
2186 xml/check: $(CHECK_DEPS)
2187         @$(CHECK)
2188 .PHONY: xml/check
2189
2190 archive/tar.lo: $(go_archive_tar_files) bytes.gox io.gox io/ioutil.gox os.gox \
2191                 strconv.gox strings.gox
2192         $(BUILDPACKAGE)
2193 archive/tar/check: $(CHECK_DEPS)
2194         @$(MKDIR_P) archive/tar
2195         @$(CHECK)
2196 .PHONY: archive/tar/check
2197
2198 archive/zip.lo: $(go_archive_zip_files) bufio.gox compress/flate.gox \
2199                 encoding/binary.gox hash.gox hash/crc32.gox \
2200                 encoding/binary.gox io.gox io/ioutil.gox os.gox time.gox
2201         $(BUILDPACKAGE)
2202 archive/zip/check: $(CHECK_DEPS)
2203         @$(MKDIR_P) archive/zip
2204         @$(CHECK)
2205 .PHONY: archive/zip/check
2206
2207 compress/bzip2.lo: $(go_compress_bzip2_files) bufio.gox io.gox os.gox sort.gox
2208         $(BUILDPACKAGE)
2209 compress/bzip2/check: $(CHECK_DEPS)
2210         @$(MKDIR_P) compress/bzip2
2211         @$(CHECK)
2212 .PHONY: compress/bzip2/check
2213
2214 compress/flate.lo: $(go_compress_flate_files) bufio.gox io.gox math.gox \
2215                 os.gox sort.gox strconv.gox
2216         $(BUILDPACKAGE)
2217 compress/flate/check: $(CHECK_DEPS)
2218         @$(MKDIR_P) compress/flate
2219         @$(CHECK)
2220 .PHONY: compress/flate/check
2221
2222 compress/gzip.lo: $(go_compress_gzip_files) bufio.gox compress/flate.gox \
2223                 hash.gox hash/crc32.gox io.gox os.gox
2224         $(BUILDPACKAGE)
2225 compress/gzip/check: $(CHECK_DEPS)
2226         @$(MKDIR_P) compress/gzip
2227         @$(CHECK)
2228 .PHONY: compress/gzip/check
2229
2230 compress/lzw.lo: $(go_compress_lzw_files) bufio.gox fmt.gox io.gox os.gox
2231         $(BUILDPACKAGE)
2232 compress/lzw/check: $(CHECK_DEPS)
2233         @$(MKDIR_P) compress/lzw
2234         @$(CHECK)
2235 .PHONY: compress/lzw/check
2236
2237 compress/zlib.lo: $(go_compress_zlib_files) bufio.gox compress/flate.gox \
2238                 hash.gox hash/adler32.gox io.gox os.gox
2239         $(BUILDPACKAGE)
2240 compress/zlib/check: $(CHECK_DEPS)
2241         @$(MKDIR_P) compress/zlib
2242         @$(CHECK)
2243 .PHONY: compress/zlib/check
2244
2245 container/heap.lo: $(go_container_heap_files) sort.gox
2246         $(BUILDPACKAGE)
2247 container/heap/check: $(CHECK_DEPS)
2248         @$(MKDIR_P) container/heap
2249         @$(CHECK)
2250 .PHONY: container/heap/check
2251
2252 container/list.lo: $(go_container_list_files)
2253         $(BUILDPACKAGE)
2254 container/list/check: $(CHECK_DEPS)
2255         @$(MKDIR_P) container/list
2256         @$(CHECK)
2257 .PHONY: container/list/check
2258
2259 container/ring.lo: $(go_container_ring_files)
2260         $(BUILDPACKAGE)
2261 container/ring/check: $(CHECK_DEPS)
2262         @$(MKDIR_P) container/ring
2263         @$(CHECK)
2264 .PHONY: container/ring/check
2265
2266 crypto/aes.lo: $(go_crypto_aes_files) os.gox strconv.gox
2267         $(BUILDPACKAGE)
2268 crypto/aes/check: $(CHECK_DEPS)
2269         @$(MKDIR_P) crypto/aes
2270         @$(CHECK)
2271 .PHONY: crypto/aes/check
2272
2273 crypto/bcrypt.lo: $(go_crypto_bcrypt_files) crypto/blowfish.gox \
2274                 crypto/rand.gox crypto/subtle.gox encoding/base64.gox \
2275                 fmt.gox io.gox os.gox strconv.gox
2276         $(BUILDPACKAGE)
2277 crypto/bcrypt/check: $(CHECK_DEPS)
2278         @$(MKDIR_P) crypto/bcrypt
2279         @$(CHECK)
2280 .PHONY: crypto/bcrypt/check
2281
2282 crypto/blowfish.lo: $(go_crypto_blowfish_files) os.gox strconv.gox
2283         $(BUILDPACKAGE)
2284 crypto/blowfish/check: $(CHECK_DEPS)
2285         @$(MKDIR_P) crypto/blowfish
2286         @$(CHECK)
2287 .PHONY: crypto/blowfish/check
2288
2289 crypto/cast5.lo: $(go_crypto_cast5_files) os.gox
2290         $(BUILDPACKAGE)
2291 crypto/cast5/check: $(CHECK_DEPS)
2292         @$(MKDIR_P) crypto/cast5
2293         @$(CHECK)
2294 .PHONY: crypto/cast5/check
2295
2296 crypto/cipher.lo: $(go_crypto_cipher_files) io.gox os.gox
2297         $(BUILDPACKAGE)
2298 crypto/cipher/check: $(CHECK_DEPS)
2299         @$(MKDIR_P) crypto/cipher
2300         @$(CHECK)
2301 .PHONY: crypto/cipher/check
2302
2303 crypto/des.lo: $(go_crypto_des_files) encoding/binary.gox os.gox strconv.gox
2304         $(BUILDPACKAGE)
2305 crypto/des/check: $(CHECK_DEPS)
2306         @$(MKDIR_P) crypto/des
2307         @$(CHECK)
2308 .PHONY: crypto/des/check
2309
2310 crypto/dsa.lo: $(go_crypto_dsa_files) big.gox io.gox os.gox
2311         $(BUILDPACKAGE)
2312 crypto/dsa/check: $(CHECK_DEPS)
2313         @$(MKDIR_P) crypto/dsa
2314         @$(CHECK)
2315 .PHONY: crypto/dsa/check
2316
2317 crypto/ecdsa.lo: $(go_crypto_ecdsa_files) big.gox crypto/elliptic.gox io.gox \
2318                 os.gox
2319         $(BUILDPACKAGE)
2320 crypto/ecdsa/check: $(CHECK_DEPS)
2321         @$(MKDIR_P) crypto/ecdsa
2322         @$(CHECK)
2323 .PHONY: crypto/ecdsa/check
2324
2325 crypto/elliptic.lo: $(go_crypto_elliptic_files) big.gox io.gox os.gox sync.gox
2326         $(BUILDPACKAGE)
2327 crypto/elliptic/check: $(CHECK_DEPS)
2328         @$(MKDIR_P) crypto/elliptic
2329         @$(CHECK)
2330 .PHONY: crypto/elliptic/check
2331
2332 crypto/hmac.lo: $(go_crypto_hmac_files) crypto/md5.gox crypto/sha1.gox \
2333                 crypto/sha256.gox hash.gox os.gox
2334         $(BUILDPACKAGE)
2335 crypto/hmac/check: $(CHECK_DEPS)
2336         @$(MKDIR_P) crypto/hmac
2337         @$(CHECK)
2338 .PHONY: crypto/hmac/check
2339
2340 crypto/md4.lo: $(go_crypto_md4_files) crypto.gox hash.gox os.gox
2341         $(BUILDPACKAGE)
2342 crypto/md4/check: $(CHECK_DEPS)
2343         @$(MKDIR_P) crypto/md4
2344         @$(CHECK)
2345 .PHONY: crypto/md4/check
2346
2347 crypto/md5.lo: $(go_crypto_md5_files) crypto.gox hash.gox os.gox
2348         $(BUILDPACKAGE)
2349 crypto/md5/check: $(CHECK_DEPS)
2350         @$(MKDIR_P) crypto/md5
2351         @$(CHECK)
2352 .PHONY: crypto/md5/check
2353
2354 crypto/ocsp.lo: $(go_crypto_ocsp_files) asn1.gox crypto.gox crypto/rsa.gox \
2355                 crypto/sha1.gox crypto/x509.gox crypto/x509/pkix.gox os.gox \
2356                 time.gox
2357         $(BUILDPACKAGE)
2358 crypto/ocsp/check: $(CHECK_DEPS)
2359         @$(MKDIR_P) crypto/ocsp
2360         @$(CHECK)
2361 .PHONY: crypto/ocsp/check
2362
2363 crypto/openpgp.lo: $(go_crypto_openpgp_files) crypto.gox \
2364                 crypto/openpgp/armor.gox crypto/openpgp/error.gox \
2365                 crypto/openpgp/packet.gox crypto/openpgp/s2k.gox \
2366                 crypto/rand.gox crypto/rsa.gox crypto/sha256.gox hash.gox \
2367                 io.gox os.gox strconv.gox time.gox
2368         $(BUILDPACKAGE)
2369 crypto/openpgp/check: $(CHECK_DEPS)
2370         @$(MKDIR_P) crypto/openpgp
2371         @$(CHECK)
2372 .PHONY: crypto/openpgp/check
2373
2374 crypto/rand.lo: $(go_crypto_rand_files) big.gox bufio.gox crypto/aes.gox \
2375                 io.gox os.gox sync.gox time.gox
2376         $(BUILDPACKAGE)
2377 crypto/rand/check: $(CHECK_DEPS)
2378         @$(MKDIR_P) crypto/rand
2379         @$(CHECK)
2380 .PHONY: crypto/rand/check
2381
2382 crypto/rc4.lo: $(go_crypto_rc4_files) os.gox strconv.gox
2383         $(BUILDPACKAGE)
2384 crypto/rc4/check: $(CHECK_DEPS)
2385         @$(MKDIR_P) crypto/rc4
2386         @$(CHECK)
2387 .PHONY: crypto/rc4/check
2388
2389 crypto/ripemd160.lo: $(go_crypto_ripemd160_files) crypto.gox hash.gox os.gox
2390         $(BUILDPACKAGE)
2391 crypto/ripemd160/check: $(CHECK_DEPS)
2392         @$(MKDIR_P) crypto/ripemd160
2393         @$(CHECK)
2394 .PHONY: crypto/ripemd160/check
2395
2396 crypto/rsa.lo: $(go_crypto_rsa_files) big.gox crypto.gox crypto/rand.gox \
2397                 crypto/sha1.gox crypto/subtle.gox encoding/hex.gox hash.gox \
2398                 io.gox os.gox
2399         $(BUILDPACKAGE)
2400 crypto/rsa/check: $(CHECK_DEPS)
2401         @$(MKDIR_P) crypto/rsa
2402         @$(CHECK)
2403 .PHONY: crypto/rsa/check
2404
2405 crypto/sha1.lo: $(go_crypto_sha1_files) crypto.gox hash.gox os.gox
2406         $(BUILDPACKAGE)
2407 crypto/sha1/check: $(CHECK_DEPS)
2408         @$(MKDIR_P) crypto/sha1
2409         @$(CHECK)
2410 .PHONY: crypto/sha1/check
2411
2412 crypto/sha256.lo: $(go_crypto_sha256_files) crypto.gox hash.gox os.gox
2413         $(BUILDPACKAGE)
2414 crypto/sha256/check: $(CHECK_DEPS)
2415         @$(MKDIR_P) crypto/sha256
2416         @$(CHECK)
2417 .PHONY: crypto/sha256/check
2418
2419 crypto/sha512.lo: $(go_crypto_sha512_files) crypto.gox hash.gox os.gox
2420         $(BUILDPACKAGE)
2421 crypto/sha512/check: $(CHECK_DEPS)
2422         @$(MKDIR_P) crypto/sha512
2423         @$(CHECK)
2424 .PHONY: crypto/sha512/check
2425
2426 crypto/subtle.lo: $(go_crypto_subtle_files)
2427         $(BUILDPACKAGE)
2428 crypto/subtle/check: $(CHECK_DEPS)
2429         @$(MKDIR_P) crypto/subtle
2430         @$(CHECK)
2431 .PHONY: crypto/subtle/check
2432
2433 crypto/tls.lo: $(go_crypto_tls_files) big.gox bytes.gox crypto.gox \
2434                 crypto/aes.gox crypto/cipher.gox crypto/des.gox \
2435                 crypto/elliptic.gox crypto/hmac.gox crypto/md5.gox \
2436                 crypto/rand.gox crypto/rc4.gox crypto/rsa.gox crypto/sha1.gox \
2437                 crypto/subtle.gox crypto/x509.gox crypto/x509/pkix.gox \
2438                 encoding/pem.gox hash.gox io.gox io/ioutil.gox net.gox os.gox \
2439                 strconv.gox strings.gox sync.gox time.gox
2440         $(BUILDPACKAGE)
2441 crypto/tls/check: $(CHECK_DEPS)
2442         @$(MKDIR_P) crypto/tls
2443         @$(CHECK)
2444 .PHONY: crypto/tls/check
2445
2446 crypto/twofish.lo: $(go_crypto_twofish_files) os.gox strconv.gox
2447         $(BUILDPACKAGE)
2448 crypto/twofish/check: $(CHECK_DEPS)
2449         @$(MKDIR_P) crypto/twofish
2450         @$(CHECK)
2451 .PHONY: crypto/twofish/check
2452
2453 crypto/x509.lo: $(go_crypto_x509_files) asn1.gox big.gox bytes.gox crypto.gox \
2454                 crypto/dsa.gox crypto/rsa.gox crypto/sha1.gox \
2455                 crypto/x509/pkix.gox encoding/pem.gox os.gox strings.gox \
2456                 time.gox
2457         $(BUILDPACKAGE)
2458 crypto/x509/check: $(CHECK_DEPS)
2459         @$(MKDIR_P) crypto/x509
2460         @$(CHECK)
2461 .PHONY: crypto/x509/check
2462
2463 crypto/xtea.lo: $(go_crypto_xtea_files) os.gox strconv.gox
2464         $(BUILDPACKAGE)
2465 crypto/xtea/check: $(CHECK_DEPS)
2466         @$(MKDIR_P) crypto/xtea
2467         @$(CHECK)
2468 .PHONY: crypto/xtea/check
2469
2470 crypto/openpgp/armor.lo: $(go_crypto_openpgp_armor_files) bufio.gox bytes.gox \
2471                 crypto/openpgp/error.gox encoding/base64.gox io.gox os.gox
2472         $(BUILDPACKAGE)
2473 crypto/openpgp/armor/check: $(CHECK_DEPS)
2474         @$(MKDIR_P) crypto/openpgp/armor
2475         @$(CHECK)
2476 .PHONY: crypto/openpgp/armor/check
2477
2478 crypto/openpgp/elgamal.lo: $(go_crypto_openpgp_elgamal_files) big.gox \
2479                 crypto/rand.gox crypto/subtle.gox io.gox os.gox
2480         $(BUILDPACKAGE)
2481 crypto/openpgp/elgamal/check: $(CHECK_DEPS)
2482         @$(MKDIR_P) crypto/openpgp/elgamal
2483         @$(CHECK)
2484 .PHONY: crypto/openpgp/elgamal/check
2485
2486 crypto/openpgp/error.lo: $(go_crypto_openpgp_error_files) strconv.gox
2487         $(BUILDPACKAGE)
2488 crypto/openpgp/error/check: $(CHECK_DEPS)
2489         @$(MKDIR_P) crypto/openpgp/error
2490         @$(CHECK)
2491 .PHONY: crypto/openpgp/error/check
2492
2493 crypto/openpgp/packet.lo: $(go_crypto_openpgp_packet_files) big.gox bytes.gox \
2494                 compress/flate.gox compress/zlib.gox crypto.gox \
2495                 crypto/aes.gox crypto/cast5.gox crypto/cipher.gox \
2496                 crypto/dsa.gox crypto/openpgp/elgamal.gox \
2497                 crypto/openpgp/error.gox crypto/openpgp/s2k.gox \
2498                 crypto/rand.gox crypto/rsa.gox crypto/sha1.gox \
2499                 crypto/subtle.gox encoding/binary.gox fmt.gox \
2500                 hash.gox io.gox io/ioutil.gox os.gox strconv.gox strings.gox
2501         $(BUILDPACKAGE)
2502 crypto/openpgp/packet/check: $(CHECK_DEPS)
2503         @$(MKDIR_P) crypto/openpgp/packet
2504         @$(CHECK)
2505 .PHONY: crypto/openpgp/packet/check
2506
2507 crypto/openpgp/s2k.lo: $(go_crypto_openpgp_s2k_files) crypto.gox \
2508                 crypto/md5.gox crypto/openpgp/error.gox crypto/rand.gox \
2509                 crypto/ripemd160.gox crypto/sha1.gox crypto/sha256.gox \
2510                 crypto/sha512.gox hash.gox io.gox os.gox
2511         $(BUILDPACKAGE)
2512 crypto/openpgp/s2k/check: $(CHECK_DEPS)
2513         @$(MKDIR_P) crypto/openpgp/s2k
2514         @$(CHECK)
2515 .PHONY: crypto/openpgp/s2k/check
2516
2517 crypto/x509/pkix.lo: $(go_crypto_x509_pkix_files) asn1.gox big.gox time.gox
2518         $(BUILDPACKAGE)
2519 crypto/x509/pkix/check: $(CHECK_DEPS)
2520         @$(MKDIR_P) crypto/x509/pkix
2521         @$(CHECK)
2522 .PHONY: crypto/x509/pkix/check
2523
2524 debug/dwarf.lo: $(go_debug_dwarf_files) encoding/binary.gox os.gox strconv.gox
2525         $(BUILDPACKAGE)
2526 debug/dwarf/check: $(CHECK_DEPS)
2527         @$(MKDIR_P) debug/dwarf
2528         @$(CHECK)
2529 .PHONY: debug/dwarf/check
2530
2531 debug/elf.lo: $(go_debug_elf_files) bytes.gox debug/dwarf.gox \
2532                 encoding/binary.gox fmt.gox io.gox os.gox strconv.gox
2533         $(BUILDPACKAGE)
2534 debug/elf/check: $(CHECK_DEPS)
2535         @$(MKDIR_P) debug/elf
2536         @$(CHECK)
2537 .PHONY: debug/elf/check
2538
2539 debug/gosym.lo: $(go_debug_gosym_files) encoding/binary.gox fmt.gox os.gox \
2540                 strconv.gox strings.gox
2541         $(BUILDPACKAGE)
2542 debug/gosym/check: $(CHECK_DEPS)
2543         @$(MKDIR_P) debug/gosym
2544         @$(CHECK)
2545 .PHONY: debug/gosym/check
2546
2547 debug/macho.lo: $(go_debug_macho_files) bytes.gox debug/dwarf.gox \
2548                 encoding/binary.gox fmt.gox io.gox os.gox strconv.gox
2549         $(BUILDPACKAGE)
2550 debug/macho/check: $(CHECK_DEPS)
2551         @$(MKDIR_P) debug/macho
2552         @$(CHECK)
2553 .PHONY: debug/macho/check
2554
2555 debug/pe.lo: $(go_debug_pe_files) debug/dwarf.gox \
2556                 encoding/binary.gox fmt.gox io.gox os.gox strconv.gox
2557         $(BUILDPACKAGE)
2558 debug/pe/check: $(CHECK_DEPS)
2559         @$(MKDIR_P) debug/pe
2560         @$(CHECK)
2561 .PHONY: debug/pe/check
2562
2563 encoding/ascii85.lo: $(go_encoding_ascii85_files) io.gox os.gox strconv.gox
2564         $(BUILDPACKAGE)
2565 encoding/ascii85/check: $(CHECK_DEPS)
2566         @$(MKDIR_P) encoding/ascii85
2567         @$(CHECK)
2568 .PHONY: encoding/ascii85/check
2569
2570 encoding/base32.lo: $(go_encoding_base32_files) io.gox os.gox strconv.gox
2571         $(BUILDPACKAGE)
2572 encoding/base32/check: $(CHECK_DEPS)
2573         @$(MKDIR_P) encoding/base32
2574         @$(CHECK)
2575 .PHONY: encoding/base32/check
2576
2577 encoding/base64.lo: $(go_encoding_base64_files) io.gox os.gox strconv.gox
2578         $(BUILDPACKAGE)
2579 encoding/base64/check: $(CHECK_DEPS)
2580         @$(MKDIR_P) encoding/base64
2581         @$(CHECK)
2582 .PHONY: encoding/base64/check
2583
2584 encoding/binary.lo: $(go_encoding_binary_files) io.gox math.gox os.gox \
2585                 reflect.gox
2586         $(BUILDPACKAGE)
2587 encoding/binary/check: $(CHECK_DEPS)
2588         @$(MKDIR_P) encoding/binary
2589         @$(CHECK)
2590 .PHONY: encoding/binary/check
2591
2592 encoding/git85.lo: $(go_encoding_git85_files) bytes.gox io.gox os.gox \
2593                 strconv.gox
2594         $(BUILDPACKAGE)
2595 encoding/git85/check: $(CHECK_DEPS)
2596         @$(MKDIR_P) encoding/git85
2597         @$(CHECK)
2598 .PHONY: encoding/git85/check
2599
2600 encoding/hex.lo: $(go_encoding_hex_files) bytes.gox io.gox os.gox strconv.gox
2601         $(BUILDPACKAGE)
2602 encoding/hex/check: $(CHECK_DEPS)
2603         @$(MKDIR_P) encoding/hex
2604         @$(CHECK)
2605 .PHONY: encoding/hex/check
2606
2607 encoding/pem.lo: $(go_encoding_pem_files) bytes.gox encoding/base64.gox
2608         $(BUILDPACKAGE)
2609 encoding/pem/check: $(CHECK_DEPS)
2610         @$(MKDIR_P) encoding/pem
2611         @$(CHECK)
2612 .PHONY: encoding/pem/check
2613
2614 exp/ebnf.lo: $(go_exp_ebnf_files) go/scanner.gox go/token.gox os.gox \
2615                 strconv.gox unicode.gox utf8.gox
2616         $(BUILDPACKAGE)
2617 exp/ebnf/check: $(CHECK_DEPS)
2618         @$(MKDIR_P) exp/ebnf
2619         @$(CHECK)
2620 .PHONY: exp/ebnf/check
2621
2622 exp/gui.lo: $(go_exp_gui_files) image.gox image/draw.gox os.gox
2623         $(BUILDPACKAGE)
2624 exp/gui/check: $(CHECK_DEPS)
2625         @$(MKDIR_P) exp/gui
2626         @$(CHECK)
2627 .PHONY: exp/gui/check
2628
2629 exp/norm.lo: $(go_exp_norm_files) io.gox os.gox utf8.gox
2630         $(BUILDPACKAGE)
2631 exp/norm/check: $(CHECK_DEPS)
2632         @$(MKDIR_P) exp/norm
2633         @$(CHECK)
2634 .PHONY: exp/norm/check
2635
2636 exp/spdy.lo: $(go_exp_spdy_files) bytes.gox compress/zlib.gox \
2637                 encoding/binary.gox http.gox io.gox os.gox strings.gox
2638         $(BUILDPACKAGE)
2639 exp/spdy/check: $(CHECK_DEPS)
2640         @$(MKDIR_P) exp/spdy
2641         @$(CHECK)
2642 .PHONY: exp/spdy/check
2643
2644 exp/sql.lo: $(go_exp_sql_files) exp/sql/driver.gox fmt.gox os.gox reflect.gox \
2645                 runtime.gox strconv.gox sync.gox
2646         $(BUILDPACKAGE)
2647 exp/sql/check: $(CHECK_DEPS)
2648         @$(MKDIR_P) exp/sql
2649         @$(CHECK)
2650 .PHONY: exp/sql/check
2651
2652 exp/ssh.lo: $(go_exp_ssh_files) big.gox bufio.gox bytes.gox crypto.gox \
2653                 crypto/aes.gox crypto/cipher.gox crypto/hmac.gox \
2654                 crypto/rand.gox crypto/rsa.gox crypto/sha1.gox \
2655                 crypto/subtle.gox crypto/x509.gox encoding/pem.gox hash.gox \
2656                 io.gox net.gox os.gox reflect.gox strconv.gox sync.gox
2657         $(BUILDPACKAGE)
2658 exp/ssh/check: $(CHECK_DEPS)
2659         @$(MKDIR_P) exp/ssh
2660         @$(CHECK)
2661 .PHONY: exp/ssh/check
2662
2663 exp/terminal.lo: $(go_exp_terminal_files) io.gox os.gox syscall.gox
2664         $(BUILDPACKAGE)
2665 exp/terminal/check: $(CHECK_DEPS)
2666         @$(MKDIR_P) exp/terminal
2667         @$(CHECK)
2668 .PHONY: exp/terminal/check
2669
2670 exp/types.lo: $(go_exp_types_files) big.gox bufio.gox fmt.gox go/ast.gox \
2671                 go/token.gox io.gox os.gox path/filepath.gox runtime.gox \
2672                 scanner.gox sort.gox strconv.gox strings.gox
2673         $(BUILDPACKAGE)
2674 exp/types/check: $(CHECK_DEPS)
2675         @$(MKDIR_P) exp/types
2676         @$(CHECK)
2677 .PHONY: exp/types/check
2678
2679 exp/gui/x11.lo: $(go_exp_gui_x11_files) bufio.gox exp/gui.gox image.gox \
2680                 image/draw.gox io.gox log.gox net.gox os.gox strconv.gox \
2681                 strings.gox time.gox
2682         $(BUILDPACKAGE)
2683 exp/gui/x11/check: $(CHECK_DEPS)
2684         @$(MKDIR_P) exp/gui/x11
2685         @$(CHECK)
2686 .PHONY: exp/gui/x11/check
2687
2688 exp/sql/driver.lo: $(go_exp_sql_driver_files) fmt.gox os.gox reflect.gox \
2689                 strconv.gox
2690         $(BUILDPACKAGE)
2691 exp/sql/driver/check: $(CHECK_DEPS)
2692         @$(MKDIR_P) exp/sql/driver
2693         @$(CHECK)
2694 .PHONY: exp/sql/driver/check
2695
2696 exp/template/html.lo: $(go_exp_template_html_files) bytes.gox fmt.gox \
2697                 html.gox json.gox os.gox strings.gox template.gox \
2698                 template/parse.gox unicode.gox utf8.gox 
2699         $(BUILDPACKAGE)
2700 exp/template/html/check: $(CHECK_DEPS)
2701         @$(MKDIR_P) exp/template/html
2702         @$(CHECK)
2703 .PHONY: exp/template/html/check
2704
2705 go/ast.lo: $(go_go_ast_files) bytes.gox fmt.gox go/scanner.gox go/token.gox \
2706                 io.gox os.gox reflect.gox strconv.gox unicode.gox utf8.gox
2707         $(BUILDPACKAGE)
2708 go/ast/check: $(CHECK_DEPS)
2709         @$(MKDIR_P) go/ast
2710         @$(CHECK)
2711 .PHONY: go/ast/check
2712
2713 go/build.lo: $(go_go_build_files) bytes.gox exec.gox fmt.gox go/ast.gox \
2714                 go/doc.gox go/parser.gox go/token.gox io/ioutil.gox log.gox \
2715                 os.gox path.gox path/filepath.gox regexp.gox runtime.gox \
2716                 sort.gox strconv.gox strings.gox runtime.gox unicode.gox
2717         $(BUILDPACKAGE)
2718 go/build/check: $(CHECK_DEPS)
2719         @$(MKDIR_P) go/build
2720         @$(CHECK)
2721 .PHONY: go/build/check
2722
2723 syslist.go: s-syslist; @true
2724 s-syslist: Makefile
2725         echo '// Generated automatically by make.' >syslist.go.tmp
2726         echo 'package build' >>syslist.go.tmp
2727         echo 'const goosList = "$(GOOS)"' >>syslist.go.tmp
2728         echo 'const goarchList = "$(GOARCH)"' >>syslist.go.tmp
2729         $(SHELL) $(srcdir)/../move-if-change syslist.go.tmp syslist.go
2730         $(STAMP) $@
2731
2732 go/doc.lo: $(go_go_doc_files) go/ast.gox go/token.gox io.gox regexp.gox \
2733                 sort.gox strings.gox template.gox unicode.gox utf8.gox
2734         $(BUILDPACKAGE)
2735 go/doc/check: $(CHECK_DEPS)
2736         @$(MKDIR_P) go/doc
2737         @$(CHECK)
2738 .PHONY: go/doc/check
2739
2740 go/parser.lo: $(go_go_parser_files) bytes.gox fmt.gox go/ast.gox \
2741                 go/scanner.gox go/token.gox io.gox io/ioutil.gox os.gox \
2742                 path/filepath.gox strings.gox
2743         $(BUILDPACKAGE)
2744 go/parser/check: $(CHECK_DEPS)
2745         @$(MKDIR_P) go/parser
2746         @$(CHECK)
2747 .PHONY: go/parser/check
2748
2749 go/printer.lo: $(go_go_printer_files) bytes.gox fmt.gox go/ast.gox \
2750                 go/token.gox io.gox os.gox path/filepath.gox reflect.gox \
2751                 strings.gox tabwriter.gox
2752         $(BUILDPACKAGE)
2753 go/printer/check: $(CHECK_DEPS)
2754         @$(MKDIR_P) go/printer
2755         @$(CHECK)
2756 .PHONY: go/printer/check
2757
2758 go/scanner.lo: $(go_go_scanner_files) bytes.gox fmt.gox go/token.gox io.gox \
2759                 os.gox path/filepath.gox sort.gox strconv.gox unicode.gox \
2760                 utf8.gox
2761         $(BUILDPACKAGE)
2762 go/scanner/check: $(CHECK_DEPS)
2763         @$(MKDIR_P) go/scanner
2764         @$(CHECK)
2765 .PHONY: go/scanner/check
2766
2767 go/token.lo: $(go_go_token_files) fmt.gox gob.gox io.gox os.gox sort.gox \
2768                 strconv.gox sync.gox
2769         $(BUILDPACKAGE)
2770 go/token/check: $(CHECK_DEPS)
2771         @$(MKDIR_P) go/token
2772         @$(CHECK)
2773 .PHONY: go/token/check
2774
2775 hash/adler32.lo: $(go_hash_adler32_files) hash.gox os.gox
2776         $(BUILDPACKAGE)
2777 hash/adler32/check: $(CHECK_DEPS)
2778         @$(MKDIR_P) hash/adler32
2779         @$(CHECK)
2780 .PHONY: hash/adler32/check
2781
2782 hash/crc32.lo: $(go_hash_crc32_files) hash.gox os.gox sync.gox
2783         $(BUILDPACKAGE)
2784 hash/crc32/check: $(CHECK_DEPS)
2785         @$(MKDIR_P) hash/crc32
2786         @$(CHECK)
2787 .PHONY: hash/crc32/check
2788
2789 hash/crc64.lo: $(go_hash_crc64_files) hash.gox os.gox
2790         $(BUILDPACKAGE)
2791 hash/crc64/check: $(CHECK_DEPS)
2792         @$(MKDIR_P) hash/crc64
2793         @$(CHECK)
2794 .PHONY: hash/crc64/check
2795
2796 hash/fnv.lo: $(go_hash_fnv_files) encoding/binary.gox hash.gox os.gox
2797         $(BUILDPACKAGE)
2798 hash/fnv/check: $(CHECK_DEPS)
2799         @$(MKDIR_P) hash/fnv
2800         @$(CHECK)
2801 .PHONY: hash/fnv/check
2802
2803 http/cgi.lo: $(go_http_cgi_files) bufio.gox crypto/tls.gox exec.gox fmt.gox \
2804                 http.gox net.gox io.gox io/ioutil.gox log.gox os.gox \
2805                 path/filepath.gox regexp.gox strconv.gox strings.gox url.gox
2806         $(BUILDPACKAGE)
2807 http/cgi/check: $(CHECK_DEPS)
2808         @$(MKDIR_P) http/cgi
2809         @$(CHECK)
2810 .PHONY: http/cgi/check
2811
2812 http/fcgi.lo: $(go_http_fcgi_files) bufio.gox bytes.gox encoding/binary.gox \
2813                 fmt.gox http.gox http/cgi.gox io.gox net.gox os.gox sync.gox \
2814                 time.gox
2815         $(BUILDPACKAGE)
2816 http/fcgi/check: $(CHECK_DEPS)
2817         @$(MKDIR_P) http/fcgi
2818         @$(CHECK)
2819 .PHONY: http/fcgi/check
2820
2821 http/httptest.lo: $(go_http_httptest_files) bytes.gox crypto/rand.gox \
2822                 crypto/tls.gox flag.gox fmt.gox http.gox net.gox os.gox \
2823                 time.gox
2824         $(BUILDPACKAGE)
2825 http/httptest/check: $(CHECK_DEPS)
2826         @$(MKDIR_P) http/httptest
2827         @$(CHECK)
2828 .PHONY: http/httptest/check
2829
2830 http/pprof.lo: $(go_http_pprof_files) bufio.gox bytes.gox fmt.gox http.gox \
2831                 os.gox runtime.gox runtime/pprof.gox strconv.gox strings.gox
2832         $(BUILDPACKAGE)
2833 http/pprof/check: $(CHECK_DEPS)
2834         @$(MKDIR_P) http/pprof
2835         @$(CHECK)
2836 .PHONY: http/pprof/check
2837
2838 image/bmp.lo: $(go_image_bmp_files) image.gox image/color.gox io.gox os.gox
2839         $(BUILDPACKAGE)
2840 image/bmp/check: $(CHECK_DEPS)
2841         @$(MKDIR_P) image/bmp
2842         @$(CHECK)
2843 .PHONY: image/bmp/check
2844
2845 image/color.lo: $(go_image_color_files)
2846         $(BUILDPACKAGE)
2847 image/color/check: $(CHECK_DEPS)
2848         @$(MKDIR_P) image/color
2849         @$(CHECK)
2850 .PHONY: image/color/check
2851
2852 image/draw.lo: $(go_image_draw_files) image.gox image/color.gox image/ycbcr.gox
2853         $(BUILDPACKAGE)
2854 image/draw/check: $(CHECK_DEPS)
2855         @$(MKDIR_P) image/draw
2856         @$(CHECK)
2857 .PHONY: image/draw/check
2858
2859 image/gif.lo: $(go_image_gif_files) bufio.gox compress/lzw.gox fmt.gox \
2860                 image.gox image/color.gox io.gox os.gox
2861         $(BUILDPACKAGE)
2862 image/gif/check: $(CHECK_DEPS)
2863         @$(MKDIR_P) image/gif
2864         @$(CHECK)
2865 .PHONY: image/gif/check
2866
2867 image/jpeg.lo: $(go_image_jpeg_files) bufio.gox image.gox image/color.gox \
2868                 image/ycbcr.gox io.gox os.gox
2869         $(BUILDPACKAGE)
2870 image/jpeg/check: $(CHECK_DEPS)
2871         @$(MKDIR_P) image/jpeg
2872         @$(CHECK)
2873 .PHONY: image/jpeg/check
2874
2875 image/png.lo: $(go_image_png_files) bufio.gox compress/zlib.gox \
2876                 encoding/binary.gox fmt.gox hash.gox hash/crc32.gox image.gox \
2877                 image/color.gox io.gox os.gox strconv.gox
2878         $(BUILDPACKAGE)
2879 image/png/check: $(CHECK_DEPS)
2880         @$(MKDIR_P) image/png
2881         @$(CHECK)
2882 .PHONY: image/png/check
2883
2884 image/tiff.lo: $(go_image_tiff_files) bufio.gox compress/lzw.gox \
2885                 compress/zlib.gox encoding/binary.gox image.gox \
2886                 image/color.gox io.gox io/ioutil.gox os.gox
2887         $(BUILDPACKAGE)
2888 image/tiff/check: $(CHECK_DEPS)
2889         @$(MKDIR_P) image/tiff
2890         @$(CHECK)
2891 .PHONY: image/tiff/check
2892
2893 image/ycbcr.lo: $(go_image_ycbcr_files) image.gox image/color.gox
2894         $(BUILDPACKAGE)
2895 image/ycbcr/check: $(CHECK_DEPS)
2896         @$(MKDIR_P) image/ycbcr
2897         @$(CHECK)
2898 .PHONY: image/ycbcr/check
2899
2900 index/suffixarray.lo: $(go_index_suffixarray_files) bytes.gox \
2901                 encoding/binary.gox io.gox os.gox regexp.gox sort.gox
2902         $(BUILDPACKAGE)
2903 index/suffixarray/check: $(CHECK_DEPS)
2904         @$(MKDIR_P) index/suffixarray
2905         @$(CHECK)
2906 .PHONY: index/suffixarray/check
2907
2908 io/ioutil.lo: $(go_io_ioutil_files) bytes.gox io.gox os.gox path/filepath.gox \
2909                 sort.gox strconv.gox
2910         $(BUILDPACKAGE)
2911 io/ioutil/check: $(CHECK_DEPS)
2912         @$(MKDIR_P) io/ioutil
2913         @$(CHECK)
2914 .PHONY: io/ioutil/check
2915
2916 mime/multipart.lo: $(go_mime_multipart_files) bufio.gox bytes.gox \
2917                 crypto/rand.gox fmt.gox io.gox io/ioutil.gox mime.gox \
2918                 net/textproto.gox os.gox strings.gox
2919         $(BUILDPACKAGE)
2920 mime/multipart/check: $(CHECK_DEPS)
2921         @$(MKDIR_P) mime/multipart
2922         @$(CHECK)
2923 .PHONY: mime/multipart/check
2924
2925 net/dict.lo: $(go_net_dict_files) net/textproto.gox os.gox strconv.gox \
2926                 strings.gox
2927         $(BUILDPACKAGE)
2928
2929 net/textproto.lo: $(go_net_textproto_files) bufio.gox bytes.gox fmt.gox \
2930                 io.gox io/ioutil.gox net.gox os.gox strings.gox strconv.gox \
2931                 sync.gox
2932         $(BUILDPACKAGE)
2933 net/textproto/check: $(CHECK_DEPS)
2934         @$(MKDIR_P) net/textproto
2935         @$(CHECK)
2936 .PHONY: net/textproto/check
2937
2938 old/netchan.lo: $(go_old_netchan_files) gob.gox io.gox log.gox net.gox os.gox \
2939                 reflect.gox strconv.gox sync.gox time.gox
2940         $(BUILDPACKAGE)
2941 old/netchan/check: $(CHECK_DEPS)
2942         @$(MKDIR_P) old/netchan
2943         @$(CHECK)
2944 .PHONY: old/netchan/check
2945
2946 old/regexp.lo: $(go_old_regexp_files) bytes.gox io.gox os.gox strings.gox \
2947                 utf8.gox
2948         $(BUILDPACKAGE)
2949 old/regexp/check: $(CHECK_DEPS)
2950         @$(MKDIR_P) old/regexp
2951         @$(CHECK)
2952 .PHONY: old/regexp/check
2953
2954 old/template.lo: $(go_old_template_files) bytes.gox fmt.gox io.gox \
2955                 io/ioutil.gox os.gox reflect.gox strconv.gox strings.gox \
2956                 unicode.gox utf8.gox
2957         $(BUILDPACKAGE)
2958 old/template/check: $(CHECK_DEPS)
2959         @$(MKDIR_P) old/template
2960         @$(CHECK)
2961 .PHONY: old/template/check
2962
2963 os/inotify.lo: $(go_os_inotify_files) fmt.gox os.gox strings.gox syscall.gox
2964         $(BUILDPACKAGE)
2965 os/inotify/check: $(CHECK_DEPS)
2966         @$(MKDIR_P) os/inotify
2967         @$(CHECK)
2968 .PHONY: os/inotify/check
2969
2970 os/user.lo: $(go_os_user_files) fmt.gox os.gox runtime.gox strconv.gox \
2971                 strings.gox syscall.gox
2972         $(BUILDPACKAGE)
2973 os/user/check: $(CHECK_DEPS)
2974         @$(MKDIR_P) os/user
2975         @$(CHECK)
2976 .PHONY: os/user/check
2977
2978 os/signal.lo: $(go_os_signal_files) os.gox runtime.gox
2979         $(BUILDPACKAGE)
2980 os/signal/check: $(CHECK_DEPS)
2981         @$(MKDIR_P) os/signal
2982         @$(CHECK)
2983 .PHONY: os/signal/check
2984
2985 path/filepath.lo: $(go_path_filepath_files) bytes.gox os.gox runtime.gox \
2986                 sort.gox strings.gox utf8.gox
2987         $(BUILDPACKAGE)
2988 path/filepath/check: $(CHECK_DEPS)
2989         @$(MKDIR_P) path/filepath
2990         @$(CHECK)
2991 .PHONY: path/filepath/check
2992
2993 regexp/syntax.lo: $(go_regexp_syntax_files) bytes.gox os.gox sort.gox \
2994                 strconv.gox strings.gox unicode.gox utf8.gox
2995         $(BUILDPACKAGE)
2996 regexp/syntax/check: $(CHECK_DEPS)
2997         @$(MKDIR_P) regexp/syntax
2998         @$(CHECK)
2999 .PHONY: regexp/syntax/check
3000
3001 rpc/jsonrpc.lo: $(go_rpc_jsonrpc_files) fmt.gox io.gox json.gox net.gox \
3002                 os.gox rpc.gox sync.gox
3003         $(BUILDPACKAGE)
3004 rpc/jsonrpc/check: $(CHECK_DEPS)
3005         @$(MKDIR_P) rpc/jsonrpc
3006         @$(CHECK)
3007 .PHONY: rpc/jsonrpc/check
3008
3009 runtime/debug.lo: $(go_runtime_debug_files) bytes.gox fmt.gox io/ioutil.gox \
3010                 os.gox runtime.gox
3011         $(BUILDPACKAGE)
3012 runtime/debug/check: $(CHECK_DEPS)
3013         @$(MKDIR_P) runtime/debug
3014         @$(CHECK)
3015 .PHONY: runtime/debug/check
3016
3017 runtime/pprof.lo: $(go_runtime_pprof_files) bufio.gox fmt.gox io.gox os.gox \
3018                 runtime.gox sync.gox
3019         $(BUILDPACKAGE)
3020 runtime/pprof/check: $(CHECK_DEPS)
3021         @$(MKDIR_P) runtime/pprof
3022         @$(CHECK)
3023 .PHONY: runtime/pprof/check
3024
3025 sync/atomic.lo: $(go_sync_atomic_files)
3026         $(BUILDPACKAGE)
3027 sync/atomic_c.lo: $(go_sync_atomic_c_files) sync/atomic.lo
3028         $(LTCOMPILE) -c -o $@ $(srcdir)/go/sync/atomic/atomic.c
3029 sync/atomic/check: $(CHECK_DEPS)
3030         @$(MKDIR_P) sync/atomic
3031         @$(CHECK)
3032 .PHONY: sync/atomic/check
3033
3034 template/parse.lo: $(go_template_parse_files) bytes.gox fmt.gox os.gox \
3035                 runtime.gox strconv.gox strings.gox unicode.gox utf8.gox
3036         $(BUILDPACKAGE)
3037 template/parse/check: $(CHECK_DEPS)
3038         @$(MKDIR_P) template/parse
3039         @$(CHECK)
3040 .PHONY: template/parse/check
3041
3042 testing/iotest.lo: $(go_testing_iotest_files) io.gox log.gox os.gox
3043         $(BUILDPACKAGE)
3044 testing/iotest/check: $(CHECK_DEPS)
3045         @$(MKDIR_P) testing/iotest
3046         @$(CHECK)
3047 .PHONY: testing/iotest/check
3048
3049 testing/quick.lo: $(go_testing_quick_files) flag.gox fmt.gox math.gox os.gox \
3050                 rand.gox reflect.gox strings.gox
3051         $(BUILDPACKAGE)
3052 testing/quick/check: $(CHECK_DEPS)
3053         @$(MKDIR_P) testing/quick
3054         @$(CHECK)
3055 .PHONY: testing/quick/check
3056
3057 testing/script.lo: $(go_testing_script_files) fmt.gox os.gox rand.gox \
3058                 reflect.gox strings.gox
3059         $(BUILDPACKAGE)
3060 testing/script/check: $(CHECK_DEPS)
3061         @$(MKDIR_P) testing/script
3062         @$(CHECK)
3063 .PHONY: testing/script/check
3064
3065 syscall/syscall.lo: $(go_syscall_files) sync.gox
3066         $(BUILDPACKAGE)
3067 syscall/errno.lo: go/syscall/errno.c
3068         $(LTCOMPILE) -c -o $@ $<
3069 syscall/wait.lo: go/syscall/wait.c
3070         $(LTCOMPILE) -c -o $@ $<
3071
3072 # How to build a .gox file from a .lo file.
3073 BUILDGOX = \
3074         f=`echo $< | sed -e 's/.lo$$/.o/'`; \
3075         $(OBJCOPY) -j .go_export $$f $@.tmp && mv -f $@.tmp $@
3076
3077 asn1.gox: asn1/asn1.lo
3078         $(BUILDGOX)
3079 big.gox: big/big.lo
3080         $(BUILDGOX)
3081 bufio.gox: bufio/bufio.lo
3082         $(BUILDGOX)
3083 bytes.gox: bytes/bytes.lo
3084         $(BUILDGOX)
3085 cmath.gox: cmath/cmath.lo
3086         $(BUILDGOX)
3087 crypto.gox: crypto/crypto.lo
3088         $(BUILDGOX)
3089 csv.gox: csv/csv.lo
3090         $(BUILDGOX)
3091 exec.gox: exec/exec.lo
3092         $(BUILDGOX)
3093 expvar.gox: expvar/expvar.lo
3094         $(BUILDGOX)
3095 flag.gox: flag/flag.lo
3096         $(BUILDGOX)
3097 fmt.gox: fmt/fmt.lo
3098         $(BUILDGOX)
3099 gob.gox: gob/gob.lo
3100         $(BUILDGOX)
3101 hash.gox: hash/hash.lo
3102         $(BUILDGOX)
3103 html.gox: html/html.lo
3104         $(BUILDGOX)
3105 http.gox: http/http.lo
3106         $(BUILDGOX)
3107 image.gox: image/image.lo
3108         $(BUILDGOX)
3109 io.gox: io/io.lo
3110         $(BUILDGOX)
3111 json.gox: json/json.lo
3112         $(BUILDGOX)
3113 log.gox: log/log.lo
3114         $(BUILDGOX)
3115 math.gox: math/math.lo
3116         $(BUILDGOX)
3117 mail.gox: mail/mail.lo
3118         $(BUILDGOX)
3119 mime.gox: mime/mime.lo
3120         $(BUILDGOX)
3121 net.gox: net/net.lo
3122         $(BUILDGOX)
3123 os.gox: os/os.lo
3124         $(BUILDGOX)
3125 patch.gox: patch/patch.lo
3126         $(BUILDGOX)
3127 path.gox: path/path.lo
3128         $(BUILDGOX)
3129 rand.gox: rand/rand.lo
3130         $(BUILDGOX)
3131 reflect.gox: reflect/reflect.lo
3132         $(BUILDGOX)
3133 regexp.gox: regexp/regexp.lo
3134         $(BUILDGOX)
3135 rpc.gox: rpc/rpc.lo
3136         $(BUILDGOX)
3137 runtime.gox: runtime/runtime.lo
3138         $(BUILDGOX)
3139 scanner.gox: scanner/scanner.lo
3140         $(BUILDGOX)
3141 smtp.gox: smtp/smtp.lo
3142         $(BUILDGOX)
3143 sort.gox: sort/sort.lo
3144         $(BUILDGOX)
3145 strconv.gox: strconv/strconv.lo
3146         $(BUILDGOX)
3147 strings.gox: strings/strings.lo
3148         $(BUILDGOX)
3149 sync.gox: sync/sync.lo
3150         $(BUILDGOX)
3151 syslog.gox: syslog/syslog.lo
3152         $(BUILDGOX)
3153 syscall.gox: syscall/syscall.lo
3154         $(BUILDGOX)
3155 tabwriter.gox: tabwriter/tabwriter.lo
3156         $(BUILDGOX)
3157 template.gox: template/template.lo
3158         $(BUILDGOX)
3159 testing.gox: testing/testing.lo
3160         $(BUILDGOX)
3161 time.gox: time/time.lo
3162         $(BUILDGOX)
3163 unicode.gox: unicode/unicode.lo
3164         $(BUILDGOX)
3165 url.gox: url/url.lo
3166         $(BUILDGOX)
3167 utf16.gox: utf16/utf16.lo
3168         $(BUILDGOX)
3169 utf8.gox: utf8/utf8.lo
3170         $(BUILDGOX)
3171 websocket.gox: websocket/websocket.lo
3172         $(BUILDGOX)
3173 xml.gox: xml/xml.lo
3174         $(BUILDGOX)
3175
3176 archive/tar.gox: archive/tar.lo
3177         $(BUILDGOX)
3178 archive/zip.gox: archive/zip.lo
3179         $(BUILDGOX)
3180
3181 compress/bzip2.gox: compress/bzip2.lo
3182         $(BUILDGOX)
3183 compress/flate.gox: compress/flate.lo
3184         $(BUILDGOX)
3185 compress/gzip.gox: compress/gzip.lo
3186         $(BUILDGOX)
3187 compress/lzw.gox: compress/lzw.lo
3188         $(BUILDGOX)
3189 compress/zlib.gox: compress/zlib.lo
3190         $(BUILDGOX)
3191
3192 container/heap.gox: container/heap.lo
3193         $(BUILDGOX)
3194 container/list.gox: container/list.lo
3195         $(BUILDGOX)
3196 container/ring.gox: container/ring.lo
3197         $(BUILDGOX)
3198
3199 crypto/aes.gox: crypto/aes.lo
3200         $(BUILDGOX)
3201 crypto/bcrypt.gox: crypto/bcrypt.lo
3202         $(BUILDGOX)
3203 crypto/blowfish.gox: crypto/blowfish.lo
3204         $(BUILDGOX)
3205 crypto/cast5.gox: crypto/cast5.lo
3206         $(BUILDGOX)
3207 crypto/cipher.gox: crypto/cipher.lo
3208         $(BUILDGOX)
3209 crypto/des.gox: crypto/des.lo
3210         $(BUILDGOX)
3211 crypto/dsa.gox: crypto/dsa.lo
3212         $(BUILDGOX)
3213 crypto/ecdsa.gox: crypto/ecdsa.lo       
3214         $(BUILDGOX)
3215 crypto/elliptic.gox: crypto/elliptic.lo
3216         $(BUILDGOX)
3217 crypto/hmac.gox: crypto/hmac.lo
3218         $(BUILDGOX)
3219 crypto/md4.gox: crypto/md4.lo
3220         $(BUILDGOX)
3221 crypto/md5.gox: crypto/md5.lo
3222         $(BUILDGOX)
3223 crypto/ocsp.gox: crypto/ocsp.lo
3224         $(BUILDGOX)
3225 crypto/openpgp.gox: crypto/openpgp.lo
3226         $(BUILDGOX)
3227 crypto/rand.gox: crypto/rand.lo
3228         $(BUILDGOX)
3229 crypto/rc4.gox: crypto/rc4.lo
3230         $(BUILDGOX)
3231 crypto/ripemd160.gox: crypto/ripemd160.lo
3232         $(BUILDGOX)
3233 crypto/rsa.gox: crypto/rsa.lo
3234         $(BUILDGOX)
3235 crypto/sha1.gox: crypto/sha1.lo
3236         $(BUILDGOX)
3237 crypto/sha256.gox: crypto/sha256.lo
3238         $(BUILDGOX)
3239 crypto/sha512.gox: crypto/sha512.lo
3240         $(BUILDGOX)
3241 crypto/subtle.gox: crypto/subtle.lo
3242         $(BUILDGOX)
3243 crypto/tls.gox: crypto/tls.lo
3244         $(BUILDGOX)
3245 crypto/twofish.gox: crypto/twofish.lo
3246         $(BUILDGOX)
3247 crypto/x509.gox: crypto/x509.lo
3248         $(BUILDGOX)
3249 crypto/xtea.gox: crypto/xtea.lo
3250         $(BUILDGOX)
3251
3252 crypto/openpgp/armor.gox: crypto/openpgp/armor.lo
3253         $(BUILDGOX)
3254 crypto/openpgp/elgamal.gox: crypto/openpgp/elgamal.lo
3255         $(BUILDGOX)
3256 crypto/openpgp/error.gox: crypto/openpgp/error.lo
3257         $(BUILDGOX)
3258 crypto/openpgp/packet.gox: crypto/openpgp/packet.lo
3259         $(BUILDGOX)
3260 crypto/openpgp/s2k.gox: crypto/openpgp/s2k.lo
3261         $(BUILDGOX)
3262
3263 crypto/x509/pkix.gox: crypto/x509/pkix.lo
3264         $(BUILDGOX)
3265
3266 debug/dwarf.gox: debug/dwarf.lo
3267         $(BUILDGOX)
3268 debug/elf.gox: debug/elf.lo
3269         $(BUILDGOX)
3270 debug/gosym.gox: debug/gosym.lo
3271         $(BUILDGOX)
3272 debug/macho.gox: debug/macho.lo
3273         $(BUILDGOX)
3274 debug/pe.gox: debug/pe.lo
3275         $(BUILDGOX)
3276
3277 encoding/ascii85.gox: encoding/ascii85.lo
3278         $(BUILDGOX)
3279 encoding/base32.gox: encoding/base32.lo
3280         $(BUILDGOX)
3281 encoding/base64.gox: encoding/base64.lo
3282         $(BUILDGOX)
3283 encoding/binary.gox: encoding/binary.lo
3284         $(BUILDGOX)
3285 encoding/git85.gox: encoding/git85.lo
3286         $(BUILDGOX)
3287 encoding/hex.gox: encoding/hex.lo
3288         $(BUILDGOX)
3289 encoding/pem.gox: encoding/pem.lo
3290         $(BUILDGOX)
3291
3292 exp/ebnf.gox: exp/ebnf.lo
3293         $(BUILDGOX)
3294 exp/gui.gox: exp/gui.lo
3295         $(BUILDGOX)
3296 exp/norm.gox: exp/norm.lo
3297         $(BUILDGOX)
3298 exp/spdy.gox: exp/spdy.lo
3299         $(BUILDGOX)
3300 exp/sql.gox: exp/sql.lo
3301         $(BUILDGOX)
3302 exp/ssh.gox: exp/ssh.lo
3303         $(BUILDGOX)
3304 exp/terminal.gox: exp/terminal.lo
3305         $(BUILDGOX)
3306 exp/types.gox: exp/types.lo
3307         $(BUILDGOX)
3308
3309 exp/gui/x11.gox: exp/gui/x11.lo
3310         $(BUILDGOX)
3311
3312 exp/sql/driver.gox: exp/sql/driver.lo
3313         $(BUILDGOX)
3314
3315 exp/template/html.gox: exp/template/html.lo
3316         $(BUILDGOX)
3317
3318 go/ast.gox: go/ast.lo
3319         $(BUILDGOX)
3320 go/build.gox: go/build.lo
3321         $(BUILDGOX)
3322 go/doc.gox: go/doc.lo
3323         $(BUILDGOX)
3324 go/parser.gox: go/parser.lo
3325         $(BUILDGOX)
3326 go/printer.gox: go/printer.lo
3327         $(BUILDGOX)
3328 go/scanner.gox: go/scanner.lo
3329         $(BUILDGOX)
3330 go/token.gox: go/token.lo
3331         $(BUILDGOX)
3332
3333 hash/adler32.gox: hash/adler32.lo
3334         $(BUILDGOX)
3335 hash/crc32.gox: hash/crc32.lo
3336         $(BUILDGOX)
3337 hash/crc64.gox: hash/crc64.lo
3338         $(BUILDGOX)
3339 hash/fnv.gox: hash/fnv.lo
3340         $(BUILDGOX)
3341
3342 http/cgi.gox: http/cgi.lo
3343         $(BUILDGOX)
3344 http/fcgi.gox: http/fcgi.lo
3345         $(BUILDGOX)
3346 http/httptest.gox: http/httptest.lo
3347         $(BUILDGOX)
3348 http/pprof.gox: http/pprof.lo
3349         $(BUILDGOX)
3350
3351 image/bmp.gox: image/bmp.lo
3352         $(BUILDGOX)
3353 image/color.gox: image/color.lo
3354         $(BUILDGOX)
3355 image/draw.gox: image/draw.lo
3356         $(BUILDGOX)
3357 image/gif.gox: image/gif.lo
3358         $(BUILDGOX)
3359 image/jpeg.gox: image/jpeg.lo
3360         $(BUILDGOX)
3361 image/png.gox: image/png.lo
3362         $(BUILDGOX)
3363 image/tiff.gox: image/tiff.lo
3364         $(BUILDGOX)
3365 image/ycbcr.gox: image/ycbcr.lo
3366         $(BUILDGOX)
3367
3368 index/suffixarray.gox: index/suffixarray.lo
3369         $(BUILDGOX)
3370
3371 io/ioutil.gox: io/ioutil.lo
3372         $(BUILDGOX)
3373
3374 mime/multipart.gox: mime/multipart.lo
3375         $(BUILDGOX)
3376
3377 net/dict.gox: net/dict.lo
3378         $(BUILDGOX)
3379 net/textproto.gox: net/textproto.lo
3380         $(BUILDGOX)
3381
3382 old/netchan.gox: old/netchan.lo
3383         $(BUILDGOX)
3384 old/regexp.gox: old/regexp.lo
3385         $(BUILDGOX)
3386 old/template.gox: old/template.lo
3387         $(BUILDGOX)
3388
3389 os/inotify.gox: os/inotify.lo
3390         $(BUILDGOX)
3391 os/user.gox: os/user.lo
3392         $(BUILDGOX)
3393 os/signal.gox: os/signal.lo
3394         $(BUILDGOX)
3395
3396 path/filepath.gox: path/filepath.lo
3397         $(BUILDGOX)
3398
3399 regexp/syntax.gox: regexp/syntax.lo
3400         $(BUILDGOX)
3401
3402 rpc/jsonrpc.gox: rpc/jsonrpc.lo
3403         $(BUILDGOX)
3404
3405 runtime/debug.gox: runtime/debug.lo
3406         $(BUILDGOX)
3407 runtime/pprof.gox: runtime/pprof.lo
3408         $(BUILDGOX)
3409
3410 sync/atomic.gox: sync/atomic.lo
3411         $(BUILDGOX)
3412
3413 template/parse.gox: template/parse.lo
3414         $(BUILDGOX)
3415
3416 testing/iotest.gox: testing/iotest.lo
3417         $(BUILDGOX)
3418 testing/quick.gox: testing/quick.lo
3419         $(BUILDGOX)
3420 testing/script.gox: testing/script.lo
3421         $(BUILDGOX)
3422
3423 if LIBGO_IS_LINUX
3424 # os_inotify_check = os/inotify/check
3425 os_inotify_check =
3426 else
3427 os_inotify_check =
3428 endif
3429
3430 TEST_PACKAGES = \
3431         asn1/check \
3432         big/check \
3433         bufio/check \
3434         bytes/check \
3435         cmath/check \
3436         csv/check \
3437         exec/check \
3438         expvar/check \
3439         flag/check \
3440         fmt/check \
3441         gob/check \
3442         html/check \
3443         http/check \
3444         image/check \
3445         io/check \
3446         json/check \
3447         log/check \
3448         math/check \
3449         mail/check \
3450         mime/check \
3451         net/check \
3452         os/check \
3453         patch/check \
3454         path/check \
3455         rand/check \
3456         reflect/check \
3457         regexp/check \
3458         rpc/check \
3459         runtime/check \
3460         scanner/check \
3461         smtp/check \
3462         sort/check \
3463         strconv/check \
3464         strings/check \
3465         sync/check \
3466         syslog/check \
3467         tabwriter/check \
3468         template/check \
3469         time/check \
3470         unicode/check \
3471         url/check \
3472         utf16/check \
3473         utf8/check \
3474         websocket/check \
3475         xml/check \
3476         archive/tar/check \
3477         archive/zip/check \
3478         compress/bzip2/check \
3479         compress/flate/check \
3480         compress/gzip/check \
3481         compress/lzw/check \
3482         compress/zlib/check \
3483         container/heap/check \
3484         container/list/check \
3485         container/ring/check \
3486         crypto/aes/check \
3487         crypto/bcrypt/check \
3488         crypto/blowfish/check \
3489         crypto/cast5/check \
3490         crypto/cipher/check \
3491         crypto/des/check \
3492         crypto/dsa/check \
3493         crypto/ecdsa/check \
3494         crypto/elliptic/check \
3495         crypto/hmac/check \
3496         crypto/md4/check \
3497         crypto/md5/check \
3498         crypto/ocsp/check \
3499         crypto/openpgp/check \
3500         crypto/rand/check \
3501         crypto/rc4/check \
3502         crypto/ripemd160/check \
3503         crypto/rsa/check \
3504         crypto/sha1/check \
3505         crypto/sha256/check \
3506         crypto/sha512/check \
3507         crypto/subtle/check \
3508         crypto/tls/check \
3509         crypto/twofish/check \
3510         crypto/x509/check \
3511         crypto/xtea/check \
3512         crypto/openpgp/armor/check \
3513         crypto/openpgp/elgamal/check \
3514         crypto/openpgp/packet/check \
3515         crypto/openpgp/s2k/check \
3516         debug/dwarf/check \
3517         debug/elf/check \
3518         debug/macho/check \
3519         debug/pe/check \
3520         encoding/ascii85/check \
3521         encoding/base32/check \
3522         encoding/base64/check \
3523         encoding/binary/check \
3524         encoding/git85/check \
3525         encoding/hex/check \
3526         encoding/pem/check \
3527         exp/ebnf/check \
3528         exp/norm/check \
3529         exp/spdy/check \
3530         exp/sql/check \
3531         exp/ssh/check \
3532         exp/terminal/check \
3533         exp/template/html/check \
3534         go/ast/check \
3535         $(go_build_check_omitted_since_it_calls_6g) \
3536         go/parser/check \
3537         go/printer/check \
3538         go/scanner/check \
3539         go/token/check \
3540         $(go_types_check_omitted_since_it_calls_6g) \
3541         hash/adler32/check \
3542         hash/crc32/check \
3543         hash/crc64/check \
3544         hash/fnv/check \
3545         http/cgi/check \
3546         http/fcgi/check \
3547         image/draw/check \
3548         image/jpeg/check \
3549         image/png/check \
3550         image/tiff/check \
3551         image/ycbcr/check \
3552         index/suffixarray/check \
3553         io/ioutil/check \
3554         mime/multipart/check \
3555         net/textproto/check \
3556         old/netchan/check \
3557         old/regexp/check \
3558         old/template/check \
3559         $(os_inotify_check) \
3560         os/user/check \
3561         os/signal/check \
3562         path/filepath/check \
3563         regexp/syntax/check \
3564         rpc/jsonrpc/check \
3565         sync/atomic/check \
3566         template/parse/check \
3567         testing/quick/check \
3568         testing/script/check
3569
3570 check: check-tail
3571 check-recursive: check-head
3572
3573 check-head:
3574         @echo "Test Run By $${USER} on `date`" > libgo.head
3575         @echo "Native configuration is $(host_triplet)" >> libgo.head
3576         @echo >> libgo.head
3577         @echo "         === libgo tests ===" >> libgo.head
3578         @echo >> libgo.head
3579
3580 check-tail: check-recursive check-multi
3581         @lib=`${PWD_COMMAND} | sed -e 's,^.*/\([^/][^/]*\)$$,\1,'`; \
3582         for dir in . $(MULTIDIRS); do \
3583           mv ../$${dir}/$${lib}/libgo.sum ../$${dir}/$${lib}/libgo.sum.sep; \
3584           mv ../$${dir}/$${lib}/libgo.log ../$${dir}/$${lib}/libgo.log.sep; \
3585         done; \
3586         mv libgo.head libgo.sum; \
3587         cp libgo.sum libgo.log; \
3588         echo "Schedule of variations:" >> libgo.sum; \
3589         for dir in . $(MULTIDIRS); do \
3590           multidir=../$${dir}/$${lib}; \
3591           multivar=`cat $${multidir}/libgo.var`; \
3592           echo "    $${multivar}" >> libgo.sum; \
3593         done; \
3594         echo >> libgo.sum; \
3595         pass=0; fail=0; untested=0; \
3596         for dir in . $(MULTIDIRS); do \
3597           multidir=../$${dir}/$${lib}; \
3598           multivar=`cat $${multidir}/libgo.var`; \
3599           echo "Running target $${multivar}" >> libgo.sum; \
3600           echo "Running $(srcdir)/libgo.exp ..." >> libgo.sum; \
3601           cat $${multidir}/libgo.sum.sep >> libgo.sum; \
3602           cat $${multidir}/libgo.log.sep >> libgo.log; \
3603           if test -n "${MULTIDIRS}"; then \
3604             echo "              === libgo Summary for $${multivar} ===" >> libgo.sum; \
3605             echo >> libgo.sum; \
3606           fi; \
3607           p=`grep -c PASS $${multidir}/libgo.sum.sep`; \
3608           pass=`expr $$pass + $$p`; \
3609           if test "$$p" -ne "0" && test -n "${MULTIDIRS}"; then \
3610             echo "# of expected passes          $$p" >> libgo.sum; \
3611           fi; \
3612           p=`grep -c FAIL $${multidir}/libgo.sum.sep`; \
3613           fail=`expr $$fail + $$p`; \
3614           if test "$$p" -ne "0" && test -n "${MULTIDIRS}"; then \
3615             echo "# of unexpected failures      $$p" >> libgo.sum; \
3616           fi; \
3617           p=`grep -c UNTESTED $${multidir}/libgo.sum.sep`; \
3618           untested=`expr $$untested + $$p`; \
3619           if test "$$p" -ne "0" && test -n "${MULTIDIRS}"; then \
3620             echo "# of untested testcases               $$p" >> libgo.sum; \
3621           fi; \
3622         done; \
3623         echo >> libgo.sum; \
3624         echo "          === libgo Summary ===" >> libgo.sum; \
3625         echo >> libgo.sum; \
3626         if test "$$pass" -ne "0"; then \
3627           echo "# of expected passes            $$pass" >> libgo.sum; \
3628         fi; \
3629         if test "$$fail" -ne "0"; then \
3630           echo "# of unexpected failures        $$fail" >> libgo.sum; \
3631         fi; \
3632         if test "$$untested" -ne "0"; then \
3633           echo "# of untested testcases         $$untested" >> libgo.sum; \
3634         fi; \
3635         echo `echo $(GOC) | sed -e 's/ .*//'`  `$(GOC) -v 2>&1 | grep " version" | sed -n -e 's/.* \(version.*$$\)/\1/p'` >> libgo.sum; \
3636         echo >> libgo.log; \
3637         echo "runtest completed at `date`" >> libgo.log; \
3638         if test "$$fail" -ne "0"; then \
3639           status=1; \
3640         else \
3641           status=0; \
3642         fi; \
3643         exit $$status
3644
3645 check-am:
3646         @rm -f libgo.sum libgo.log libgo.tail
3647         @multivar="unix"; \
3648         [ -z "$(MULTIFLAGS)" ] || multivar="$${multivar}/$(MULTIFLAGS)"; \
3649         echo "$${multivar}" > libgo.var
3650         @for f in $(TEST_PACKAGES); do \
3651            rm -f $$f-testsum $$f-testlog; \
3652          done
3653         -@$(MAKE) -k $(TEST_PACKAGES)
3654         @for f in $(TEST_PACKAGES); do \
3655           if test -f $$f-testsum; then \
3656             cat $$f-testsum >> libgo.sum; \
3657           fi; \
3658           if test -f $$f-testlog; then \
3659             cat $$f-testlog >> libgo.log; \
3660           fi; \
3661         done
3662
3663 check-multi:
3664         $(MULTIDO) $(AM_MAKEFLAGS) DO=check-am multi-do # $(MAKE)
3665
3666 MOSTLYCLEAN_FILES = libgo.head libgo.sum.sep libgo.log.sep
3667
3668 mostlyclean-local:
3669         find . -name '*.lo' -print | xargs $(LIBTOOL) --mode=clean rm -f
3670         find . -name '*.$(OBJEXT)' -print | xargs rm -f
3671         find . -name '*-testsum' -print | xargs rm -f
3672         find . -name '*-testlog' -print | xargs rm -f
3673
3674 CLEANFILES = *.go *.gox goc2c *.c s-version libgo.sum libgo.log
3675
3676 clean-local:
3677         find . -name '*.la' -print | xargs $(LIBTOOL) --mode=clean rm -f
3678         find . -name '*.a' -print | xargs rm -f