OSDN Git Service

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