OSDN Git Service

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