OSDN Git Service

c40456f62f652ef2bbe0dca921e183f7b688cfca
[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)/../gcc -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         ebnf.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         mime.gox \
124         net.gox \
125         netchan.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         try.gox \
147         unicode.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         container/vector.gox
175
176 toolexeclibgocryptodir = $(toolexeclibgodir)/crypto
177
178 toolexeclibgocrypto_DATA = \
179         crypto/aes.gox \
180         crypto/block.gox \
181         crypto/blowfish.gox \
182         crypto/cast5.gox \
183         crypto/cipher.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/error.gox \
210         crypto/openpgp/packet.gox \
211         crypto/openpgp/s2k.gox
212
213 toolexeclibgodebugdir = $(toolexeclibgodir)/debug
214
215 toolexeclibgodebug_DATA = \
216         debug/dwarf.gox \
217         debug/elf.gox \
218         debug/gosym.gox \
219         debug/macho.gox \
220         debug/pe.gox \
221         debug/proc.gox
222
223 toolexeclibgoencodingdir = $(toolexeclibgodir)/encoding
224
225 toolexeclibgoencoding_DATA = \
226         encoding/ascii85.gox \
227         encoding/base32.gox \
228         encoding/base64.gox \
229         encoding/binary.gox \
230         encoding/line.gox \
231         encoding/git85.gox \
232         encoding/hex.gox \
233         encoding/pem.gox
234
235 toolexeclibgoexpdir = $(toolexeclibgodir)/exp
236
237 toolexeclibgoexp_DATA = \
238         exp/datafmt.gox \
239         exp/draw.gox \
240         exp/eval.gox
241
242 toolexeclibgogodir = $(toolexeclibgodir)/go
243
244 toolexeclibgogo_DATA = \
245         go/ast.gox \
246         go/doc.gox \
247         go/parser.gox \
248         go/printer.gox \
249         go/scanner.gox \
250         go/token.gox \
251         go/typechecker.gox
252
253 toolexeclibgohashdir = $(toolexeclibgodir)/hash
254
255 toolexeclibgohash_DATA = \
256         hash/adler32.gox \
257         hash/crc32.gox \
258         hash/crc64.gox \
259         hash/fnv.gox
260
261 toolexeclibgohttpdir = $(toolexeclibgodir)/http
262
263 toolexeclibgohttp_DATA = \
264         http/cgi.gox \
265         http/httptest.gox \
266         http/pprof.gox
267
268 toolexeclibgoimagedir = $(toolexeclibgodir)/image
269
270 toolexeclibgoimage_DATA = \
271         image/jpeg.gox \
272         image/png.gox
273
274 toolexeclibgoindexdir = $(toolexeclibgodir)/index
275
276 toolexeclibgoindex_DATA = \
277         index/suffixarray.gox
278
279 toolexeclibgoiodir = $(toolexeclibgodir)/io
280
281 toolexeclibgoio_DATA = \
282         io/ioutil.gox
283
284 toolexeclibgomimedir = $(toolexeclibgodir)/mime
285
286 toolexeclibgomime_DATA = \
287         mime/multipart.gox
288
289 toolexeclibgonetdir = $(toolexeclibgodir)/net
290
291 toolexeclibgonet_DATA = \
292         net/dict.gox \
293         net/textproto.gox
294
295 toolexeclibgoosdir = $(toolexeclibgodir)/os
296
297 if LIBGO_IS_LINUX
298 # os_inotify_gox = os/inotify.gox
299 os_inotify_gox =
300 else
301 os_inotify_gox =
302 endif
303
304 toolexeclibgoos_DATA = \
305         $(os_inotify_gox) \
306         os/signal.gox
307
308 toolexeclibgopathdir = $(toolexeclibgodir)/path
309
310 toolexeclibgopath_DATA = \
311         path/filepath.gox
312
313 toolexeclibgorpcdir = $(toolexeclibgodir)/rpc
314
315 toolexeclibgorpc_DATA = \
316         rpc/jsonrpc.gox
317
318 toolexeclibgoruntimedir = $(toolexeclibgodir)/runtime
319
320 toolexeclibgoruntime_DATA = \
321         runtime/debug.gox \
322         runtime/pprof.gox
323
324 toolexeclibgosyncdir = $(toolexeclibgodir)/sync
325
326 toolexeclibgosync_DATA = \
327         sync/atomic.gox
328
329 toolexeclibgotestingdir = $(toolexeclibgodir)/testing
330
331 toolexeclibgotesting_DATA = \
332         testing/iotest.gox \
333         testing/quick.gox \
334         testing/script.gox
335
336 if HAVE_SYS_MMAN_H
337 runtime_mem_file = runtime/mem.c
338 else
339 runtime_mem_file = runtime/mem_posix_memalign.c
340 endif
341
342 if LIBGO_IS_RTEMS
343 rtems_task_variable_add_file = runtime/rtems-task-variable-add.c
344 else
345 rtems_task_variable_add_file =
346 endif
347
348 runtime_files = \
349         runtime/go-append.c \
350         runtime/go-assert.c \
351         runtime/go-assert-interface.c \
352         runtime/go-byte-array-to-string.c \
353         runtime/go-breakpoint.c \
354         runtime/go-caller.c \
355         runtime/go-can-convert-interface.c \
356         runtime/go-cgo.c \
357         runtime/go-chan-cap.c \
358         runtime/go-chan-len.c \
359         runtime/go-check-interface.c \
360         runtime/go-close.c \
361         runtime/go-construct-map.c \
362         runtime/go-convert-interface.c \
363         runtime/go-copy.c \
364         runtime/go-defer.c \
365         runtime/go-deferred-recover.c \
366         runtime/go-eface-compare.c \
367         runtime/go-eface-val-compare.c \
368         runtime/go-getgoroot.c \
369         runtime/go-go.c \
370         runtime/go-gomaxprocs.c \
371         runtime/go-int-array-to-string.c \
372         runtime/go-int-to-string.c \
373         runtime/go-interface-compare.c \
374         runtime/go-interface-eface-compare.c \
375         runtime/go-interface-val-compare.c \
376         runtime/go-lock-os-thread.c \
377         runtime/go-map-delete.c \
378         runtime/go-map-index.c \
379         runtime/go-map-len.c \
380         runtime/go-map-range.c \
381         runtime/go-nanotime.c \
382         runtime/go-new-channel.c \
383         runtime/go-new-map.c \
384         runtime/go-new.c \
385         runtime/go-note.c \
386         runtime/go-panic.c \
387         runtime/go-panic-defer.c \
388         runtime/go-print.c \
389         runtime/go-rec-big.c \
390         runtime/go-rec-nb-big.c \
391         runtime/go-rec-nb-small.c \
392         runtime/go-rec-small.c \
393         runtime/go-recover.c \
394         runtime/go-reflect.c \
395         runtime/go-reflect-call.c \
396         runtime/go-reflect-chan.c \
397         runtime/go-reflect-map.c \
398         runtime/go-rune.c \
399         runtime/go-runtime-error.c \
400         runtime/go-sched.c \
401         runtime/go-select.c \
402         runtime/go-semacquire.c \
403         runtime/go-send-big.c \
404         runtime/go-send-nb-big.c \
405         runtime/go-send-nb-small.c \
406         runtime/go-send-small.c \
407         runtime/go-signal.c \
408         runtime/go-strcmp.c \
409         runtime/go-string-to-byte-array.c \
410         runtime/go-string-to-int-array.c \
411         runtime/go-strplus.c \
412         runtime/go-strslice.c \
413         runtime/go-trampoline.c \
414         runtime/go-type-eface.c \
415         runtime/go-type-error.c \
416         runtime/go-type-identity.c \
417         runtime/go-type-interface.c \
418         runtime/go-type-string.c \
419         runtime/go-typedesc-equal.c \
420         runtime/go-typestring.c \
421         runtime/go-unreflect.c \
422         runtime/go-unsafe-new.c \
423         runtime/go-unsafe-newarray.c \
424         runtime/go-unsafe-pointer.c \
425         runtime/go-unwind.c \
426         runtime/cpuprof.c \
427         runtime/mcache.c \
428         runtime/mcentral.c \
429         $(runtime_mem_file) \
430         runtime/mfinal.c \
431         runtime/mfixalloc.c \
432         runtime/mgc0.c \
433         runtime/mheap.c \
434         runtime/msize.c \
435         runtime/proc.c \
436         runtime/thread.c \
437         $(rtems_task_variable_add_file) \
438         chan.c \
439         iface.c \
440         malloc.c \
441         map.c \
442         mprof.c \
443         reflect.c \
444         sigqueue.c \
445         string.c
446
447 goc2c.$(OBJEXT): runtime/goc2c.c
448         $(CC_FOR_BUILD) -c $(CFLAGS_FOR_BUILD) $<
449
450 goc2c: goc2c.$(OBJEXT)
451         $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) -o $@ $<
452
453 malloc.c: $(srcdir)/runtime/malloc.goc goc2c
454         ./goc2c --gcc --go-prefix libgo_runtime $< > $@.tmp
455         mv -f $@.tmp $@
456
457 mprof.c: $(srcdir)/runtime/mprof.goc goc2c
458         ./goc2c --gcc --go-prefix libgo_runtime $< > $@.tmp
459         mv -f $@.tmp $@
460
461 reflect.c: $(srcdir)/runtime/reflect.goc goc2c
462         ./goc2c --gcc --go-prefix libgo_reflect $< > $@.tmp
463         mv -f $@.tmp $@
464
465 sigqueue.c: $(srcdir)/runtime/sigqueue.goc goc2c
466         ./goc2c --gcc --go-prefix libgo_runtime $< > $@.tmp
467         mv -f $@.tmp $@
468
469 %.c: $(srcdir)/runtime/%.goc goc2c
470         ./goc2c --gcc $< > $@.tmp
471         mv -f $@.tmp $@
472
473 go_asn1_files = \
474         go/asn1/asn1.go \
475         go/asn1/common.go \
476         go/asn1/marshal.go
477
478 go_big_files = \
479         go/big/arith.go \
480         go/big/int.go \
481         go/big/nat.go \
482         go/big/rat.go
483
484 go_bufio_files = \
485         go/bufio/bufio.go
486
487 go_bytes_files = \
488         go/bytes/buffer.go \
489         go/bytes/bytes.go \
490         go/bytes/bytes_decl.go
491 go_bytes_c_files = \
492         go/bytes/indexbyte.c
493
494 go_cmath_files = \
495         go/cmath/abs.go \
496         go/cmath/asin.go \
497         go/cmath/conj.go \
498         go/cmath/exp.go \
499         go/cmath/isinf.go \
500         go/cmath/isnan.go \
501         go/cmath/log.go \
502         go/cmath/phase.go \
503         go/cmath/polar.go \
504         go/cmath/pow.go \
505         go/cmath/rect.go \
506         go/cmath/sin.go \
507         go/cmath/sqrt.go \
508         go/cmath/tan.go
509
510 go_crypto_files = \
511         go/crypto/crypto.go
512
513 go_ebnf_files = \
514         go/ebnf/ebnf.go \
515         go/ebnf/parser.go
516
517 go_exec_files = \
518         go/exec/exec.go \
519         go/exec/lp_unix.go
520
521 go_expvar_files = \
522         go/expvar/expvar.go
523
524 go_flag_files = \
525         go/flag/flag.go
526
527 go_fmt_files = \
528         go/fmt/doc.go \
529         go/fmt/format.go \
530         go/fmt/print.go \
531         go/fmt/scan.go
532
533 go_gob_files = \
534         go/gob/decode.go \
535         go/gob/decoder.go \
536         go/gob/doc.go \
537         go/gob/encode.go \
538         go/gob/encoder.go \
539         go/gob/error.go \
540         go/gob/type.go
541
542 go_hash_files = \
543         go/hash/hash.go
544
545 go_html_files = \
546         go/html/doc.go \
547         go/html/entity.go \
548         go/html/escape.go \
549         go/html/parse.go \
550         go/html/token.go
551
552 go_http_files = \
553         go/http/chunked.go \
554         go/http/client.go \
555         go/http/cookie.go \
556         go/http/dump.go \
557         go/http/fs.go \
558         go/http/header.go \
559         go/http/lex.go \
560         go/http/persist.go \
561         go/http/request.go \
562         go/http/response.go \
563         go/http/server.go \
564         go/http/status.go \
565         go/http/transfer.go \
566         go/http/transport.go \
567         go/http/url.go
568
569 go_image_files = \
570         go/image/color.go \
571         go/image/format.go \
572         go/image/geom.go \
573         go/image/image.go \
574         go/image/names.go
575
576 go_io_files = \
577         go/io/multi.go \
578         go/io/io.go \
579         go/io/pipe.go
580
581 go_json_files = \
582         go/json/decode.go \
583         go/json/encode.go \
584         go/json/indent.go \
585         go/json/scanner.go \
586         go/json/stream.go
587
588 go_log_files = \
589         go/log/log.go
590
591 go_math_files = \
592         go/math/acosh.go \
593         go/math/asin.go \
594         go/math/asinh.go \
595         go/math/atan.go \
596         go/math/atanh.go \
597         go/math/atan2.go \
598         go/math/bits.go \
599         go/math/cbrt.go \
600         go/math/const.go \
601         go/math/copysign.go \
602         go/math/erf.go \
603         go/math/exp.go \
604         go/math/exp_port.go \
605         go/math/exp2.go \
606         go/math/expm1.go \
607         go/math/fabs.go \
608         go/math/fdim.go \
609         go/math/floor.go \
610         go/math/fmod.go \
611         go/math/frexp.go \
612         go/math/gamma.go \
613         go/math/hypot.go \
614         go/math/hypot_port.go \
615         go/math/j0.go \
616         go/math/j1.go \
617         go/math/jn.go \
618         go/math/ldexp.go \
619         go/math/lgamma.go \
620         go/math/log.go \
621         go/math/log1p.go \
622         go/math/log10.go \
623         go/math/logb.go \
624         go/math/modf.go \
625         go/math/nextafter.go \
626         go/math/pow.go \
627         go/math/pow10.go \
628         go/math/remainder.go \
629         go/math/signbit.go \
630         go/math/sin.go \
631         go/math/sincos.go \
632         go/math/sinh.go \
633         go/math/sqrt.go \
634         go/math/sqrt_port.go \
635         go/math/tan.go \
636         go/math/tanh.go \
637         go/math/unsafe.go
638
639 go_mime_files = \
640         go/mime/grammar.go \
641         go/mime/mediatype.go \
642         go/mime/type.go
643
644 if LIBGO_IS_RTEMS
645 go_net_fd_os_file = go/net/fd_select.go
646 go_net_newpollserver_file = go/net/newpollserver_rtems.go
647 else # !LIBGO_IS_RTEMS
648 if LIBGO_IS_LINUX
649 go_net_fd_os_file = go/net/fd_linux.go
650 go_net_newpollserver_file = go/net/newpollserver.go
651 else # !LIBGO_IS_LINUX && !LIBGO_IS_RTEMS
652 # By default use select with pipes.  Most systems should have
653 # something better.
654 go_net_fd_os_file = go/net/fd_select.go
655 go_net_newpollserver_file = go/net/newpollserver.go
656 endif # !LIBGO_IS_LINUX
657 endif # !LIBGO_IS_RTEMS
658
659 go_net_files = \
660         go/net/cgo_stub.go \
661         go/net/dial.go \
662         go/net/dnsclient.go \
663         go/net/dnsconfig.go \
664         go/net/dnsmsg.go \
665         $(go_net_newpollserver_file) \
666         go/net/fd.go \
667         $(go_net_fd_os_file) \
668         go/net/file.go \
669         go/net/hosts.go \
670         go/net/ip.go \
671         go/net/iprawsock.go \
672         go/net/ipsock.go \
673         go/net/lookup.go \
674         go/net/net.go \
675         go/net/parse.go \
676         go/net/pipe.go \
677         go/net/port.go \
678         go/net/sock.go \
679         go/net/tcpsock.go \
680         go/net/udpsock.go \
681         go/net/unixsock.go
682
683 go_netchan_files = \
684         go/netchan/common.go \
685         go/netchan/export.go \
686         go/netchan/import.go
687
688 if LIBGO_IS_SOLARIS
689 if LIBGO_IS_386
690 go_os_dir_file = go/os/dir_largefile.go
691 else
692 if LIBGO_IS_SPARC
693 go_os_dir_file = go/os/dir_largefile.go
694 else
695 go_os_dir_file = go/os/dir_regfile.go
696 endif
697 endif
698 else
699 if LIBGO_IS_LINUX
700 go_os_dir_file = go/os/dir_largefile.go
701 else
702 go_os_dir_file = go/os/dir_regfile.go
703 endif
704 endif
705
706 if LIBGO_IS_LINUX
707 go_os_sys_file = go/os/sys_linux.go
708 else
709 if LIBGO_IS_SOLARIS
710 go_os_sys_file = go/os/sys_uname.go
711 else
712 if LIBGO_IS_IRIX
713 go_os_sys_file = go/os/sys_uname.go
714 else
715 if LIBGO_IS_RTEMS
716 go_os_sys_file = go/os/sys_uname.go
717 else
718 go_os_sys_file = go/os/sys_bsd.go
719 endif
720 endif
721 endif
722 endif
723
724 go_os_files = \
725         $(go_os_dir_file) \
726         go/os/dir.go \
727         go/os/env.go \
728         go/os/env_unix.go \
729         go/os/error.go \
730         go/os/exec.go \
731         go/os/exec_unix.go \
732         go/os/file.go \
733         go/os/file_unix.go \
734         go/os/getwd.go \
735         go/os/path.go \
736         go/os/proc.go \
737         go/os/stat.go \
738         $(go_os_sys_file) \
739         go/os/time.go \
740         go/os/types.go
741
742 go_patch_files = \
743         go/patch/apply.go \
744         go/patch/git.go \
745         go/patch/patch.go \
746         go/patch/textdiff.go
747
748 go_path_files = \
749         go/path/match.go \
750         go/path/path.go
751
752 go_rand_files = \
753         go/rand/exp.go \
754         go/rand/normal.go \
755         go/rand/rand.go \
756         go/rand/rng.go \
757         go/rand/zipf.go
758
759 go_reflect_files = \
760         go/reflect/deepequal.go \
761         go/reflect/type.go \
762         go/reflect/value.go
763
764 go_regexp_files = \
765         go/regexp/regexp.go
766
767 go_rpc_files = \
768         go/rpc/client.go \
769         go/rpc/debug.go \
770         go/rpc/server.go
771
772 go_runtime_files = \
773         go/runtime/debug.go \
774         go/runtime/error.go \
775         go/runtime/extern.go \
776         go/runtime/mem.go \
777         go/runtime/sig.go \
778         go/runtime/softfloat64.go \
779         go/runtime/type.go \
780         version.go
781
782 version.go: s-version; @true
783 s-version: Makefile
784         rm -f version.go.tmp
785         echo "package runtime" > version.go.tmp
786         echo 'const defaultGoroot = "$(prefix)"' >> version.go.tmp
787         echo 'const theVersion = "'`$(CC) --version | sed 1q`'"' >> version.go.tmp
788         echo 'const theGoarch = "'$(GOARCH)'"' >> version.go.tmp
789         echo 'const theGoos = "'$(GOOS)'"' >> version.go.tmp
790         $(SHELL) $(srcdir)/../move-if-change version.go.tmp version.go
791         $(STAMP) $@
792
793 go_scanner_files = \
794         go/scanner/scanner.go
795
796 go_smtp_files = \
797         go/smtp/auth.go \
798         go/smtp/smtp.go
799
800 go_sort_files = \
801         go/sort/search.go \
802         go/sort/sort.go
803
804 go_strconv_files = \
805         go/strconv/atob.go \
806         go/strconv/atof.go \
807         go/strconv/atoi.go \
808         go/strconv/decimal.go \
809         go/strconv/ftoa.go \
810         go/strconv/itoa.go \
811         go/strconv/quote.go
812
813 go_strings_files = \
814         go/strings/reader.go \
815         go/strings/strings.go
816
817 go_sync_files = \
818         go/sync/cond.go \
819         go/sync/mutex.go \
820         go/sync/once.go \
821         go/sync/rwmutex.go \
822         go/sync/waitgroup.go
823
824 if LIBGO_IS_SOLARIS
825 go_syslog_file = go/syslog/syslog_solaris.go
826 else
827 go_syslog_file = go/syslog/syslog_unix.go
828 endif
829
830 go_syslog_files = \
831         go/syslog/syslog.go \
832         $(go_syslog_file)
833 go_syslog_c_files = \
834         go/syslog/syslog_c.c
835
836 go_tabwriter_files = \
837         go/tabwriter/tabwriter.go
838
839 go_template_files = \
840         go/template/format.go \
841         go/template/template.go
842
843 go_testing_files = \
844         go/testing/benchmark.go \
845         go/testing/testing.go
846
847 go_time_files = \
848         go/time/format.go \
849         go/time/sleep.go \
850         go/time/sys.go \
851         go/time/tick.go \
852         go/time/time.go \
853         go/time/zoneinfo_unix.go
854
855 go_try_files = \
856         go/try/try.go
857
858 go_unicode_files = \
859         go/unicode/casetables.go \
860         go/unicode/digit.go \
861         go/unicode/letter.go \
862         go/unicode/tables.go
863
864 go_utf16_files = \
865         go/utf16/utf16.go
866
867 go_utf8_files = \
868         go/utf8/string.go \
869         go/utf8/utf8.go
870
871 go_websocket_files = \
872         go/websocket/client.go \
873         go/websocket/server.go \
874         go/websocket/websocket.go
875
876 go_xml_files = \
877         go/xml/read.go \
878         go/xml/xml.go
879
880 go_archive_tar_files = \
881         go/archive/tar/common.go \
882         go/archive/tar/reader.go \
883         go/archive/tar/writer.go
884
885 go_archive_zip_files = \
886         go/archive/zip/reader.go \
887         go/archive/zip/struct.go
888
889 go_compress_bzip2_files = \
890         go/compress/bzip2/bit_reader.go \
891         go/compress/bzip2/bzip2.go \
892         go/compress/bzip2/huffman.go \
893         go/compress/bzip2/move_to_front.go
894
895 go_compress_flate_files = \
896         go/compress/flate/deflate.go \
897         go/compress/flate/huffman_bit_writer.go \
898         go/compress/flate/huffman_code.go \
899         go/compress/flate/inflate.go \
900         go/compress/flate/reverse_bits.go \
901         go/compress/flate/token.go \
902         go/compress/flate/util.go
903
904 go_compress_gzip_files = \
905         go/compress/gzip/gzip.go \
906         go/compress/gzip/gunzip.go
907
908 go_compress_lzw_files = \
909         go/compress/lzw/reader.go \
910         go/compress/lzw/writer.go
911
912 go_compress_zlib_files = \
913         go/compress/zlib/reader.go \
914         go/compress/zlib/writer.go
915
916 go_container_heap_files = \
917         go/container/heap/heap.go
918
919 go_container_list_files = \
920         go/container/list/list.go
921
922 go_container_ring_files = \
923         go/container/ring/ring.go
924
925 go_container_vector_files = \
926         go/container/vector/defs.go \
927         go/container/vector/intvector.go \
928         go/container/vector/stringvector.go \
929         go/container/vector/vector.go
930
931 go_crypto_aes_files = \
932         go/crypto/aes/block.go \
933         go/crypto/aes/cipher.go \
934         go/crypto/aes/const.go
935 go_crypto_block_files = \
936         go/crypto/block/cbc.go \
937         go/crypto/block/cfb.go \
938         go/crypto/block/cmac.go \
939         go/crypto/block/cipher.go \
940         go/crypto/block/ctr.go \
941         go/crypto/block/eax.go \
942         go/crypto/block/ecb.go \
943         go/crypto/block/ofb.go \
944         go/crypto/block/xor.go
945 go_crypto_blowfish_files = \
946         go/crypto/blowfish/block.go \
947         go/crypto/blowfish/const.go \
948         go/crypto/blowfish/cipher.go
949 go_crypto_cast5_files = \
950         go/crypto/cast5/cast5.go
951 go_crypto_cipher_files = \
952         go/crypto/cipher/cbc.go \
953         go/crypto/cipher/cfb.go \
954         go/crypto/cipher/cipher.go \
955         go/crypto/cipher/ctr.go \
956         go/crypto/cipher/io.go \
957         go/crypto/cipher/ocfb.go \
958         go/crypto/cipher/ofb.go
959 go_crypto_dsa_files = \
960         go/crypto/dsa/dsa.go
961 go_crypto_ecdsa_files = \
962         go/crypto/ecdsa/ecdsa.go
963 go_crypto_elliptic_files = \
964         go/crypto/elliptic/elliptic.go
965 go_crypto_hmac_files = \
966         go/crypto/hmac/hmac.go
967 go_crypto_md4_files = \
968         go/crypto/md4/md4.go \
969         go/crypto/md4/md4block.go
970 go_crypto_md5_files = \
971         go/crypto/md5/md5.go \
972         go/crypto/md5/md5block.go
973 go_crypto_ocsp_files = \
974         go/crypto/ocsp/ocsp.go
975 go_crypto_openpgp_files = \
976         go/crypto/openpgp/canonical_text.go \
977         go/crypto/openpgp/keys.go \
978         go/crypto/openpgp/read.go \
979         go/crypto/openpgp/write.go
980 go_crypto_rand_files = \
981         go/crypto/rand/rand.go \
982         go/crypto/rand/rand_unix.go
983 go_crypto_rc4_files = \
984         go/crypto/rc4/rc4.go
985 go_crypto_ripemd160_files = \
986         go/crypto/ripemd160/ripemd160.go \
987         go/crypto/ripemd160/ripemd160block.go
988 go_crypto_rsa_files = \
989         go/crypto/rsa/pkcs1v15.go \
990         go/crypto/rsa/rsa.go
991 go_crypto_sha1_files = \
992         go/crypto/sha1/sha1.go \
993         go/crypto/sha1/sha1block.go
994 go_crypto_sha256_files = \
995         go/crypto/sha256/sha256.go \
996         go/crypto/sha256/sha256block.go
997 go_crypto_sha512_files = \
998         go/crypto/sha512/sha512.go \
999         go/crypto/sha512/sha512block.go
1000 go_crypto_subtle_files = \
1001         go/crypto/subtle/constant_time.go
1002 go_crypto_tls_files = \
1003         go/crypto/tls/alert.go \
1004         go/crypto/tls/ca_set.go \
1005         go/crypto/tls/cipher_suites.go \
1006         go/crypto/tls/common.go \
1007         go/crypto/tls/conn.go \
1008         go/crypto/tls/handshake_client.go \
1009         go/crypto/tls/handshake_messages.go \
1010         go/crypto/tls/handshake_server.go \
1011         go/crypto/tls/key_agreement.go \
1012         go/crypto/tls/prf.go \
1013         go/crypto/tls/tls.go
1014 go_crypto_twofish_files = \
1015         go/crypto/twofish/twofish.go
1016 go_crypto_x509_files = \
1017         go/crypto/x509/x509.go
1018 go_crypto_xtea_files = \
1019         go/crypto/xtea/block.go \
1020         go/crypto/xtea/cipher.go
1021
1022 go_crypto_openpgp_armor_files = \
1023         go/crypto/openpgp/armor/armor.go \
1024         go/crypto/openpgp/armor/encode.go
1025 go_crypto_openpgp_error_files = \
1026         go/crypto/openpgp/error/error.go
1027 go_crypto_openpgp_packet_files = \
1028         go/crypto/openpgp/packet/compressed.go \
1029         go/crypto/openpgp/packet/encrypted_key.go \
1030         go/crypto/openpgp/packet/literal.go \
1031         go/crypto/openpgp/packet/one_pass_signature.go \
1032         go/crypto/openpgp/packet/packet.go \
1033         go/crypto/openpgp/packet/private_key.go \
1034         go/crypto/openpgp/packet/public_key.go \
1035         go/crypto/openpgp/packet/reader.go \
1036         go/crypto/openpgp/packet/signature.go \
1037         go/crypto/openpgp/packet/symmetric_key_encrypted.go \
1038         go/crypto/openpgp/packet/symmetrically_encrypted.go \
1039         go/crypto/openpgp/packet/userid.go
1040 go_crypto_openpgp_s2k_files = \
1041         go/crypto/openpgp/s2k/s2k.go
1042
1043 go_debug_dwarf_files = \
1044         go/debug/dwarf/buf.go \
1045         go/debug/dwarf/const.go \
1046         go/debug/dwarf/entry.go \
1047         go/debug/dwarf/open.go \
1048         go/debug/dwarf/type.go \
1049         go/debug/dwarf/unit.go
1050 go_debug_elf_files = \
1051         go/debug/elf/elf.go \
1052         go/debug/elf/file.go
1053 go_debug_gosym_files = \
1054         go/debug/gosym/pclntab.go \
1055         go/debug/gosym/symtab.go
1056 go_debug_macho_files = \
1057         go/debug/macho/file.go \
1058         go/debug/macho/macho.go
1059 go_debug_pe_files = \
1060         go/debug/pe/file.go \
1061         go/debug/pe/pe.go
1062
1063 go_debug_proc_files = \
1064         go/debug/proc/proc.go \
1065         go/debug/proc/proc_$(GOOS).go \
1066         $(GO_DEBUG_PROC_REGS_OS_ARCH_FILE)
1067
1068 go_encoding_ascii85_files = \
1069         go/encoding/ascii85/ascii85.go
1070 go_encoding_base32_files = \
1071         go/encoding/base32/base32.go
1072 go_encoding_base64_files = \
1073         go/encoding/base64/base64.go
1074 go_encoding_binary_files = \
1075         go/encoding/binary/binary.go
1076 go_encoding_git85_files = \
1077         go/encoding/git85/git.go
1078 go_encoding_hex_files = \
1079         go/encoding/hex/hex.go
1080 go_encoding_line_files = \
1081         go/encoding/line/line.go
1082 go_encoding_pem_files = \
1083         go/encoding/pem/pem.go
1084
1085 go_exp_datafmt_files = \
1086         go/exp/datafmt/datafmt.go \
1087         go/exp/datafmt/parser.go
1088 go_exp_draw_files = \
1089         go/exp/draw/draw.go \
1090         go/exp/draw/event.go
1091 go_exp_eval_files = \
1092         go/exp/eval/abort.go \
1093         go/exp/eval/bridge.go \
1094         go/exp/eval/compiler.go \
1095         go/exp/eval/expr.go \
1096         go/exp/eval/expr1.go \
1097         go/exp/eval/func.go \
1098         go/exp/eval/scope.go \
1099         go/exp/eval/stmt.go \
1100         go/exp/eval/type.go \
1101         go/exp/eval/typec.go \
1102         go/exp/eval/value.go \
1103         go/exp/eval/world.go
1104
1105 go_go_ast_files = \
1106         go/go/ast/ast.go \
1107         go/go/ast/filter.go \
1108         go/go/ast/print.go \
1109         go/go/ast/resolve.go \
1110         go/go/ast/scope.go \
1111         go/go/ast/walk.go
1112 go_go_doc_files = \
1113         go/go/doc/comment.go \
1114         go/go/doc/doc.go
1115 go_go_parser_files = \
1116         go/go/parser/interface.go \
1117         go/go/parser/parser.go
1118 go_go_printer_files = \
1119         go/go/printer/nodes.go \
1120         go/go/printer/printer.go
1121 go_go_scanner_files = \
1122         go/go/scanner/errors.go \
1123         go/go/scanner/scanner.go
1124 go_go_token_files = \
1125         go/go/token/position.go \
1126         go/go/token/token.go
1127 go_go_typechecker_files = \
1128         go/go/typechecker/scope.go \
1129         go/go/typechecker/type.go \
1130         go/go/typechecker/typechecker.go \
1131         go/go/typechecker/universe.go
1132
1133 go_hash_adler32_files = \
1134         go/hash/adler32/adler32.go
1135 go_hash_crc32_files = \
1136         go/hash/crc32/crc32.go
1137 go_hash_crc64_files = \
1138         go/hash/crc64/crc64.go
1139 go_hash_fnv_files = \
1140         go/hash/fnv/fnv.go
1141
1142 go_http_cgi_files = \
1143         go/http/cgi/child.go \
1144         go/http/cgi/host.go
1145 go_http_httptest_files = \
1146         go/http/httptest/recorder.go \
1147         go/http/httptest/server.go
1148 go_http_pprof_files = \
1149         go/http/pprof/pprof.go
1150
1151 go_image_jpeg_files = \
1152         go/image/jpeg/huffman.go \
1153         go/image/jpeg/idct.go \
1154         go/image/jpeg/reader.go
1155
1156 go_image_png_files = \
1157         go/image/png/reader.go \
1158         go/image/png/writer.go
1159
1160 go_index_suffixarray_files = \
1161         go/index/suffixarray/qsufsort.go \
1162         go/index/suffixarray/suffixarray.go
1163
1164 go_io_ioutil_files = \
1165         go/io/ioutil/ioutil.go \
1166         go/io/ioutil/tempfile.go
1167
1168 go_mime_multipart_files = \
1169         go/mime/multipart/multipart.go
1170
1171 go_net_dict_files = \
1172         go/net/dict/dict.go
1173
1174 go_net_textproto_files = \
1175         go/net/textproto/header.go \
1176         go/net/textproto/pipeline.go \
1177         go/net/textproto/reader.go \
1178         go/net/textproto/textproto.go \
1179         go/net/textproto/writer.go
1180
1181 go_os_inotify_files = \
1182         go/os/inotify/inotify_linux.go
1183
1184 go_os_signal_files = \
1185         go/os/signal/signal.go \
1186         unix.go
1187
1188 go_path_filepath_files = \
1189         go/path/filepath/match.go \
1190         go/path/filepath/path.go \
1191         go/path/filepath/path_unix.go
1192
1193 go_rpc_jsonrpc_files = \
1194         go/rpc/jsonrpc/client.go \
1195         go/rpc/jsonrpc/server.go
1196
1197 go_runtime_debug_files = \
1198         go/runtime/debug/stack.go
1199 go_runtime_pprof_files = \
1200         go/runtime/pprof/pprof.go
1201
1202 go_sync_atomic_files = \
1203         go/sync/atomic/doc.go
1204 go_sync_atomic_c_files = \
1205         go/sync/atomic/atomic.c
1206
1207 go_testing_iotest_files = \
1208         go/testing/iotest/logger.go \
1209         go/testing/iotest/reader.go \
1210         go/testing/iotest/writer.go
1211 go_testing_quick_files = \
1212         go/testing/quick/quick.go
1213 go_testing_script_files = \
1214         go/testing/script/script.go
1215
1216 # Define Syscall and Syscall6.
1217 if LIBGO_IS_RTEMS
1218 syscall_syscall_file = syscalls/syscall_stubs.go
1219 else
1220 syscall_syscall_file = syscalls/syscall.go
1221 endif
1222
1223 # Declare libc functions that vary for largefile systems.
1224 if LIBGO_IS_LINUX
1225 # Always use lseek64 on GNU/Linux.
1226 syscall_filesize_file = syscalls/sysfile_largefile.go
1227 syscall_stat_file = syscalls/sysfile_stat_largefile.go
1228 else # !LIBGO_IS_LINUX
1229 if LIBGO_IS_SOLARIS
1230 if LIBGO_IS_386
1231 # Use lseek64 on 32-bit Solaris/x86.
1232 syscall_filesize_file = syscalls/sysfile_largefile.go
1233 syscall_stat_file = syscalls/sysfile_stat_largefile.go
1234 else # !LIBGO_IS_386
1235 if LIBGO_IS_SPARC
1236 # Use lseek64 on 32-bit Solaris/SPARC.
1237 syscall_filesize_file = syscalls/sysfile_largefile.go
1238 syscall_stat_file = syscalls/sysfile_stat_largefile.go
1239 else # !LIBGO_IS_386 && !LIBGO_IS_SPARC
1240 # Use lseek on 64-bit Solaris.
1241 syscall_filesize_file = syscalls/sysfile_regfile.go
1242 syscall_stat_file = syscalls/sysfile_stat_regfile.go
1243 endif # !LIBGO_IS_386 && !LIBGO_IS_SPARC
1244 endif # !LIBGO_IS_SOLARIS
1245 else # !LIBGO_IS_LINUX && !LIBGO_IS_SOLARIS
1246 # Use lseek by default.
1247 syscall_filesize_file = syscalls/sysfile_regfile.go
1248 syscall_stat_file = syscalls/sysfile_stat_regfile.go
1249 endif # !LIBGO_IS_SOLARIS
1250 endif # !LIBGO_IS_LINUX
1251
1252
1253 # Define ForkExec, PtraceForkExec, and Exec.
1254 if LIBGO_IS_RTEMS
1255 syscall_exec_os_file = syscalls/exec_stubs.go
1256 else
1257 syscall_exec_os_file = syscalls/exec.go
1258 endif
1259
1260 # Define Wait4.
1261 if HAVE_WAIT4
1262 syscall_wait_file = syscalls/wait4.go
1263 else
1264 syscall_wait_file = syscalls/waitpid.go
1265 endif
1266
1267 # Define Sleep.
1268 if LIBGO_IS_RTEMS
1269 syscall_sleep_file = syscalls/sleep_rtems.go
1270 else
1271 syscall_sleep_file = syscalls/sleep_select.go
1272 endif
1273
1274 # Define Errstr.
1275 if LIBGO_IS_RTEMS
1276 syscall_errstr_file = syscalls/errstr_rtems.go
1277 else
1278 if HAVE_STRERROR_R
1279 syscall_errstr_file = syscalls/errstr.go
1280 else
1281 syscall_errstr_file = syscalls/errstr_nor.go
1282 endif
1283 endif
1284
1285 # Declare libc_strerror_r which is the Go name for strerror_r.
1286 if LIBGO_IS_RTEMS
1287 # RTEMS uses newlib in which strerror_r returns char *.
1288 syscall_errstr_decl_file = syscalls/errstr_decl_rtems.go
1289 else
1290 if LIBGO_IS_LINUX
1291 # On GNU/Linux the POSIX strerror_r is called __xpg_strerror_r.
1292 syscall_errstr_decl_file = syscalls/errstr_decl_linux.go
1293 else
1294 # On other systems we hope strerror_r is just strerror_r.
1295 syscall_errstr_decl_file = syscalls/errstr_decl.go
1296 endif
1297 endif
1298
1299 # Define socket sizes and types.
1300 if LIBGO_IS_LINUX
1301 syscall_socket_os_file = syscalls/socket_linux.go
1302 else
1303 if LIBGO_IS_SOLARIS
1304 syscall_socket_os_file = syscalls/socket_solaris.go
1305 else
1306 syscall_socket_os_file = syscalls/socket_bsd.go
1307 endif
1308 endif
1309
1310 # Support for epoll.
1311 if LIBGO_IS_LINUX
1312 syscall_socket_epoll_file = syscalls/socket_epoll.go
1313 else
1314 syscall_socket_epoll_file =
1315 endif
1316
1317 # Support for uname.
1318 if LIBGO_IS_SOLARIS
1319 if LIBGO_IS_386
1320 # 32-bit Solaris 2/x86 needs _nuname, handled in syscall_solaris_386.go.
1321 syscall_uname_file =
1322 else # !LIBGO_IS_386 && LIBGO_IS_SOLARIS
1323 syscall_uname_file = syscalls/syscall_uname.go
1324 endif
1325 else # !LIBGO_IS_SOLARIS
1326 syscall_uname_file = syscalls/syscall_uname.go
1327 endif
1328
1329 syscall_arch.go: s-syscall_arch; @true
1330 s-syscall_arch: Makefile
1331         rm -f syscall_arch.go.tmp
1332         echo "package syscall" > syscall_arch.go.tmp
1333         echo 'const ARCH = "'$(GOARCH)'"' >> syscall_arch.go.tmp
1334         echo 'const OS = "'$(GOOS)'"' >> syscall_arch.go.tmp
1335         $(SHELL) $(srcdir)/../move-if-change syscall_arch.go.tmp syscall_arch.go
1336         $(STAMP) $@
1337
1338 go_syscall_files = \
1339         $(syscall_errstr_file) \
1340         $(syscall_errstr_decl_file) \
1341         syscalls/exec_helpers.go \
1342         $(syscall_exec_os_file) \
1343         $(syscall_wait_file) \
1344         $(syscall_filesize_file) \
1345         $(syscall_stat_file) \
1346         $(syscall_sleep_file) \
1347         syscalls/socket.go \
1348         $(syscall_socket_os_file) \
1349         $(syscall_socket_epoll_file) \
1350         $(syscall_syscall_file) \
1351         $(syscall_uname_file) \
1352         syscalls/syscall_unix.go \
1353         syscalls/stringbyte.go \
1354         syscalls/syscall_$(GOOS).go \
1355         $(GO_SYSCALLS_SYSCALL_OS_ARCH_FILE) \
1356         syscalls/sysfile_posix.go \
1357         sysinfo.go \
1358         syscall_arch.go
1359 go_syscall_c_files = \
1360         syscalls/errno.c
1361
1362 if LIBGO_IS_LINUX
1363 # os_lib_inotify_lo = os/inotify.lo
1364 os_lib_inotify_lo =
1365 else
1366 os_lib_inotify_lo =
1367 endif
1368
1369 libgo_go_objs = \
1370         asn1/asn1.lo \
1371         big/big.lo \
1372         bufio/bufio.lo \
1373         bytes/bytes.lo \
1374         bytes/index.lo \
1375         cmath/cmath.lo \
1376         crypto/crypto.lo \
1377         ebnf/ebnf.lo \
1378         exec/exec.lo \
1379         expvar/expvar.lo \
1380         flag/flag.lo \
1381         fmt/fmt.lo \
1382         gob/gob.lo \
1383         hash/hash.lo \
1384         html/html.lo \
1385         http/http.lo \
1386         image/image.lo \
1387         io/io.lo \
1388         json/json.lo \
1389         log/log.lo \
1390         math/math.lo \
1391         mime/mime.lo \
1392         net/net.lo \
1393         netchan/netchan.lo \
1394         os/os.lo \
1395         patch/patch.lo \
1396         path/path.lo \
1397         rand/rand.lo \
1398         reflect/reflect.lo \
1399         regexp/regexp.lo \
1400         rpc/rpc.lo \
1401         runtime/runtime.lo \
1402         scanner/scanner.lo \
1403         smtp/smtp.lo \
1404         sort/sort.lo \
1405         strconv/strconv.lo \
1406         strings/strings.lo \
1407         sync/sync.lo \
1408         syslog/syslog.lo \
1409         syslog/syslog_c.lo \
1410         tabwriter/tabwriter.lo \
1411         template/template.lo \
1412         time/time.lo \
1413         try/try.lo \
1414         unicode/unicode.lo \
1415         utf16/utf16.lo \
1416         utf8/utf8.lo \
1417         websocket/websocket.lo \
1418         xml/xml.lo \
1419         archive/tar.lo \
1420         archive/zip.lo \
1421         compress/bzip2.lo \
1422         compress/flate.lo \
1423         compress/gzip.lo \
1424         compress/lzw.lo \
1425         compress/zlib.lo \
1426         container/heap.lo \
1427         container/list.lo \
1428         container/ring.lo \
1429         container/vector.lo \
1430         crypto/aes.lo \
1431         crypto/block.lo \
1432         crypto/blowfish.lo \
1433         crypto/cast5.lo \
1434         crypto/cipher.lo \
1435         crypto/dsa.lo \
1436         crypto/ecdsa.lo \
1437         crypto/elliptic.lo \
1438         crypto/hmac.lo \
1439         crypto/md4.lo \
1440         crypto/md5.lo \
1441         crypto/ocsp.lo \
1442         crypto/openpgp.lo \
1443         crypto/rand.lo \
1444         crypto/rc4.lo \
1445         crypto/ripemd160.lo \
1446         crypto/rsa.lo \
1447         crypto/sha1.lo \
1448         crypto/sha256.lo \
1449         crypto/sha512.lo \
1450         crypto/subtle.lo \
1451         crypto/tls.lo \
1452         crypto/twofish.lo \
1453         crypto/x509.lo \
1454         crypto/xtea.lo \
1455         crypto/openpgp/armor.lo \
1456         crypto/openpgp/error.lo \
1457         crypto/openpgp/packet.lo \
1458         crypto/openpgp/s2k.lo \
1459         debug/dwarf.lo \
1460         debug/elf.lo \
1461         debug/gosym.lo \
1462         debug/macho.lo \
1463         debug/pe.lo \
1464         debug/proc.lo \
1465         encoding/ascii85.lo \
1466         encoding/base32.lo \
1467         encoding/base64.lo \
1468         encoding/binary.lo \
1469         encoding/git85.lo \
1470         encoding/hex.lo \
1471         encoding/line.lo \
1472         encoding/pem.lo \
1473         exp/datafmt.lo \
1474         exp/draw.lo \
1475         exp/eval.lo \
1476         go/ast.lo \
1477         go/doc.lo \
1478         go/parser.lo \
1479         go/printer.lo \
1480         go/scanner.lo \
1481         go/token.lo \
1482         go/typechecker.lo \
1483         hash/adler32.lo \
1484         hash/crc32.lo \
1485         hash/crc64.lo \
1486         hash/fnv.lo \
1487         http/cgi.lo \
1488         http/httptest.lo \
1489         http/pprof.lo \
1490         image/jpeg.lo \
1491         image/png.lo \
1492         index/suffixarray.lo \
1493         io/ioutil.lo \
1494         mime/multipart.lo \
1495         net/dict.lo \
1496         net/textproto.lo \
1497         $(os_lib_inotify_lo) \
1498         os/signal.lo \
1499         path/filepath.lo \
1500         rpc/jsonrpc.lo \
1501         runtime/debug.lo \
1502         runtime/pprof.lo \
1503         sync/atomic.lo \
1504         sync/atomic_c.lo \
1505         syscalls/syscall.lo \
1506         syscalls/errno.lo \
1507         testing/testing.lo \
1508         testing/iotest.lo \
1509         testing/quick.lo \
1510         testing/script.lo
1511
1512 libgo_la_SOURCES = $(runtime_files)
1513
1514 libgo_la_LDFLAGS = $(PTHREAD_CFLAGS) $(AM_LDFLAGS)
1515
1516 libgo_la_LIBADD = \
1517         $(libgo_go_objs) $(LIBFFI) $(PTHREAD_LIBS) $(MATH_LIBS) $(NET_LIBS)
1518
1519 libgobegin_a_SOURCES = \
1520         runtime/go-main.c
1521
1522 LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/../libtool-ldflags $(LDFLAGS))
1523
1524 GOCFLAGS = $(CFLAGS)
1525 AM_GOCFLAGS = $(STRINGOPS_FLAG)
1526 GOCOMPILE = $(GOC) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_GOCFLAGS) $(GOCFLAGS)
1527
1528 LTGOCOMPILE = $(LIBTOOL) --tag GO --mode=compile $(GOC) $(INCLUDES) \
1529         $(AM_GOCFLAGS) $(GOCFLAGS)
1530
1531 GOLINK = $(LIBTOOL) --tag GO --mode-link $(GOC) \
1532         $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_GOCFLAGS) $(LTLDFLAGS) -o $@
1533
1534 # Build the .go files for a package, generating a .lo file.
1535 BUILDPACKAGE = \
1536         $(MKDIR_P) $(@D); \
1537         files=`echo $^ | sed -e 's/[^ ]*\.gox//g'`; \
1538         $(LTGOCOMPILE) -I . -c -fgo-prefix="libgo_$(@D)" -o $@ $$files
1539
1540 if LIBGO_IS_RTEMS
1541 use_dejagnu = yes
1542 else
1543 use_dejagnu = no
1544 endif
1545
1546 GOTESTFLAGS =
1547
1548 # Check a package.
1549 CHECK = \
1550         GC="$(GOC) -L `${PWD_COMMAND}` -L `${PWD_COMMAND}`/.libs -Wl,-R,`${PWD_COMMAND}`/.libs"; \
1551         export GC; \
1552         RUNTESTFLAGS="$(RUNTESTFLAGS)"; \
1553         export RUNTESTFLAGS; \
1554         MAKE="$(MAKE)"; \
1555         export MAKE; \
1556         rm -f $@-testsum $@-testlog; \
1557         prefix=`if test "$(@D)" = "regexp"; then echo regexp-test; else dirname $(@D); fi`; \
1558         test "$${prefix}" != "." || prefix="$(@D)"; \
1559         if test "$(use_dejagnu)" = "yes"; then \
1560           $(SHELL) $(srcdir)/testsuite/gotest --dejagnu=yes --basedir=$(srcdir) --srcdir=$(srcdir)/go/$(@D) --prefix="libgo_$${prefix}" --pkgfiles="$(go_$(subst /,_,$(@D))_files)" --testname="$(@D)" $(GOTESTFLAGS); \
1561         else \
1562           if $(SHELL) $(srcdir)/testsuite/gotest --basedir=$(srcdir) --srcdir=$(srcdir)/go/$(@D) --prefix="libgo_$${prefix}" --pkgfiles="$(go_$(subst /,_,$(@D))_files)" $(GOTESTFLAGS) >>$@-testlog 2>&1; then \
1563             echo "PASS: $(@D)" >> $@-testlog; \
1564             echo "PASS: $(@D)"; \
1565             echo "PASS: $(@D)" > $@-testsum; \
1566           else \
1567             echo "FAIL: $(@D)" >> $@-testlog; \
1568             cat $@-testlog; \
1569             echo "FAIL: $(@D)" > $@-testsum; \
1570             exit 1; \
1571           fi; \
1572         fi
1573
1574 # Check a package that is only tested if GCCGO_RUN_ALL_TESTS is set.
1575 CHECK_ON_REQUEST = \
1576         if test "$$GCCGO_RUN_ALL_TESTS" != ""; then \
1577           $(CHECK); \
1578         else \
1579           rm -f $@-testsum $@-testlog; \
1580           echo "Set GCCGO_RUN_ALL_TESTS in environment to run $(@D) test" > $@-testlog; \
1581           echo "UNTESTED: $(@D)" >> $@-testlog; \
1582           echo "UNTESTED: $(@D)"; \
1583           echo "UNTESTED: $(@D)" > $@-testsum; \
1584         fi
1585
1586 # Build all packages before checking any.
1587 CHECK_DEPS = libgo.la libgobegin.a \
1588         $(toolexeclibgo_DATA) \
1589         $(toolexeclibgoarchive_DATA) \
1590         $(toolexeclibgocompress_DATA) \
1591         $(toolexeclibgocontainer_DATA) \
1592         $(toolexeclibgocrypto_DATA) \
1593         $(toolexeclibgocryptoopenpgp_DATA) \
1594         $(toolexeclibgodebug_DATA) \
1595         $(toolexeclibgoencoding_DATA) \
1596         $(toolexeclibgoexp_DATA) \
1597         $(toolexeclibgogo_DATA) \
1598         $(toolexeclibgohash_DATA) \
1599         $(toolexeclibgohttp_DATA) \
1600         $(toolexeclibgoimage_DATA) \
1601         $(toolexeclibgoindex_DATA) \
1602         $(toolexeclibgoio_DATA) \
1603         $(toolexeclibgomime_DATA) \
1604         $(toolexeclibgonet_DATA) \
1605         $(toolexeclibgoos_DATA) \
1606         $(toolexeclibgopath_DATA) \
1607         $(toolexeclibgorpc_DATA) \
1608         $(toolexeclibgoruntime_DATA) \
1609         $(toolexeclibgosync_DATA) \
1610         $(toolexeclibgotesting_DATA)
1611
1612 asn1/asn1.lo: $(go_asn1_files) bytes.gox fmt.gox io.gox os.gox reflect.gox \
1613                 strconv.gox strings.gox time.gox
1614         $(BUILDPACKAGE)
1615 asn1/check: $(CHECK_DEPS)
1616         @$(CHECK)
1617 .PHONY: asn1/check
1618
1619 big/big.lo: $(go_big_files) fmt.gox rand.gox strings.gox os.gox
1620         $(BUILDPACKAGE)
1621 big/check: $(CHECK_DEPS)
1622         @$(CHECK)
1623 .PHONY: big/check
1624
1625 bufio/bufio.lo: $(go_bufio_files) bytes.gox io.gox os.gox strconv.gox utf8.gox
1626         $(BUILDPACKAGE)
1627 bufio/check: $(CHECK_DEPS)
1628         @$(CHECK)
1629 .PHONY: bufio/check
1630
1631 bytes/bytes.lo: $(go_bytes_files) io.gox os.gox unicode.gox utf8.gox
1632         $(BUILDPACKAGE)
1633 bytes/index.lo: $(go_bytes_c_files) bytes/bytes.lo
1634         $(LTCOMPILE) -c -o bytes/index.lo $(srcdir)/go/bytes/indexbyte.c
1635 bytes/check: $(CHECK_DEPS)
1636         @$(CHECK)
1637 .PHONY: bytes/check
1638
1639 cmath/cmath.lo: $(go_cmath_files) math.gox
1640         $(BUILDPACKAGE)
1641 cmath/check: $(CHECK_DEPS)
1642         @$(CHECK)
1643 .PHONY: cmath/check
1644
1645 crypto/crypto.lo: $(go_crypto_files) hash.gox
1646         $(BUILDPACKAGE)
1647 crypto/check: $(CHECK_DEPS)
1648         @$(CHECK)
1649 .PHONY: crypto/check
1650
1651 ebnf/ebnf.lo: $(go_ebnf_files) container/vector.gox go/scanner.gox \
1652                 go/token.gox os.gox strconv.gox unicode.gox utf8.gox
1653         $(BUILDPACKAGE)
1654 ebnf/check: $(CHECK_DEPS)
1655         @$(CHECK)
1656 .PHONY: ebnf/check
1657
1658 exec/exec.lo: $(go_exec_files) os.gox strconv.gox strings.gox
1659         $(BUILDPACKAGE)
1660 exec/check: $(CHECK_DEPS)
1661         @$(CHECK)
1662 .PHONY: exec/check
1663
1664 expvar/expvar.lo: $(go_expvar_files) bytes.gox fmt.gox http.gox json.gox \
1665                 log.gox os.gox runtime.gox strconv.gox sync.gox
1666         $(BUILDPACKAGE)
1667 expvar/check: $(CHECK_DEPS)
1668         @$(CHECK)
1669 .PHONY: expvar/check
1670
1671 flag/flag.lo: $(go_flag_files) fmt.gox os.gox strconv.gox
1672         $(BUILDPACKAGE)
1673 flag/check: $(CHECK_DEPS)
1674         @$(CHECK)
1675 .PHONY: flag/check
1676
1677 fmt/fmt.lo: $(go_fmt_files) bytes.gox io.gox math.gox os.gox reflect.gox \
1678                 strconv.gox strings.gox unicode.gox utf8.gox
1679         $(BUILDPACKAGE)
1680 fmt/check: $(CHECK_DEPS)
1681         @$(CHECK)
1682 .PHONY: fmt/check
1683
1684 gob/gob.lo: $(go_gob_files) bufio.gox bytes.gox fmt.gox io.gox math.gox \
1685                 os.gox reflect.gox runtime.gox strings.gox sync.gox \
1686                 unicode.gox utf8.gox
1687         $(BUILDPACKAGE)
1688 gob/check: $(CHECK_DEPS)
1689         @$(CHECK)
1690 .PHONY: gob/check
1691
1692 hash/hash.lo: $(go_hash_files) io.gox
1693         $(BUILDPACKAGE)
1694 hash/check: $(CHECK_DEPS)
1695         @$(CHECK)
1696 .PHONY: hash/check
1697
1698 html/html.lo: $(go_html_files) bytes.gox io.gox os.gox strconv.gox strings.gox \
1699                 utf8.gox
1700         $(BUILDPACKAGE)
1701 html/check: $(CHECK_DEPS)
1702         @$(CHECK)
1703 .PHONY: html/check
1704
1705 http/http.lo: $(go_http_files) bufio.gox bytes.gox container/vector.gox \
1706                 crypto/rand.gox crypto/tls.gox encoding/base64.gox fmt.gox \
1707                 io.gox io/ioutil.gox log.gox mime.gox mime/multipart.gox \
1708                 net.gox net/textproto.gox os.gox path.gox path/filepath.gox \
1709                 sort.gox strconv.gox strings.gox sync.gox time.gox utf8.gox
1710         $(BUILDPACKAGE)
1711 http/check: $(CHECK_DEPS)
1712         @$(CHECK)
1713 .PHONY: http/check
1714
1715 image/image.lo: $(go_image_files) bufio.gox io.gox os.gox strconv.gox
1716         $(BUILDPACKAGE)
1717 image/check: $(CHECK_DEPS)
1718         @$(CHECK)
1719 .PHONY: image/check
1720
1721 io/io.lo: $(go_io_files) os.gox sync.gox
1722         $(BUILDPACKAGE)
1723 io/check: $(CHECK_DEPS)
1724         @$(CHECK)
1725 .PHONY: io/check
1726
1727 json/json.lo: $(go_json_files) bytes.gox container/vector.gox \
1728                 encoding/base64.gox fmt.gox io.gox math.gox os.gox \
1729                 reflect.gox runtime.gox strconv.gox strings.gox unicode.gox \
1730                 utf16.gox utf8.gox
1731         $(BUILDPACKAGE)
1732 json/check: $(CHECK_DEPS)
1733         @$(CHECK)
1734 .PHONY: json/check
1735
1736 log/log.lo: $(go_log_files) bytes.gox fmt.gox io.gox runtime.gox os.gox \
1737                 sync.gox time.gox
1738         $(BUILDPACKAGE)
1739 log/check: $(CHECK_DEPS)
1740         @$(CHECK)
1741 .PHONY: log/check
1742
1743 math/math.lo: $(go_math_files)
1744         $(BUILDPACKAGE)
1745 math/check: $(CHECK_DEPS)
1746         @$(CHECK)
1747 .PHONY: math/check
1748
1749 mime/mime.lo: $(go_mime_files) bufio.gox bytes.gox os.gox strings.gox \
1750                 sync.gox unicode.gox
1751         $(BUILDPACKAGE)
1752 mime/check: $(CHECK_DEPS)
1753         @$(CHECK)
1754 .PHONY: mime/check
1755
1756 net/net.lo: $(go_net_files) bytes.gox fmt.gox io.gox os.gox rand.gox \
1757                 reflect.gox strconv.gox strings.gox sync.gox syscall.gox \
1758                 time.gox
1759         $(BUILDPACKAGE)
1760 net/check: $(CHECK_DEPS)
1761         @$(CHECK_ON_REQUEST)
1762 .PHONY: net/check
1763
1764 netchan/netchan.lo: $(go_netchan_files) gob.gox io.gox log.gox net.gox os.gox \
1765                 reflect.gox strconv.gox sync.gox time.gox
1766         $(BUILDPACKAGE)
1767 netchan/check: $(CHECK_DEPS)
1768         @$(CHECK)
1769 .PHONY: netchan/check
1770
1771 os/os.lo: $(go_os_files) runtime.gox sync.gox syscall.gox
1772         $(BUILDPACKAGE)
1773 os/check: $(CHECK_DEPS)
1774         @$(CHECK)
1775 .PHONY: os/check
1776
1777 patch/patch.lo: $(go_patch_files) bytes.gox compress/zlib.gox \
1778                 crypto/sha1.gox encoding/git85.gox fmt.gox io.gox os.gox \
1779                 path.gox strings.gox
1780         $(BUILDPACKAGE)
1781 patch/check: $(CHECK_DEPS)
1782         @$(CHECK)
1783 .PHONY: patch/check
1784
1785 path/path.lo: $(go_path_files) os.gox strings.gox utf8.gox
1786         $(BUILDPACKAGE)
1787 path/check: $(CHECK_DEPS)
1788         @$(CHECK)
1789 .PHONY: path/check
1790
1791 rand/rand.lo: $(go_rand_files) math.gox sync.gox
1792         $(BUILDPACKAGE)
1793 rand/check: $(CHECK_DEPS)
1794         @$(CHECK)
1795 .PHONY: rand/check
1796
1797 reflect/reflect.lo: $(go_reflect_files) math.gox runtime.gox strconv.gox \
1798                 sync.gox
1799         $(BUILDPACKAGE)
1800 reflect/check: $(CHECK_DEPS)
1801         @$(CHECK)
1802 .PHONY: reflect/check
1803
1804 regexp/regexp.lo: $(go_regexp_files) bytes.gox io.gox os.gox strings.gox \
1805                 utf8.gox
1806         $(BUILDPACKAGE)
1807 regexp/check: $(CHECK_DEPS)
1808         @$(CHECK)
1809 .PHONY: regexp/check
1810
1811 rpc/rpc.lo: $(go_rpc_files) bufio.gox fmt.gox gob.gox http.gox io.gox log.gox \
1812                 net.gox os.gox reflect.gox sort.gox strings.gox strconv.gox \
1813                 sync.gox template.gox unicode.gox utf8.gox
1814         $(BUILDPACKAGE)
1815 rpc/check: $(CHECK_DEPS)
1816         @$(CHECK)
1817 .PHONY: rpc/check
1818
1819 runtime/runtime.lo: $(go_runtime_files)
1820         $(BUILDPACKAGE)
1821 runtime/check: $(CHECK_DEPS)
1822         @$(CHECK)
1823 .PHONY: runtime/check
1824
1825 scanner/scanner.lo: $(go_scanner_files) bytes.gox fmt.gox io.gox os.gox \
1826                 unicode.gox utf8.gox
1827         $(BUILDPACKAGE)
1828 scanner/check: $(CHECK_DEPS)
1829         @$(CHECK)
1830 .PHONY: scanner/check
1831
1832 smtp/smtp.lo: $(go_smtp_files) crypto/tls.gox encoding/base64.gox io.gox \
1833                 net.gox net/textproto.gox os.gox strings.gox
1834         $(BUILDPACKAGE)
1835 smtp/check: $(CHECK_DEPS)
1836         @$(CHECK)
1837 .PHONY: smtp/check
1838
1839 sort/sort.lo: $(go_sort_files)
1840         $(BUILDPACKAGE)
1841 sort/check: $(CHECK_DEPS)
1842         @$(CHECK)
1843 .PHONY: sort/check
1844
1845 strconv/strconv.lo: $(go_strconv_files) bytes.gox math.gox os.gox strings.gox \
1846                 unicode.gox utf8.gox
1847         $(BUILDPACKAGE)
1848 strconv/check: $(CHECK_DEPS)
1849         @$(CHECK)
1850 .PHONY: strconv/check
1851
1852 strings/strings.lo: $(go_strings_files) os.gox unicode.gox utf8.gox
1853         $(BUILDPACKAGE)
1854 strings/check: $(CHECK_DEPS)
1855         @$(CHECK)
1856 .PHONY: strings/check
1857
1858 sync/sync.lo: $(go_sync_files) runtime.gox sync/atomic.gox
1859         $(BUILDPACKAGE)
1860 sync/check: $(CHECK_DEPS)
1861         @$(CHECK)
1862 .PHONY: sync/check
1863
1864 syslog/syslog.lo: $(go_syslog_files) fmt.gox log.gox net.gox os.gox syscall.gox
1865         $(BUILDPACKAGE)
1866 syslog/syslog_c.lo: $(go_syslog_c_files) syslog/syslog.lo
1867         $(LTCOMPILE) -c -o $@ $(srcdir)/go/syslog/syslog_c.c
1868 syslog/check: $(CHECK_DEPS)
1869         @$(CHECK_ON_REQUEST)
1870 .PHONY: syslog/check
1871
1872 tabwriter/tabwriter.lo: $(go_tabwriter_files) bytes.gox io.gox os.gox utf8.gox
1873         $(BUILDPACKAGE)
1874 tabwriter/check: $(CHECK_DEPS)
1875         @$(CHECK)
1876 .PHONY: tabwriter/check
1877
1878 template/template.lo: $(go_template_files) bytes.gox fmt.gox io.gox os.gox \
1879                 reflect.gox runtime.gox strings.gox container/vector.gox
1880         $(BUILDPACKAGE)
1881 template/check: $(CHECK_DEPS)
1882         @$(CHECK)
1883 .PHONY: template/check
1884
1885 testing/testing.lo: $(go_testing_files) flag.gox fmt.gox os.gox regexp.gox \
1886                 runtime.gox runtime/pprof.gox time.gox
1887         $(BUILDPACKAGE)
1888 testing/check: $(CHECK_DEPS)
1889         @$(CHECK)
1890 .PHONY: testing/check
1891
1892 time/time.lo: $(go_time_files) bytes.gox container/heap.gox io/ioutil.gox \
1893                 os.gox strconv.gox sync.gox syscall.gox
1894         $(BUILDPACKAGE)
1895 time/check: $(CHECK_DEPS)
1896         @$(CHECK)
1897 .PHONY: time/check
1898
1899 try/try.lo: $(go_try_files) fmt.gox io.gox os.gox reflect.gox unicode.gox
1900         $(BUILDPACKAGE)
1901 try/check: $(CHECK_DEPS)
1902         @$(CHECK)
1903 .PHONY: try/check
1904
1905 unicode/unicode.lo: $(go_unicode_files)
1906         $(BUILDPACKAGE)
1907 unicode/check: $(CHECK_DEPS)
1908         @$(CHECK)
1909 .PHONY: unicode/check
1910
1911 utf16/utf16.lo: $(go_utf16_files) unicode.gox
1912         $(BUILDPACKAGE)
1913 utf16/check: $(CHECK_DEPS)
1914         @$(CHECK)
1915 .PHONY: utf16/check
1916
1917 utf8/utf8.lo: $(go_utf8_files) unicode.gox
1918         $(BUILDPACKAGE)
1919 utf8/check: $(CHECK_DEPS)
1920         @$(CHECK)
1921 .PHONY: utf8/check
1922
1923 websocket/websocket.lo: $(go_websocket_files) bufio.gox bytes.gox \
1924                 container/vector.gox crypto/md5.gox crypto/tls.gox \
1925                 encoding/binary.gox fmt.gox http.gox io.gox net.gox os.gox \
1926                 rand.gox strings.gox
1927         $(BUILDPACKAGE)
1928 websocket/check: $(CHECK_DEPS)
1929         @$(CHECK)
1930 .PHONY: websocket/check
1931
1932 xml/xml.lo: $(go_xml_files) bufio.gox bytes.gox fmt.gox io.gox os.gox \
1933                 reflect.gox strconv.gox strings.gox unicode.gox utf8.gox
1934         $(BUILDPACKAGE)
1935 xml/check: $(CHECK_DEPS)
1936         @$(CHECK)
1937 .PHONY: xml/check
1938
1939 archive/tar.lo: $(go_archive_tar_files) bytes.gox io.gox os.gox strconv.gox \
1940                 strings.gox
1941         $(BUILDPACKAGE)
1942 archive/tar/check: $(CHECK_DEPS)
1943         @$(MKDIR_P) archive/tar
1944         @$(CHECK)
1945 .PHONY: archive/tar/check
1946
1947 archive/zip.lo: $(go_archive_zip_files) bufio.gox bytes.gox \
1948                 compress/flate.gox hash.gox hash/crc32.gox \
1949                 encoding/binary.gox io.gox io/ioutil.gox os.gox
1950         $(BUILDPACKAGE)
1951 archive/zip/check: $(CHECK_DEPS)
1952         @$(MKDIR_P) archive/zip
1953         @$(CHECK)
1954 .PHONY: archive/zip/check
1955
1956 compress/bzip2.lo: $(go_compress_bzip2_files) bufio.gox io.gox os.gox sort.gox
1957         $(BUILDPACKAGE)
1958 compress/bzip2/check: $(CHECK_DEPS)
1959         @$(MKDIR_P) compress/bzip2
1960         @$(CHECK)
1961 .PHONY: compress/bzip2/check
1962
1963 compress/flate.lo: $(go_compress_flate_files) bufio.gox io.gox math.gox \
1964                 os.gox sort.gox strconv.gox
1965         $(BUILDPACKAGE)
1966 compress/flate/check: $(CHECK_DEPS)
1967         @$(MKDIR_P) compress/flate
1968         @$(CHECK)
1969 .PHONY: compress/flate/check
1970
1971 compress/gzip.lo: $(go_compress_gzip_files) bufio.gox compress/flate.gox \
1972                 hash.gox hash/crc32.gox io.gox os.gox
1973         $(BUILDPACKAGE)
1974 compress/gzip/check: $(CHECK_DEPS)
1975         @$(MKDIR_P) compress/gzip
1976         @$(CHECK)
1977 .PHONY: compress/gzip/check
1978
1979 compress/lzw.lo: $(go_compress_lzw_files) bufio.gox fmt.gox io.gox os.gox
1980         $(BUILDPACKAGE)
1981 compress/lzw/check: $(CHECK_DEPS)
1982         @$(MKDIR_P) compress/lzw
1983         @$(CHECK)
1984 .PHONY: compress/lzw/check
1985
1986 compress/zlib.lo: $(go_compress_zlib_files) bufio.gox compress/flate.gox \
1987                 hash.gox hash/adler32.gox io.gox os.gox
1988         $(BUILDPACKAGE)
1989 compress/zlib/check: $(CHECK_DEPS)
1990         @$(MKDIR_P) compress/zlib
1991         @$(CHECK)
1992 .PHONY: compress/zlib/check
1993
1994 container/heap.lo: $(go_container_heap_files) sort.gox
1995         $(BUILDPACKAGE)
1996 container/heap/check: $(CHECK_DEPS)
1997         @$(MKDIR_P) container/heap
1998         @$(CHECK)
1999 .PHONY: container/heap/check
2000
2001 container/list.lo: $(go_container_list_files)
2002         $(BUILDPACKAGE)
2003 container/list/check: $(CHECK_DEPS)
2004         @$(MKDIR_P) container/list
2005         @$(CHECK)
2006 .PHONY: container/list/check
2007
2008 container/ring.lo: $(go_container_ring_files)
2009         $(BUILDPACKAGE)
2010 container/ring/check: $(CHECK_DEPS)
2011         @$(MKDIR_P) container/ring
2012         @$(CHECK)
2013 .PHONY: container/ring/check
2014
2015 container/vector.lo: $(go_container_vector_files)
2016         $(BUILDPACKAGE)
2017 container/vector/check: $(CHECK_DEPS)
2018         @$(MKDIR_P) container/vector
2019         @$(CHECK)
2020 .PHONY: container/vector/check
2021
2022 crypto/aes.lo: $(go_crypto_aes_files) os.gox strconv.gox
2023         $(BUILDPACKAGE)
2024 crypto/aes/check: $(CHECK_DEPS)
2025         @$(MKDIR_P) crypto/aes
2026         @$(CHECK)
2027 .PHONY: crypto/aes/check
2028
2029 crypto/block.lo: $(go_crypto_block_files) fmt.gox io.gox os.gox strconv.gox
2030         $(BUILDPACKAGE)
2031 crypto/block/check: $(CHECK_DEPS)
2032         @$(MKDIR_P) crypto/block
2033         @$(CHECK)
2034 .PHONY: crypto/block/check
2035
2036 crypto/blowfish.lo: $(go_crypto_blowfish_files) os.gox strconv.gox
2037         $(BUILDPACKAGE)
2038 crypto/blowfish/check: $(CHECK_DEPS)
2039         @$(MKDIR_P) crypto/blowfish
2040         @$(CHECK)
2041 .PHONY: crypto/blowfish/check
2042
2043 crypto/cast5.lo: $(go_crypto_cast5_files) os.gox
2044         $(BUILDPACKAGE)
2045 crypto/cast5/check: $(CHECK_DEPS)
2046         @$(MKDIR_P) crypto/cast5
2047         @$(CHECK)
2048 .PHONY: crypto/cast5/check
2049
2050 crypto/cipher.lo: $(go_crypto_cipher_files) io.gox os.gox
2051         $(BUILDPACKAGE)
2052 crypto/cipher/check: $(CHECK_DEPS)
2053         @$(MKDIR_P) crypto/cipher
2054         @$(CHECK)
2055 .PHONY: crypto/cipher/check
2056
2057 crypto/dsa.lo: $(go_crypto_dsa_files) big.gox io.gox os.gox
2058         $(BUILDPACKAGE)
2059 crypto/dsa/check: $(CHECK_DEPS)
2060         @$(MKDIR_P) crypto/dsa
2061         @$(CHECK)
2062 .PHONY: crypto/dsa/check
2063
2064 crypto/ecdsa.lo: $(go_crypto_ecdsa_files) big.gox crypto/elliptic.gox io.gox \
2065                 os.gox
2066         $(BUILDPACKAGE)
2067 crypto/ecdsa/check: $(CHECK_DEPS)
2068         @$(MKDIR_P) crypto/ecdsa
2069         @$(CHECK)
2070 .PHONY: crypto/ecdsa/check
2071
2072 crypto/elliptic.lo: $(go_crypto_elliptic_files) big.gox io.gox os.gox sync.gox
2073         $(BUILDPACKAGE)
2074 crypto/elliptic/check: $(CHECK_DEPS)
2075         @$(MKDIR_P) crypto/elliptic
2076         @$(CHECK)
2077 .PHONY: crypto/elliptic/check
2078
2079 crypto/hmac.lo: $(go_crypto_hmac_files) crypto/md5.gox crypto/sha1.gox \
2080                 crypto/sha256.gox hash.gox os.gox
2081         $(BUILDPACKAGE)
2082 crypto/hmac/check: $(CHECK_DEPS)
2083         @$(MKDIR_P) crypto/hmac
2084         @$(CHECK)
2085 .PHONY: crypto/hmac/check
2086
2087 crypto/md4.lo: $(go_crypto_md4_files) crypto.gox hash.gox os.gox
2088         $(BUILDPACKAGE)
2089 crypto/md4/check: $(CHECK_DEPS)
2090         @$(MKDIR_P) crypto/md4
2091         @$(CHECK)
2092 .PHONY: crypto/md4/check
2093
2094 crypto/md5.lo: $(go_crypto_md5_files) crypto.gox hash.gox os.gox
2095         $(BUILDPACKAGE)
2096 crypto/md5/check: $(CHECK_DEPS)
2097         @$(MKDIR_P) crypto/md5
2098         @$(CHECK)
2099 .PHONY: crypto/md5/check
2100
2101 crypto/ocsp.lo: $(go_crypto_ocsp_files) asn1.gox crypto.gox crypto/rsa.gox \
2102                 crypto/sha1.gox crypto/x509.gox os.gox time.gox
2103         $(BUILDPACKAGE)
2104 crypto/ocsp/check: $(CHECK_DEPS)
2105         @$(MKDIR_P) crypto/ocsp
2106         @$(CHECK)
2107 .PHONY: crypto/ocsp/check
2108
2109 crypto/openpgp.lo: $(go_crypto_openpgp_files) crypto.gox crypto/dsa.gox \
2110                 crypto/openpgp/armor.gox crypto/openpgp/error.gox \
2111                 crypto/openpgp/packet.gox crypto/rsa.gox crypto/sha256.gox \
2112                 hash.gox io.gox os.gox strconv.gox time.gox
2113         $(BUILDPACKAGE)
2114 crypto/openpgp/check: $(CHECK_DEPS)
2115         @$(MKDIR_P) crypto/openpgp
2116         @$(CHECK)
2117 .PHONY: crypto/openpgp/check
2118
2119 crypto/rand.lo: $(go_crypto_rand_files) bufio.gox crypto/aes.gox io.gox \
2120                 os.gox sync.gox time.gox
2121         $(BUILDPACKAGE)
2122 crypto/rand/check: $(CHECK_DEPS)
2123         @$(MKDIR_P) crypto/rand
2124         @$(CHECK)
2125 .PHONY: crypto/rand/check
2126
2127 crypto/rc4.lo: $(go_crypto_rc4_files) os.gox strconv.gox
2128         $(BUILDPACKAGE)
2129 crypto/rc4/check: $(CHECK_DEPS)
2130         @$(MKDIR_P) crypto/rc4
2131         @$(CHECK)
2132 .PHONY: crypto/rc4/check
2133
2134 crypto/ripemd160.lo: $(go_crypto_ripemd160_files) crypto.gox hash.gox os.gox
2135         $(BUILDPACKAGE)
2136 crypto/ripemd160/check: $(CHECK_DEPS)
2137         @$(MKDIR_P) crypto/ripemd160
2138         @$(CHECK)
2139 .PHONY: crypto/ripemd160/check
2140
2141 crypto/rsa.lo: $(go_crypto_rsa_files) big.gox crypto.gox crypto/sha1.gox \
2142                 crypto/subtle.gox encoding/hex.gox hash.gox io.gox os.gox
2143         $(BUILDPACKAGE)
2144 crypto/rsa/check: $(CHECK_DEPS)
2145         @$(MKDIR_P) crypto/rsa
2146         @$(CHECK)
2147 .PHONY: crypto/rsa/check
2148
2149 crypto/sha1.lo: $(go_crypto_sha1_files) crypto.gox hash.gox os.gox
2150         $(BUILDPACKAGE)
2151 crypto/sha1/check: $(CHECK_DEPS)
2152         @$(MKDIR_P) crypto/sha1
2153         @$(CHECK)
2154 .PHONY: crypto/sha1/check
2155
2156 crypto/sha256.lo: $(go_crypto_sha256_files) crypto.gox hash.gox os.gox
2157         $(BUILDPACKAGE)
2158 crypto/sha256/check: $(CHECK_DEPS)
2159         @$(MKDIR_P) crypto/sha256
2160         @$(CHECK)
2161 .PHONY: crypto/sha256/check
2162
2163 crypto/sha512.lo: $(go_crypto_sha512_files) crypto.gox hash.gox os.gox
2164         $(BUILDPACKAGE)
2165 crypto/sha512/check: $(CHECK_DEPS)
2166         @$(MKDIR_P) crypto/sha512
2167         @$(CHECK)
2168 .PHONY: crypto/sha512/check
2169
2170 crypto/subtle.lo: $(go_crypto_subtle_files)
2171         $(BUILDPACKAGE)
2172 crypto/subtle/check: $(CHECK_DEPS)
2173         @$(MKDIR_P) crypto/subtle
2174         @$(CHECK)
2175 .PHONY: crypto/subtle/check
2176
2177 crypto/tls.lo: $(go_crypto_tls_files) big.gox bufio.gox bytes.gox \
2178                 container/list.gox crypto.gox crypto/aes.gox crypto/cipher.gox \
2179                 crypto/elliptic.gox crypto/hmac.gox crypto/md5.gox \
2180                 crypto/rc4.gox crypto/rand.gox crypto/rsa.gox crypto/sha1.gox \
2181                 crypto/subtle.gox crypto/rsa.gox crypto/sha1.gox \
2182                 crypto/x509.gox encoding/pem.gox fmt.gox hash.gox io.gox \
2183                 io/ioutil.gox net.gox os.gox strings.gox sync.gox time.gox
2184         $(BUILDPACKAGE)
2185 crypto/tls/check: $(CHECK_DEPS)
2186         @$(MKDIR_P) crypto/tls
2187         @$(CHECK)
2188 .PHONY: crypto/tls/check
2189
2190 crypto/twofish.lo: $(go_crypto_twofish_files) os.gox strconv.gox
2191         $(BUILDPACKAGE)
2192 crypto/twofish/check: $(CHECK_DEPS)
2193         @$(MKDIR_P) crypto/twofish
2194         @$(CHECK)
2195 .PHONY: crypto/twofish/check
2196
2197 crypto/x509.lo: $(go_crypto_x509_files) asn1.gox big.gox container/vector.gox \
2198                 crypto.gox crypto/rsa.gox crypto/sha1.gox hash.gox os.gox \
2199                 strings.gox time.gox
2200         $(BUILDPACKAGE)
2201 crypto/x509/check: $(CHECK_DEPS)
2202         @$(MKDIR_P) crypto/x509
2203         @$(CHECK)
2204 .PHONY: crypto/x509/check
2205
2206 crypto/xtea.lo: $(go_crypto_xtea_files) os.gox strconv.gox
2207         $(BUILDPACKAGE)
2208 crypto/xtea/check: $(CHECK_DEPS)
2209         @$(MKDIR_P) crypto/xtea
2210         @$(CHECK)
2211 .PHONY: crypto/xtea/check
2212
2213 crypto/openpgp/armor.lo: $(go_crypto_openpgp_armor_files) bytes.gox \
2214                 crypto/openpgp/error.gox encoding/base64.gox \
2215                 encoding/line.gox io.gox os.gox
2216         $(BUILDPACKAGE)
2217 crypto/openpgp/armor/check: $(CHECK_DEPS)
2218         @$(MKDIR_P) crypto/openpgp/armor
2219         @$(CHECK)
2220 .PHONY: crypto/openpgp/armor/check
2221
2222 crypto/openpgp/error.lo: $(go_crypto_openpgp_error_files) strconv.gox
2223         $(BUILDPACKAGE)
2224 crypto/openpgp/error/check: $(CHECK_DEPS)
2225         @$(MKDIR_P) crypto/openpgp/error
2226         @$(CHECK)
2227 .PHONY: crypto/openpgp/error/check
2228
2229 crypto/openpgp/packet.lo: $(go_crypto_openpgp_packet_files) big.gox bytes.gox \
2230                 compress/flate.gox compress/zlib.gox crypto.gox \
2231                 crypto/aes.gox crypto/cast5.gox crypto/cipher.gox \
2232                 crypto/dsa.gox crypto/openpgp/error.gox \
2233                 crypto/openpgp/s2k.gox crypto/rand.gox crypto/rsa.gox \
2234                 crypto/sha1.gox crypto/subtle.gox encoding/binary.gox fmt.gox \
2235                 hash.gox io.gox io/ioutil.gox os.gox strconv.gox strings.gox
2236         $(BUILDPACKAGE)
2237 crypto/openpgp/packet/check: $(CHECK_DEPS)
2238         @$(MKDIR_P) crypto/openpgp/packet
2239         @$(CHECK)
2240 .PHONY: crypto/openpgp/packet/check
2241
2242 crypto/openpgp/s2k.lo: $(go_crypto_openpgp_s2k_files) crypto.gox \
2243                 crypto/md5.gox crypto/openpgp/error.gox crypto/ripemd160.gox \
2244                 crypto/sha1.gox crypto/sha256.gox crypto/sha512.gox hash.gox \
2245                 io.gox os.gox
2246         $(BUILDPACKAGE)
2247 crypto/openpgp/s2k/check: $(CHECK_DEPS)
2248         @$(MKDIR_P) crypto/openpgp/s2k
2249         @$(CHECK)
2250 .PHONY: crypto/openpgp/s2k/check
2251
2252 debug/dwarf.lo: $(go_debug_dwarf_files) encoding/binary.gox os.gox strconv.gox
2253         $(BUILDPACKAGE)
2254 debug/dwarf/check: $(CHECK_DEPS)
2255         @$(MKDIR_P) debug/dwarf
2256         @$(CHECK)
2257 .PHONY: debug/dwarf/check
2258
2259 debug/elf.lo: $(go_debug_elf_files) bytes.gox debug/dwarf.gox \
2260                 encoding/binary.gox fmt.gox io.gox os.gox strconv.gox
2261         $(BUILDPACKAGE)
2262 debug/elf/check: $(CHECK_DEPS)
2263         @$(MKDIR_P) debug/elf
2264         @$(CHECK)
2265 .PHONY: debug/elf/check
2266
2267 debug/gosym.lo: $(go_debug_gosym_files) encoding/binary.gox fmt.gox os.gox \
2268                 strconv.gox strings.gox
2269         $(BUILDPACKAGE)
2270 debug/gosym/check: $(CHECK_DEPS)
2271         @$(MKDIR_P) debug/gosym
2272         @$(CHECK)
2273 .PHONY: debug/gosym/check
2274
2275 debug/macho.lo: $(go_debug_macho_files) bytes.gox debug/dwarf.gox \
2276                 encoding/binary.gox fmt.gox io.gox os.gox strconv.gox
2277         $(BUILDPACKAGE)
2278 debug/macho/check: $(CHECK_DEPS)
2279         @$(MKDIR_P) debug/macho
2280         @$(CHECK)
2281 .PHONY: debug/macho/check
2282
2283 debug/pe.lo: $(go_debug_pe_files) debug/dwarf.gox \
2284                 encoding/binary.gox fmt.gox io.gox os.gox strconv.gox
2285         $(BUILDPACKAGE)
2286 debug/pe/check: $(CHECK_DEPS)
2287         @$(MKDIR_P) debug/pe
2288         @$(CHECK)
2289 .PHONY: debug/pe/check
2290
2291 debug/proc.lo: $(go_debug_proc_files) container/vector.gox fmt.gox \
2292                 io/ioutil.gox os.gox runtime.gox strconv.gox strings.gox \
2293                 sync.gox syscall.gox
2294         $(BUILDPACKAGE)
2295 debug/proc/check: $(CHECK_DEPS)
2296         @$(MKDIR_P) debug/proc
2297         @$(CHECK)
2298 .PHONY: debug/proc/check
2299
2300 encoding/ascii85.lo: $(go_encoding_ascii85_files) io.gox os.gox strconv.gox
2301         $(BUILDPACKAGE)
2302 encoding/ascii85/check: $(CHECK_DEPS)
2303         @$(MKDIR_P) encoding/ascii85
2304         @$(CHECK)
2305 .PHONY: encoding/ascii85/check
2306
2307 encoding/base32.lo: $(go_encoding_base32_files) io.gox os.gox strconv.gox
2308         $(BUILDPACKAGE)
2309 encoding/base32/check: $(CHECK_DEPS)
2310         @$(MKDIR_P) encoding/base32
2311         @$(CHECK)
2312 .PHONY: encoding/base32/check
2313
2314 encoding/base64.lo: $(go_encoding_base64_files) io.gox os.gox strconv.gox
2315         $(BUILDPACKAGE)
2316 encoding/base64/check: $(CHECK_DEPS)
2317         @$(MKDIR_P) encoding/base64
2318         @$(CHECK)
2319 .PHONY: encoding/base64/check
2320
2321 encoding/binary.lo: $(go_encoding_binary_files) io.gox math.gox os.gox \
2322                 reflect.gox
2323         $(BUILDPACKAGE)
2324 encoding/binary/check: $(CHECK_DEPS)
2325         @$(MKDIR_P) encoding/binary
2326         @$(CHECK)
2327 .PHONY: encoding/binary/check
2328
2329 encoding/git85.lo: $(go_encoding_git85_files) bytes.gox io.gox os.gox \
2330                 strconv.gox
2331         $(BUILDPACKAGE)
2332 encoding/git85/check: $(CHECK_DEPS)
2333         @$(MKDIR_P) encoding/git85
2334         @$(CHECK)
2335 .PHONY: encoding/git85/check
2336
2337 encoding/hex.lo: $(go_encoding_hex_files) os.gox strconv.gox
2338         $(BUILDPACKAGE)
2339 encoding/hex/check: $(CHECK_DEPS)
2340         @$(MKDIR_P) encoding/hex
2341         @$(CHECK)
2342 .PHONY: encoding/hex/check
2343
2344 encoding/line.lo: $(go_encoding_line_files) io.gox os.gox
2345         $(BUILDPACKAGE)
2346 encoding/line/check: $(CHECK_DEPS)
2347         @$(MKDIR_P) encoding/line
2348         @$(CHECK)
2349 .PHONY: encoding/line/check
2350
2351 encoding/pem.lo: $(go_encoding_pem_files) bytes.gox encoding/base64.gox
2352         $(BUILDPACKAGE)
2353 encoding/pem/check: $(CHECK_DEPS)
2354         @$(MKDIR_P) encoding/pem
2355         @$(CHECK)
2356 .PHONY: encoding/pem/check
2357
2358 exp/datafmt.lo: $(go_exp_datafmt_files) bytes.gox container/vector.gox \
2359                 fmt.gox go/scanner.gox go/token.gox io.gox os.gox reflect.gox \
2360                 runtime.gox strconv.gox strings.gox
2361         $(BUILDPACKAGE)
2362 exp/datafmt/check: $(CHECK_DEPS)
2363         @$(MKDIR_P) exp/datafmt
2364         @$(CHECK)
2365 .PHONY: exp/datafmt/check
2366
2367 exp/draw.lo: $(go_exp_draw_files) image.gox os.gox
2368         $(BUILDPACKAGE)
2369 exp/draw/check: $(CHECK_DEPS)
2370         @$(MKDIR_P) exp/draw
2371         @$(CHECK)
2372 .PHONY: exp/draw/check
2373
2374 exp/eval.lo: $(go_exp_eval_files) big.gox go/ast.gox go/parser.gox \
2375                 go/scanner.gox go/token.gox fmt.gox log.gox strconv.gox \
2376                 strings.gox os.gox reflect.gox runtime.gox sort.gox template.gox
2377         $(BUILDPACKAGE)
2378 exp/eval/check: $(CHECK_DEPS)
2379         @$(MKDIR_P) exp/eval
2380         @$(CHECK)
2381 .PHONY: exp/eval/check
2382
2383 go/ast.lo: $(go_go_ast_files) bytes.gox fmt.gox go/scanner.gox go/token.gox \
2384                 io.gox os.gox reflect.gox unicode.gox utf8.gox
2385         $(BUILDPACKAGE)
2386 go/ast/check: $(CHECK_DEPS)
2387         @$(MKDIR_P) go/ast
2388         @$(CHECK)
2389 .PHONY: go/ast/check
2390
2391 go/doc.lo: $(go_go_doc_files) go/ast.gox go/token.gox io.gox regexp.gox \
2392                 sort.gox strings.gox template.gox
2393         $(BUILDPACKAGE)
2394 go/doc/check: $(CHECK_DEPS)
2395         @$(MKDIR_P) go/doc
2396         @$(CHECK)
2397 .PHONY: go/doc/check
2398
2399 go/parser.lo: $(go_go_parser_files) bytes.gox fmt.gox go/ast.gox \
2400                 go/scanner.gox go/token.gox io.gox io/ioutil.gox os.gox \
2401                 path/filepath.gox strings.gox
2402         $(BUILDPACKAGE)
2403 go/parser/check: $(CHECK_DEPS)
2404         @$(MKDIR_P) go/parser
2405         @$(CHECK)
2406 .PHONY: go/parser/check
2407
2408 go/printer.lo: $(go_go_printer_files) bytes.gox fmt.gox go/ast.gox \
2409                 go/token.gox io.gox os.gox path/filepath.gox reflect.gox \
2410                 runtime.gox strings.gox tabwriter.gox
2411         $(BUILDPACKAGE)
2412 go/printer/check: $(CHECK_DEPS)
2413         @$(MKDIR_P) go/printer
2414         @$(CHECK)
2415 .PHONY: go/printer/check
2416
2417 go/scanner.lo: $(go_go_scanner_files) bytes.gox container/vector.gox fmt.gox \
2418                 go/token.gox io.gox os.gox path/filepath.gox sort.gox \
2419                 strconv.gox unicode.gox utf8.gox
2420         $(BUILDPACKAGE)
2421 go/scanner/check: $(CHECK_DEPS)
2422         @$(MKDIR_P) go/scanner
2423         @$(CHECK)
2424 .PHONY: go/scanner/check
2425
2426 go/token.lo: $(go_go_token_files) fmt.gox strconv.gox
2427         $(BUILDPACKAGE)
2428 go/token/check: $(CHECK_DEPS)
2429         @$(MKDIR_P) go/token
2430         @$(CHECK)
2431 .PHONY: go/token/check
2432
2433 go/typechecker.lo: $(go_go_typechecker_files) fmt.gox go/ast.gox go/token.gox \
2434                 go/scanner.gox os.gox
2435         $(BUILDPACKAGE)
2436 go/typechecker/check: $(CHECK_DEPS)
2437         @$(MKDIR_P) go/typechecker
2438         @$(CHECK)
2439 .PHONY: go/typechecker/check
2440
2441 hash/adler32.lo: $(go_hash_adler32_files) hash.gox os.gox
2442         $(BUILDPACKAGE)
2443 hash/adler32/check: $(CHECK_DEPS)
2444         @$(MKDIR_P) hash/adler32
2445         @$(CHECK)
2446 .PHONY: hash/adler32/check
2447
2448 hash/crc32.lo: $(go_hash_crc32_files) hash.gox os.gox
2449         $(BUILDPACKAGE)
2450 hash/crc32/check: $(CHECK_DEPS)
2451         @$(MKDIR_P) hash/crc32
2452         @$(CHECK)
2453 .PHONY: hash/crc32/check
2454
2455 hash/crc64.lo: $(go_hash_crc64_files) hash.gox os.gox
2456         $(BUILDPACKAGE)
2457 hash/crc64/check: $(CHECK_DEPS)
2458         @$(MKDIR_P) hash/crc64
2459         @$(CHECK)
2460 .PHONY: hash/crc64/check
2461
2462 hash/fnv.lo: $(go_hash_fnv_files) encoding/binary.gox hash.gox os.gox
2463         $(BUILDPACKAGE)
2464 hash/fnv/check: $(CHECK_DEPS)
2465         @$(MKDIR_P) hash/fnv
2466         @$(CHECK)
2467 .PHONY: hash/fnv/check
2468
2469 http/cgi.lo: $(go_http_cgi_files) bufio.gox bytes.gox encoding/line.gox \
2470                 exec.gox fmt.gox http.gox io.gox io/ioutil.gox log.gox \
2471                 os.gox path/filepath.gox regexp.gox strconv.gox strings.gox
2472         $(BUILDPACKAGE)
2473 http/cgi/check: $(CHECK_DEPS)
2474         @$(MKDIR_P) http/cgi
2475         @$(CHECK)
2476 .PHONY: http/cgi/check
2477
2478 http/httptest.lo: $(go_http_httptest_files) bytes.gox fmt.gox http.gox \
2479                 net.gox os.gox
2480         $(BUILDPACKAGE)
2481 http/httptest/check: $(CHECK_DEPS)
2482         @$(MKDIR_P) http/httptest
2483         @$(CHECK)
2484 .PHONY: http/httptest/check
2485
2486 http/pprof.lo: $(go_http_pprof_files) bufio.gox fmt.gox http.gox os.gox \
2487                 runtime.gox runtime/pprof.gox strconv.gox strings.gox
2488         $(BUILDPACKAGE)
2489 http/pprof/check: $(CHECK_DEPS)
2490         @$(MKDIR_P) http/pprof
2491         @$(CHECK)
2492 .PHONY: http/pprof/check
2493
2494 image/jpeg.lo: $(go_image_jpeg_files) bufio.gox image.gox io.gox os.gox
2495         $(BUILDPACKAGE)
2496 image/jpeg/check: $(CHECK_DEPS)
2497         @$(MKDIR_P) image/jpeg
2498         @$(CHECK)
2499 .PHONY: image/jpeg/check
2500
2501 image/png.lo: $(go_image_png_files) bufio.gox compress/zlib.gox fmt.gox \
2502                 hash.gox hash/crc32.gox image.gox io.gox os.gox strconv.gox
2503         $(BUILDPACKAGE)
2504 image/png/check: $(CHECK_DEPS)
2505         @$(MKDIR_P) image/png
2506         @$(CHECK)
2507 .PHONY: image/png/check
2508
2509 index/suffixarray.lo: $(go_index_suffixarray_files) bytes.gox regexp.gox \
2510                 sort.gox
2511         $(BUILDPACKAGE)
2512 index/suffixarray/check: $(CHECK_DEPS)
2513         @$(MKDIR_P) index/suffixarray
2514         @$(CHECK)
2515 .PHONY: index/suffixarray/check
2516
2517 io/ioutil.lo: $(go_io_ioutil_files) bytes.gox io.gox os.gox path/filepath.gox \
2518                 sort.gox strconv.gox
2519         $(BUILDPACKAGE)
2520 io/ioutil/check: $(CHECK_DEPS)
2521         @$(MKDIR_P) io/ioutil
2522         @$(CHECK)
2523 .PHONY: io/ioutil/check
2524
2525 mime/multipart.lo: $(go_mime_multipart_files) bufio.gox bytes.gox io.gox \
2526                 mime.gox net/textproto.gox os.gox regexp.gox strings.gox
2527         $(BUILDPACKAGE)
2528 mime/multipart/check: $(CHECK_DEPS)
2529         @$(MKDIR_P) mime/multipart
2530         @$(CHECK)
2531 .PHONY: mime/multipart/check
2532
2533 net/dict.lo: $(go_net_dict_files) container/vector.gox net/textproto.gox \
2534                 os.gox strconv.gox strings.gox
2535         $(BUILDPACKAGE)
2536
2537 net/textproto.lo: $(go_net_textproto_files) bufio.gox bytes.gox \
2538                 container/vector.gox fmt.gox io.gox io/ioutil.gox net.gox \
2539                 os.gox strconv.gox sync.gox
2540         $(BUILDPACKAGE)
2541 net/textproto/check: $(CHECK_DEPS)
2542         @$(MKDIR_P) net/textproto
2543         @$(CHECK)
2544 .PHONY: net/textproto/check
2545
2546 os/inotify.lo: $(go_os_inotify_files) fmt.gox os.gox strings.gox syscall.gox
2547         $(BUILDPACKAGE)
2548 os/inotify/check: $(CHECK_DEPS)
2549         @$(MKDIR_P) os/inotify
2550         @$(CHECK)
2551 .PHONY: os/inotify/check
2552
2553 os/signal.lo: $(go_os_signal_files) runtime.gox strconv.gox
2554         $(BUILDPACKAGE)
2555 os/signal/check: $(CHECK_DEPS)
2556         @$(MKDIR_P) os/signal
2557         @$(CHECK)
2558 .PHONY: os/signal/check
2559
2560 unix.go: $(srcdir)/go/os/signal/mkunix.sh sysinfo.go
2561         $(SHELL) $(srcdir)/go/os/signal/mkunix.sh sysinfo.go > $@.tmp
2562         mv -f $@.tmp $@
2563
2564 path/filepath.lo: $(go_path_filepath_files) bytes.gox os.gox sort.gox \
2565                 strings.gox utf8.gox
2566         $(BUILDPACKAGE)
2567 path/filepath/check: $(CHECK_DEPS)
2568         @$(MKDIR_P) path/filepath
2569         @$(CHECK)
2570 .PHONY: path/filepath/check
2571
2572 rpc/jsonrpc.lo: $(go_rpc_jsonrpc_files) fmt.gox io.gox json.gox net.gox \
2573                 os.gox rpc.gox sync.gox
2574         $(BUILDPACKAGE)
2575 rpc/jsonrpc/check: $(CHECK_DEPS)
2576         @$(MKDIR_P) rpc/jsonrpc
2577         @$(CHECK)
2578 .PHONY: rpc/jsonrpc/check
2579
2580 runtime/debug.lo: $(go_runtime_debug_files) bytes.gox fmt.gox io/ioutil.gox \
2581                 os.gox runtime.gox
2582         $(BUILDPACKAGE)
2583 runtime/debug/check: $(CHECK_DEPS)
2584         @$(MKDIR_P) runtime/debug
2585         @$(CHECK)
2586 .PHONY: runtime/debug/check
2587
2588 runtime/pprof.lo: $(go_runtime_pprof_files) bufio.gox fmt.gox io.gox os.gox \
2589                 runtime.gox sync.gox
2590         $(BUILDPACKAGE)
2591 runtime/pprof/check: $(CHECK_DEPS)
2592         @$(MKDIR_P) runtime/pprof
2593         @$(CHECK)
2594 .PHONY: runtime/pprof/check
2595
2596 sync/atomic.lo: $(go_sync_atomic_files)
2597         $(BUILDPACKAGE)
2598 sync/atomic_c.lo: $(go_sync_atomic_c_files) sync/atomic.lo
2599         $(LTCOMPILE) -c -o $@ $(srcdir)/go/sync/atomic/atomic.c
2600 sync/atomic/check: $(CHECK_DEPS)
2601         @$(MKDIR_P) sync/atomic
2602         @$(CHECK)
2603 .PHONY: sync/atomic/check
2604
2605 testing/iotest.lo: $(go_testing_iotest_files) io.gox log.gox os.gox
2606         $(BUILDPACKAGE)
2607 testing/iotest/check: $(CHECK_DEPS)
2608         @$(MKDIR_P) testing/iotest
2609         @$(CHECK)
2610 .PHONY: testing/iotest/check
2611
2612 testing/quick.lo: $(go_testing_quick_files) flag.gox fmt.gox math.gox os.gox \
2613                 rand.gox reflect.gox strings.gox
2614         $(BUILDPACKAGE)
2615 testing/quick/check: $(CHECK_DEPS)
2616         @$(MKDIR_P) testing/quick
2617         @$(CHECK)
2618 .PHONY: testing/quick/check
2619
2620 testing/script.lo: $(go_testing_script_files) fmt.gox os.gox rand.gox \
2621                 reflect.gox strings.gox
2622         $(BUILDPACKAGE)
2623 testing/script/check: $(CHECK_DEPS)
2624         @$(MKDIR_P) testing/script
2625         @$(CHECK)
2626 .PHONY: testing/script/check
2627
2628 sysinfo.go: s-sysinfo; @true
2629 s-sysinfo: $(srcdir)/mksysinfo.sh config.h
2630         CC="$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(OSCFLAGS)" $(SHELL) $(srcdir)/mksysinfo.sh
2631         $(SHELL) $(srcdir)/../move-if-change tmp-sysinfo.go sysinfo.go
2632         $(STAMP) $@
2633
2634 syscalls/syscall.lo: $(go_syscall_files) sync.gox
2635         $(BUILDPACKAGE)
2636 syscalls/errno.lo: $(go_syscall_c_files) syscalls/syscall.lo
2637         $(LTCOMPILE) -c -o $@ $(srcdir)/syscalls/errno.c
2638
2639 # How to build a .gox file from a .lo file.
2640 BUILDGOX = \
2641         f=`echo $< | sed -e 's/.lo$$/.o/'`; \
2642         $(OBJCOPY) -j .go_export $$f $@.tmp && mv -f $@.tmp $@
2643
2644 asn1.gox: asn1/asn1.lo
2645         $(BUILDGOX)
2646 big.gox: big/big.lo
2647         $(BUILDGOX)
2648 bufio.gox: bufio/bufio.lo
2649         $(BUILDGOX)
2650 bytes.gox: bytes/bytes.lo
2651         $(BUILDGOX)
2652 cmath.gox: cmath/cmath.lo
2653         $(BUILDGOX)
2654 crypto.gox: crypto/crypto.lo
2655         $(BUILDGOX)
2656 ebnf.gox: ebnf/ebnf.lo
2657         $(BUILDGOX)
2658 exec.gox: exec/exec.lo
2659         $(BUILDGOX)
2660 expvar.gox: expvar/expvar.lo
2661         $(BUILDGOX)
2662 flag.gox: flag/flag.lo
2663         $(BUILDGOX)
2664 fmt.gox: fmt/fmt.lo
2665         $(BUILDGOX)
2666 gob.gox: gob/gob.lo
2667         $(BUILDGOX)
2668 hash.gox: hash/hash.lo
2669         $(BUILDGOX)
2670 html.gox: html/html.lo
2671         $(BUILDGOX)
2672 http.gox: http/http.lo
2673         $(BUILDGOX)
2674 image.gox: image/image.lo
2675         $(BUILDGOX)
2676 io.gox: io/io.lo
2677         $(BUILDGOX)
2678 json.gox: json/json.lo
2679         $(BUILDGOX)
2680 log.gox: log/log.lo
2681         $(BUILDGOX)
2682 math.gox: math/math.lo
2683         $(BUILDGOX)
2684 mime.gox: mime/mime.lo
2685         $(BUILDGOX)
2686 net.gox: net/net.lo
2687         $(BUILDGOX)
2688 netchan.gox: netchan/netchan.lo
2689         $(BUILDGOX)
2690 os.gox: os/os.lo
2691         $(BUILDGOX)
2692 patch.gox: patch/patch.lo
2693         $(BUILDGOX)
2694 path.gox: path/path.lo
2695         $(BUILDGOX)
2696 rand.gox: rand/rand.lo
2697         $(BUILDGOX)
2698 reflect.gox: reflect/reflect.lo
2699         $(BUILDGOX)
2700 regexp.gox: regexp/regexp.lo
2701         $(BUILDGOX)
2702 rpc.gox: rpc/rpc.lo
2703         $(BUILDGOX)
2704 runtime.gox: runtime/runtime.lo
2705         $(BUILDGOX)
2706 scanner.gox: scanner/scanner.lo
2707         $(BUILDGOX)
2708 smtp.gox: smtp/smtp.lo
2709         $(BUILDGOX)
2710 sort.gox: sort/sort.lo
2711         $(BUILDGOX)
2712 strconv.gox: strconv/strconv.lo
2713         $(BUILDGOX)
2714 strings.gox: strings/strings.lo
2715         $(BUILDGOX)
2716 sync.gox: sync/sync.lo
2717         $(BUILDGOX)
2718 syslog.gox: syslog/syslog.lo
2719         $(BUILDGOX)
2720 syscall.gox: syscalls/syscall.lo
2721         $(BUILDGOX)
2722 tabwriter.gox: tabwriter/tabwriter.lo
2723         $(BUILDGOX)
2724 template.gox: template/template.lo
2725         $(BUILDGOX)
2726 testing.gox: testing/testing.lo
2727         $(BUILDGOX)
2728 time.gox: time/time.lo
2729         $(BUILDGOX)
2730 try.gox: try/try.lo
2731         $(BUILDGOX)
2732 unicode.gox: unicode/unicode.lo
2733         $(BUILDGOX)
2734 utf16.gox: utf16/utf16.lo
2735         $(BUILDGOX)
2736 utf8.gox: utf8/utf8.lo
2737         $(BUILDGOX)
2738 websocket.gox: websocket/websocket.lo
2739         $(BUILDGOX)
2740 xml.gox: xml/xml.lo
2741         $(BUILDGOX)
2742
2743 archive/tar.gox: archive/tar.lo
2744         $(BUILDGOX)
2745 archive/zip.gox: archive/zip.lo
2746         $(BUILDGOX)
2747
2748 compress/bzip2.gox: compress/bzip2.lo
2749         $(BUILDGOX)
2750 compress/flate.gox: compress/flate.lo
2751         $(BUILDGOX)
2752 compress/gzip.gox: compress/gzip.lo
2753         $(BUILDGOX)
2754 compress/lzw.gox: compress/lzw.lo
2755         $(BUILDGOX)
2756 compress/zlib.gox: compress/zlib.lo
2757         $(BUILDGOX)
2758
2759 container/heap.gox: container/heap.lo
2760         $(BUILDGOX)
2761 container/list.gox: container/list.lo
2762         $(BUILDGOX)
2763 container/ring.gox: container/ring.lo
2764         $(BUILDGOX)
2765 container/vector.gox: container/vector.lo
2766         $(BUILDGOX)
2767
2768 crypto/aes.gox: crypto/aes.lo
2769         $(BUILDGOX)
2770 crypto/block.gox: crypto/block.lo
2771         $(BUILDGOX)
2772 crypto/blowfish.gox: crypto/blowfish.lo
2773         $(BUILDGOX)
2774 crypto/cast5.gox: crypto/cast5.lo
2775         $(BUILDGOX)
2776 crypto/cipher.gox: crypto/cipher.lo
2777         $(BUILDGOX)
2778 crypto/dsa.gox: crypto/dsa.lo
2779         $(BUILDGOX)
2780 crypto/ecdsa.gox: crypto/ecdsa.lo       
2781         $(BUILDGOX)
2782 crypto/elliptic.gox: crypto/elliptic.lo
2783         $(BUILDGOX)
2784 crypto/hmac.gox: crypto/hmac.lo
2785         $(BUILDGOX)
2786 crypto/md4.gox: crypto/md4.lo
2787         $(BUILDGOX)
2788 crypto/md5.gox: crypto/md5.lo
2789         $(BUILDGOX)
2790 crypto/ocsp.gox: crypto/ocsp.lo
2791         $(BUILDGOX)
2792 crypto/openpgp.gox: crypto/openpgp.lo
2793         $(BUILDGOX)
2794 crypto/rand.gox: crypto/rand.lo
2795         $(BUILDGOX)
2796 crypto/rc4.gox: crypto/rc4.lo
2797         $(BUILDGOX)
2798 crypto/ripemd160.gox: crypto/ripemd160.lo
2799         $(BUILDGOX)
2800 crypto/rsa.gox: crypto/rsa.lo
2801         $(BUILDGOX)
2802 crypto/sha1.gox: crypto/sha1.lo
2803         $(BUILDGOX)
2804 crypto/sha256.gox: crypto/sha256.lo
2805         $(BUILDGOX)
2806 crypto/sha512.gox: crypto/sha512.lo
2807         $(BUILDGOX)
2808 crypto/subtle.gox: crypto/subtle.lo
2809         $(BUILDGOX)
2810 crypto/tls.gox: crypto/tls.lo
2811         $(BUILDGOX)
2812 crypto/twofish.gox: crypto/twofish.lo
2813         $(BUILDGOX)
2814 crypto/x509.gox: crypto/x509.lo
2815         $(BUILDGOX)
2816 crypto/xtea.gox: crypto/xtea.lo
2817         $(BUILDGOX)
2818
2819 crypto/openpgp/armor.gox: crypto/openpgp/armor.lo
2820         $(BUILDGOX)
2821 crypto/openpgp/error.gox: crypto/openpgp/error.lo
2822         $(BUILDGOX)
2823 crypto/openpgp/packet.gox: crypto/openpgp/packet.lo
2824         $(BUILDGOX)
2825 crypto/openpgp/s2k.gox: crypto/openpgp/s2k.lo
2826         $(BUILDGOX)
2827
2828 debug/dwarf.gox: debug/dwarf.lo
2829         $(BUILDGOX)
2830 debug/elf.gox: debug/elf.lo
2831         $(BUILDGOX)
2832 debug/gosym.gox: debug/gosym.lo
2833         $(BUILDGOX)
2834 debug/macho.gox: debug/macho.lo
2835         $(BUILDGOX)
2836 debug/pe.gox: debug/pe.lo
2837         $(BUILDGOX)
2838 debug/proc.gox: debug/proc.lo
2839         $(BUILDGOX)
2840
2841 encoding/ascii85.gox: encoding/ascii85.lo
2842         $(BUILDGOX)
2843 encoding/base32.gox: encoding/base32.lo
2844         $(BUILDGOX)
2845 encoding/base64.gox: encoding/base64.lo
2846         $(BUILDGOX)
2847 encoding/binary.gox: encoding/binary.lo
2848         $(BUILDGOX)
2849 encoding/git85.gox: encoding/git85.lo
2850         $(BUILDGOX)
2851 encoding/hex.gox: encoding/hex.lo
2852         $(BUILDGOX)
2853 encoding/line.gox: encoding/line.lo
2854         $(BUILDGOX)
2855 encoding/pem.gox: encoding/pem.lo
2856         $(BUILDGOX)
2857
2858 exp/datafmt.gox: exp/datafmt.lo
2859         $(BUILDGOX)
2860 exp/draw.gox: exp/draw.lo
2861         $(BUILDGOX)
2862 exp/eval.gox: exp/eval.lo
2863         $(BUILDGOX)
2864
2865 go/ast.gox: go/ast.lo
2866         $(BUILDGOX)
2867 go/doc.gox: go/doc.lo
2868         $(BUILDGOX)
2869 go/parser.gox: go/parser.lo
2870         $(BUILDGOX)
2871 go/printer.gox: go/printer.lo
2872         $(BUILDGOX)
2873 go/scanner.gox: go/scanner.lo
2874         $(BUILDGOX)
2875 go/token.gox: go/token.lo
2876         $(BUILDGOX)
2877 go/typechecker.gox: go/typechecker.lo
2878         $(BUILDGOX)
2879
2880 hash/adler32.gox: hash/adler32.lo
2881         $(BUILDGOX)
2882 hash/crc32.gox: hash/crc32.lo
2883         $(BUILDGOX)
2884 hash/crc64.gox: hash/crc64.lo
2885         $(BUILDGOX)
2886 hash/fnv.gox: hash/fnv.lo
2887         $(BUILDGOX)
2888
2889 http/cgi.gox: http/cgi.lo
2890         $(BUILDGOX)
2891 http/httptest.gox: http/httptest.lo
2892         $(BUILDGOX)
2893 http/pprof.gox: http/pprof.lo
2894         $(BUILDGOX)
2895
2896 image/jpeg.gox: image/jpeg.lo
2897         $(BUILDGOX)
2898 image/png.gox: image/png.lo
2899         $(BUILDGOX)
2900
2901 index/suffixarray.gox: index/suffixarray.lo
2902         $(BUILDGOX)
2903
2904 io/ioutil.gox: io/ioutil.lo
2905         $(BUILDGOX)
2906
2907 mime/multipart.gox: mime/multipart.lo
2908         $(BUILDGOX)
2909
2910 net/dict.gox: net/dict.lo
2911         $(BUILDGOX)
2912 net/textproto.gox: net/textproto.lo
2913         $(BUILDGOX)
2914
2915 os/inotify.gox: os/inotify.lo
2916         $(BUILDGOX)
2917 os/signal.gox: os/signal.lo
2918         $(BUILDGOX)
2919
2920 path/filepath.gox: path/filepath.lo
2921         $(BUILDGOX)
2922
2923 rpc/jsonrpc.gox: rpc/jsonrpc.lo
2924         $(BUILDGOX)
2925
2926 runtime/debug.gox: runtime/debug.lo
2927         $(BUILDGOX)
2928 runtime/pprof.gox: runtime/pprof.lo
2929         $(BUILDGOX)
2930
2931 sync/atomic.gox: sync/atomic.lo
2932         $(BUILDGOX)
2933
2934 testing/iotest.gox: testing/iotest.lo
2935         $(BUILDGOX)
2936 testing/quick.gox: testing/quick.lo
2937         $(BUILDGOX)
2938 testing/script.gox: testing/script.lo
2939         $(BUILDGOX)
2940
2941 if LIBGO_IS_LINUX
2942 # os_inotify_check = os/inotify/check
2943 os_inotify_check =
2944 else
2945 os_inotify_check =
2946 endif
2947
2948 TEST_PACKAGES = \
2949         asn1/check \
2950         big/check \
2951         bufio/check \
2952         bytes/check \
2953         cmath/check \
2954         ebnf/check \
2955         exec/check \
2956         expvar/check \
2957         flag/check \
2958         fmt/check \
2959         gob/check \
2960         html/check \
2961         http/check \
2962         io/check \
2963         json/check \
2964         log/check \
2965         math/check \
2966         mime/check \
2967         net/check \
2968         netchan/check \
2969         os/check \
2970         patch/check \
2971         path/check \
2972         rand/check \
2973         reflect/check \
2974         regexp/check \
2975         rpc/check \
2976         runtime/check \
2977         scanner/check \
2978         smtp/check \
2979         sort/check \
2980         strconv/check \
2981         strings/check \
2982         sync/check \
2983         syslog/check \
2984         tabwriter/check \
2985         template/check \
2986         time/check \
2987         try/check \
2988         unicode/check \
2989         utf16/check \
2990         utf8/check \
2991         websocket/check \
2992         xml/check \
2993         archive/tar/check \
2994         archive/zip/check \
2995         compress/bzip2/check \
2996         compress/flate/check \
2997         compress/gzip/check \
2998         compress/lzw/check \
2999         compress/zlib/check \
3000         container/heap/check \
3001         container/list/check \
3002         container/ring/check \
3003         container/vector/check \
3004         crypto/aes/check \
3005         crypto/block/check \
3006         crypto/blowfish/check \
3007         crypto/cast5/check \
3008         crypto/cipher/check \
3009         crypto/dsa/check \
3010         crypto/ecdsa/check \
3011         crypto/elliptic/check \
3012         crypto/hmac/check \
3013         crypto/md4/check \
3014         crypto/md5/check \
3015         crypto/ocsp/check \
3016         crypto/openpgp/check \
3017         crypto/rand/check \
3018         crypto/rc4/check \
3019         crypto/ripemd160/check \
3020         crypto/rsa/check \
3021         crypto/sha1/check \
3022         crypto/sha256/check \
3023         crypto/sha512/check \
3024         crypto/subtle/check \
3025         crypto/tls/check \
3026         crypto/twofish/check \
3027         crypto/x509/check \
3028         crypto/xtea/check \
3029         crypto/openpgp/armor/check \
3030         crypto/openpgp/packet/check \
3031         crypto/openpgp/s2k/check \
3032         debug/dwarf/check \
3033         debug/elf/check \
3034         debug/macho/check \
3035         debug/pe/check \
3036         encoding/ascii85/check \
3037         encoding/base32/check \
3038         encoding/base64/check \
3039         encoding/binary/check \
3040         encoding/git85/check \
3041         encoding/hex/check \
3042         encoding/line/check \
3043         encoding/pem/check \
3044         exp/datafmt/check \
3045         exp/draw/check \
3046         exp/eval/check \
3047         go/parser/check \
3048         go/printer/check \
3049         go/scanner/check \
3050         go/token/check \
3051         go/typechecker/check \
3052         hash/adler32/check \
3053         hash/crc32/check \
3054         hash/crc64/check \
3055         hash/fnv/check \
3056         http/cgi/check \
3057         image/png/check \
3058         index/suffixarray/check \
3059         io/ioutil/check \
3060         mime/multipart/check \
3061         net/textproto/check \
3062         $(os_inotify_check) \
3063         os/signal/check \
3064         path/filepath/check \
3065         rpc/jsonrpc/check \
3066         sync/atomic/check \
3067         testing/quick/check \
3068         testing/script/check
3069
3070 check-am:
3071         @rm -f libgo.sum libgo.log libgo.tail
3072         @echo "Test Run By $${USER} on `date`" > libgo.sum
3073         @echo "Native configuration is $(host_triplet)" >> libgo.sum
3074         @echo >> libgo.sum
3075         @echo "         === libgo tests ===" >> libgo.sum
3076         @echo >> libgo.sum
3077         @echo "Schedule of variations:" >> libgo.sum
3078         @echo "    unix" >> libgo.sum
3079         @echo >> libgo.sum
3080         @echo "Running target unix" >> libgo.sum
3081         @echo "Running $(srcdir)/libgo.exp ..." >> libgo.sum
3082         @cp libgo.sum libgo.log
3083         @echo > libgo.tail
3084         @echo "         === libgo summary ===" >> libgo.tail
3085         @echo >> libgo.tail
3086         @for f in $(TEST_PACKAGES); do \
3087            rm -f $$f-testsum $$f-testlog; \
3088          done
3089         @$(MAKE) -k $(TEST_PACKAGES); \
3090         status=$$?; \
3091         for f in $(TEST_PACKAGES); do \
3092           if test -f $$f-testsum; then \
3093             cat $$f-testsum >> libgo.sum; \
3094           fi; \
3095           if test -f $$f-testlog; then \
3096             cat $$f-testlog >> libgo.log; \
3097           fi; \
3098         done; \
3099         p=`grep -c PASS libgo.sum`; \
3100         if test "$$p" != "0"; then \
3101           echo "# of expected passes            $$p" >> libgo.tail; \
3102         fi; \
3103         p=`grep -c FAIL libgo.sum`; \
3104         if test "$$p" != "0"; then \
3105           echo "# of unexpected failures        $$p" >> libgo.tail; \
3106         fi; \
3107         p=`grep -c UNTESTED libgo.sum`; \
3108         if test "$$p" != "0"; then \
3109           echo "# of untested testcases         $$p" >> libgo.tail; \
3110         fi; \
3111         cat libgo.tail >> libgo.sum; \
3112         cat libgo.tail >> libgo.log; \
3113         echo `echo $(GOC) | sed -e 's/ .*//'`  `$(GOC) -v 2>&1 | grep " version" | sed -n -e 's/.* \(version.*$$\)/\1/p'` >> libgo.sum; \
3114         echo >> libgo.log; \
3115         echo "runtest completed at `date`" >> libgo.log; \
3116         exit $$status
3117
3118 MOSTLYCLEAN_FILES = libgo.tail
3119
3120 mostlyclean-local:
3121         find . -name '*.lo' -print | xargs $(LIBTOOL) --mode=clean rm -f
3122         find . -name '*.$(OBJEXT)' -print | xargs rm -f
3123         find . -name '*-testsum' -print | xargs rm -f
3124         find . -name '*-testlog' -print | xargs rm -f
3125
3126 CLEANFILES = *.go *.gox goc2c *.c s-version libgo.sum libgo.log
3127
3128 clean-local:
3129         find . -name '*.la' -print | xargs $(LIBTOOL) --mode=clean rm -f
3130         find . -name '*.a' -print | xargs rm -f