summaryrefslogtreecommitdiff
path: root/src/pkg
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2009-08-12 13:19:17 -0700
committerRuss Cox <rsc@golang.org>2009-08-12 13:19:17 -0700
commit2ee4549f599ed214693abf75163176f178b4188c (patch)
treec9dbc55a8447806706f8ae757a04c3c41b815835 /src/pkg
parent5ff5b6823c8a023da5c9d6ccc2effe7fad8447f6 (diff)
downloadgolang-2ee4549f599ed214693abf75163176f178b4188c.tar.gz
convert non-low-level non-google pkg code
to whole-package compilation. R=r OCL=33070 CL=33101
Diffstat (limited to 'src/pkg')
-rw-r--r--src/pkg/archive/tar/Makefile69
-rw-r--r--src/pkg/archive/tar/reader.go10
-rw-r--r--src/pkg/archive/tar/reader_test.go1
-rw-r--r--src/pkg/archive/tar/writer.go3
-rw-r--r--src/pkg/archive/tar/writer_test.go1
-rw-r--r--src/pkg/base64/Makefile58
-rw-r--r--src/pkg/base64/base64_test.go1
-rw-r--r--src/pkg/bignum/Makefile85
-rwxr-xr-xsrc/pkg/bignum/bignum.go4
-rw-r--r--src/pkg/bignum/bignum_test.go1
-rw-r--r--src/pkg/bignum/integer.go3
-rw-r--r--src/pkg/bignum/rational.go3
-rw-r--r--src/pkg/bufio/Makefile57
-rw-r--r--src/pkg/bufio/bufio_test.go3
-rw-r--r--src/pkg/compress/flate/Makefile57
-rw-r--r--src/pkg/compress/flate/flate_test.go3
-rw-r--r--src/pkg/compress/flate/inflate.go7
-rw-r--r--src/pkg/compress/gzip/Makefile57
-rw-r--r--src/pkg/compress/gzip/gunzip.go2
-rw-r--r--src/pkg/compress/gzip/gunzip_test.go1
-rw-r--r--src/pkg/container/list/Makefile57
-rwxr-xr-xsrc/pkg/container/list/list_test.go1
-rw-r--r--src/pkg/container/ring/Makefile58
-rw-r--r--src/pkg/container/ring/ring_test.go3
-rw-r--r--src/pkg/container/vector/Makefile68
-rw-r--r--src/pkg/container/vector/intvector.go1
-rw-r--r--src/pkg/container/vector/stringvector.go2
-rw-r--r--src/pkg/container/vector/vector_test.go1
-rw-r--r--src/pkg/crypto/aes/Makefile75
-rw-r--r--src/pkg/crypto/aes/aes_test.go1
-rw-r--r--src/pkg/crypto/aes/block.go2
-rw-r--r--src/pkg/crypto/aes/cipher.go1
-rw-r--r--src/pkg/crypto/block/Makefile89
-rw-r--r--src/pkg/crypto/block/cbc.go1
-rw-r--r--src/pkg/crypto/block/cbc_aes_test.go5
-rw-r--r--src/pkg/crypto/block/cfb.go1
-rw-r--r--src/pkg/crypto/block/cfb_aes_test.go5
-rw-r--r--src/pkg/crypto/block/cmac.go1
-rw-r--r--src/pkg/crypto/block/cmac_aes_test.go5
-rw-r--r--src/pkg/crypto/block/ctr.go1
-rw-r--r--src/pkg/crypto/block/ctr_aes_test.go7
-rw-r--r--src/pkg/crypto/block/eax.go1
-rw-r--r--src/pkg/crypto/block/eax_aes_test.go1
-rw-r--r--src/pkg/crypto/block/ecb.go1
-rw-r--r--src/pkg/crypto/block/ecb_aes_test.go1
-rw-r--r--src/pkg/crypto/block/ecb_test.go1
-rw-r--r--src/pkg/crypto/block/ofb.go1
-rw-r--r--src/pkg/crypto/block/ofb_aes_test.go5
-rw-r--r--src/pkg/crypto/block/xor.go1
-rw-r--r--src/pkg/crypto/block/xor_test.go1
-rw-r--r--src/pkg/crypto/hmac/Makefile57
-rw-r--r--src/pkg/crypto/hmac/hmac_test.go1
-rw-r--r--src/pkg/crypto/md5/Makefile66
-rw-r--r--src/pkg/crypto/md5/md5.go2
-rw-r--r--src/pkg/crypto/md5/md5_test.go1
-rw-r--r--src/pkg/crypto/md5/md5block.go2
-rw-r--r--src/pkg/crypto/sha1/Makefile66
-rw-r--r--src/pkg/crypto/sha1/sha1.go2
-rw-r--r--src/pkg/crypto/sha1/sha1_test.go1
-rw-r--r--src/pkg/crypto/sha1/sha1block.go2
-rw-r--r--src/pkg/datafmt/Makefile66
-rw-r--r--src/pkg/datafmt/datafmt_test.go1
-rw-r--r--src/pkg/datafmt/parser.go3
-rw-r--r--src/pkg/ebnf/Makefile67
-rw-r--r--src/pkg/ebnf/ebnf_test.go1
-rw-r--r--src/pkg/ebnf/parser.go3
-rw-r--r--src/pkg/exec/Makefile57
-rw-r--r--src/pkg/exec/exec_test.go7
-rw-r--r--src/pkg/exvar/Makefile57
-rw-r--r--src/pkg/exvar/exvar_test.go1
-rw-r--r--src/pkg/go/ast/Makefile67
-rw-r--r--src/pkg/go/ast/filter.go3
-rw-r--r--src/pkg/go/doc/Makefile66
-rw-r--r--src/pkg/go/doc/doc.go4
-rw-r--r--src/pkg/go/parser/Makefile67
-rw-r--r--src/pkg/go/parser/interface.go1
-rw-r--r--src/pkg/go/parser/parser.go9
-rw-r--r--src/pkg/go/parser/parser_test.go1
-rw-r--r--src/pkg/go/printer/Makefile58
-rw-r--r--src/pkg/go/printer/printer.go6
-rw-r--r--src/pkg/go/printer/printer_test.go1
-rw-r--r--src/pkg/go/scanner/Makefile67
-rw-r--r--src/pkg/go/scanner/scanner.go1
-rw-r--r--src/pkg/go/scanner/scanner_test.go15
-rw-r--r--src/pkg/go/token/Makefile57
-rw-r--r--src/pkg/hash/Makefile57
-rw-r--r--src/pkg/hash/adler32/Makefile57
-rw-r--r--src/pkg/hash/adler32/adler32_test.go1
-rw-r--r--src/pkg/hash/crc32/Makefile57
-rw-r--r--src/pkg/hash/crc32/crc32_test.go1
-rw-r--r--src/pkg/http/Makefile88
-rw-r--r--src/pkg/http/client.go1
-rw-r--r--src/pkg/http/client_test.go1
-rw-r--r--src/pkg/http/fs.go1
-rw-r--r--src/pkg/http/request.go1
-rw-r--r--src/pkg/http/request_test.go1
-rw-r--r--src/pkg/http/server.go4
-rw-r--r--src/pkg/http/triv.go1
-rw-r--r--src/pkg/http/url_test.go3
-rw-r--r--src/pkg/json/Makefile68
-rw-r--r--src/pkg/json/generic.go1
-rw-r--r--src/pkg/json/generic_test.go1
-rw-r--r--src/pkg/json/struct.go1
-rw-r--r--src/pkg/json/struct_test.go1
-rw-r--r--src/pkg/log/Makefile57
-rw-r--r--src/pkg/log/log_test.go1
-rw-r--r--src/pkg/malloc/Makefile57
-rw-r--r--src/pkg/net/Makefile97
-rw-r--r--src/pkg/net/dialgoogle_test.go11
-rw-r--r--src/pkg/net/dnsclient.go1
-rw-r--r--src/pkg/net/dnsconfig.go1
-rw-r--r--src/pkg/net/dnsmsg.go1
-rw-r--r--src/pkg/net/fd.go4
-rw-r--r--src/pkg/net/fd_darwin.go1
-rw-r--r--src/pkg/net/fd_linux.go1
-rw-r--r--src/pkg/net/ip.go1
-rw-r--r--src/pkg/net/ip_test.go1
-rw-r--r--src/pkg/net/net.go4
-rw-r--r--src/pkg/net/net_test.go3
-rw-r--r--src/pkg/net/parse_test.go1
-rw-r--r--src/pkg/net/port.go1
-rw-r--r--src/pkg/net/port_test.go1
-rw-r--r--src/pkg/net/server_test.go5
-rw-r--r--src/pkg/net/timeout_test.go3
-rw-r--r--src/pkg/path/Makefile57
-rw-r--r--src/pkg/path/path_test.go2
-rw-r--r--src/pkg/rand/Makefile57
-rw-r--r--src/pkg/regexp/Makefile57
-rw-r--r--src/pkg/regexp/all_test.go1
-rw-r--r--src/pkg/regexp/regexp.go2
-rw-r--r--src/pkg/rpc/Makefile69
-rw-r--r--src/pkg/rpc/client.go1
-rw-r--r--src/pkg/rpc/debug.go1
-rw-r--r--src/pkg/rpc/server.go2
-rw-r--r--src/pkg/rpc/server_test.go1
-rw-r--r--src/pkg/sort/Makefile57
-rw-r--r--src/pkg/sort/sort_test.go41
-rw-r--r--src/pkg/strings/Makefile57
-rw-r--r--src/pkg/strings/strings_test.go1
-rw-r--r--src/pkg/syscall/Makefile104
-rw-r--r--src/pkg/syscall/errstr.go1
-rw-r--r--src/pkg/syscall/exec.go1
-rw-r--r--src/pkg/syscall/syscall.go5
-rw-r--r--src/pkg/syscall/syscall_darwin.go5
-rw-r--r--src/pkg/syscall/syscall_darwin_386.go2
-rw-r--r--src/pkg/syscall/syscall_darwin_amd64.go2
-rw-r--r--src/pkg/syscall/syscall_linux.go5
-rw-r--r--src/pkg/syscall/syscall_linux_386.go5
-rw-r--r--src/pkg/syscall/syscall_linux_amd64.go2
-rw-r--r--src/pkg/syscall/zsyscall_darwin_386.go5
-rw-r--r--src/pkg/syscall/zsyscall_darwin_amd64.go5
-rw-r--r--src/pkg/syscall/zsyscall_linux_386.go5
-rw-r--r--src/pkg/syscall/zsyscall_linux_amd64.go5
-rw-r--r--src/pkg/tabwriter/Makefile57
-rw-r--r--src/pkg/tabwriter/tabwriter_test.go23
-rw-r--r--src/pkg/template/Makefile66
-rw-r--r--src/pkg/template/template.go8
-rw-r--r--src/pkg/template/template_test.go1
-rw-r--r--src/pkg/testing/Makefile67
-rw-r--r--src/pkg/testing/iotest/Makefile59
-rw-r--r--src/pkg/testing/regexp.go2
-rw-r--r--src/pkg/testing/testing.go1
-rw-r--r--src/pkg/unicode/Makefile66
-rw-r--r--src/pkg/unicode/decimaldigit.go2
-rw-r--r--src/pkg/unicode/decimaldigit_test.go5
-rw-r--r--src/pkg/unicode/letter_test.go5
166 files changed, 308 insertions, 2920 deletions
diff --git a/src/pkg/archive/tar/Makefile b/src/pkg/archive/tar/Makefile
index 78734ef58..debe06284 100644
--- a/src/pkg/archive/tar/Makefile
+++ b/src/pkg/archive/tar/Makefile
@@ -2,69 +2,12 @@
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-
-# DO NOT EDIT. Automatically generated by gobuild.
-# gobuild -m >Makefile
-
-D=/archive/
-
include $(GOROOT)/src/Make.$(GOARCH)
-AR=gopack
-
-default: packages
-
-clean:
- rm -rf *.[$(OS)] *.a [$(OS)].out _obj
-
-test: packages
- gotest
-
-coverage: packages
- gotest
- 6cov -g $$(pwd) | grep -v '_test\.go:'
-
-%.$O: %.go
- $(GC) -I_obj $*.go
-
-%.$O: %.c
- $(CC) $*.c
-
-%.$O: %.s
- $(AS) $*.s
-
-O1=\
- common.$O\
-
-O2=\
- reader.$O\
- writer.$O\
-
-
-phases: a1 a2
-_obj$D/tar.a: phases
-
-a1: $(O1)
- $(AR) grc _obj$D/tar.a common.$O
- rm -f $(O1)
-
-a2: $(O2)
- $(AR) grc _obj$D/tar.a reader.$O writer.$O
- rm -f $(O2)
-
-
-newpkg: clean
- mkdir -p _obj$D
- $(AR) grc _obj$D/tar.a
-
-$(O1): newpkg
-$(O2): a1
-$(O3): a2
-
-nuke: clean
- rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/tar.a
-packages: _obj$D/tar.a
+TARG=archive/tar
+GOFILES=\
+ common.go\
+ reader.go\
+ writer.go\
-install: packages
- test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
- cp _obj$D/tar.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/tar.a
+include $(GOROOT)/src/Make.pkg
diff --git a/src/pkg/archive/tar/reader.go b/src/pkg/archive/tar/reader.go
index 56b840448..044d5ab2e 100644
--- a/src/pkg/archive/tar/reader.go
+++ b/src/pkg/archive/tar/reader.go
@@ -8,7 +8,6 @@ package tar
// - pax extensions
import (
- "archive/tar";
"bytes";
"io";
"os";
@@ -25,8 +24,8 @@ var (
// and then it can be treated as an io.Reader to access the file's data.
//
// Example:
-// tr := tar.NewReader(r);
-// for {
+// tr := tar.NewReader(r);
+// for {
// hdr, err := tr.Next();
// if err != nil {
// // handle error
@@ -36,7 +35,7 @@ var (
// break
// }
// io.Copy(tr, data);
-// }
+// }
type Reader struct {
r io.Reader;
err os.Error;
@@ -44,9 +43,6 @@ type Reader struct {
pad int64; // amount of padding (ignored) after current file entry
}
-func (tr *Reader) skipUnread()
-func (tr *Reader) readHeader() *Header
-
// NewReader creates a new Reader reading from r.
func NewReader(r io.Reader) *Reader {
return &Reader{ r: r }
diff --git a/src/pkg/archive/tar/reader_test.go b/src/pkg/archive/tar/reader_test.go
index 428f73e60..cc3f8feb4 100644
--- a/src/pkg/archive/tar/reader_test.go
+++ b/src/pkg/archive/tar/reader_test.go
@@ -5,7 +5,6 @@
package tar
import (
- "archive/tar";
"bytes";
"fmt";
"io";
diff --git a/src/pkg/archive/tar/writer.go b/src/pkg/archive/tar/writer.go
index fbb0031fc..b3ce6b5c1 100644
--- a/src/pkg/archive/tar/writer.go
+++ b/src/pkg/archive/tar/writer.go
@@ -8,7 +8,6 @@ package tar
// - catch more errors (no first header, write after close, etc.)
import (
- "archive/tar";
"bytes";
"io";
"os";
@@ -28,7 +27,7 @@ var (
// writing at most hdr.Size bytes in total.
//
// Example:
-// tw := tar.NewWriter(w);
+// tw := tar.NewWriter(w);
// hdr := new(Header);
// hdr.Size = length of data in bytes;
// // populate other hdr fields as desired
diff --git a/src/pkg/archive/tar/writer_test.go b/src/pkg/archive/tar/writer_test.go
index 5ada36b53..775882c10 100644
--- a/src/pkg/archive/tar/writer_test.go
+++ b/src/pkg/archive/tar/writer_test.go
@@ -5,7 +5,6 @@
package tar
import (
- "archive/tar";
"bytes";
"fmt";
"io";
diff --git a/src/pkg/base64/Makefile b/src/pkg/base64/Makefile
index 38e7f9bfa..ff9169522 100644
--- a/src/pkg/base64/Makefile
+++ b/src/pkg/base64/Makefile
@@ -2,60 +2,10 @@
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-
-# DO NOT EDIT. Automatically generated by gobuild.
-# gobuild -m >Makefile
-
-D=
-
include $(GOROOT)/src/Make.$(GOARCH)
-AR=gopack
-
-default: packages
-
-clean:
- rm -rf *.[$(OS)] *.a [$(OS)].out _obj
-
-test: packages
- gotest
-
-coverage: packages
- gotest
- 6cov -g $$(pwd) | grep -v '_test\.go:'
-
-%.$O: %.go
- $(GC) -I_obj $*.go
-
-%.$O: %.c
- $(CC) $*.c
-
-%.$O: %.s
- $(AS) $*.s
-
-O1=\
- base64.$O\
-
-
-phases: a1
-_obj$D/base64.a: phases
-
-a1: $(O1)
- $(AR) grc _obj$D/base64.a base64.$O
- rm -f $(O1)
-
-
-newpkg: clean
- mkdir -p _obj$D
- $(AR) grc _obj$D/base64.a
-
-$(O1): newpkg
-$(O2): a1
-
-nuke: clean
- rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/base64.a
-packages: _obj$D/base64.a
+TARG=base64
+GOFILES=\
+ base64.go\
-install: packages
- test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
- cp _obj$D/base64.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/base64.a
+include $(GOROOT)/src/Make.pkg
diff --git a/src/pkg/base64/base64_test.go b/src/pkg/base64/base64_test.go
index 6ebaa235d..34bcfb34b 100644
--- a/src/pkg/base64/base64_test.go
+++ b/src/pkg/base64/base64_test.go
@@ -5,7 +5,6 @@
package base64
import (
- "base64";
"bytes";
"io";
"os";
diff --git a/src/pkg/bignum/Makefile b/src/pkg/bignum/Makefile
index 20f75bc27..bcb8752aa 100644
--- a/src/pkg/bignum/Makefile
+++ b/src/pkg/bignum/Makefile
@@ -2,84 +2,13 @@
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-
-# DO NOT EDIT. Automatically generated by gobuild.
-# gobuild -m arith.go bignum.go integer.go rational.go >Makefile
-
-D=
-
include $(GOROOT)/src/Make.$(GOARCH)
-AR=gopack
-
-default: packages
-
-clean:
- rm -rf *.[$(OS)] *.a [$(OS)].out _obj
-
-test: packages
- gotest
-
-coverage: packages
- gotest
- 6cov -g $$(pwd) | grep -v '_test\.go:'
-
-%.$O: %.go
- $(GC) -I_obj $*.go
-
-%.$O: %.c
- $(CC) $*.c
-
-%.$O: %.s
- $(AS) $*.s
-
-O1=\
- arith.$O\
-
-O2=\
- bignum.$O\
-
-O3=\
- integer.$O\
-
-O4=\
- rational.$O\
-
-
-phases: a1 a2 a3 a4
-_obj$D/bignum.a: phases
-
-a1: $(O1)
- $(AR) grc _obj$D/bignum.a arith.$O
- rm -f $(O1)
-
-a2: $(O2)
- $(AR) grc _obj$D/bignum.a bignum.$O
- rm -f $(O2)
-
-a3: $(O3)
- $(AR) grc _obj$D/bignum.a integer.$O
- rm -f $(O3)
-
-a4: $(O4)
- $(AR) grc _obj$D/bignum.a rational.$O
- rm -f $(O4)
-
-
-newpkg: clean
- mkdir -p _obj$D
- $(AR) grc _obj$D/bignum.a
-
-$(O1): newpkg
-$(O2): a1
-$(O3): a2
-$(O4): a3
-$(O5): a4
-
-nuke: clean
- rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/bignum.a
-packages: _obj$D/bignum.a
+TARG=bignum
+GOFILES=\
+ arith.go\
+ bignum.go\
+ integer.go\
+ rational.go\
-install: packages
- test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
- cp _obj$D/bignum.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/bignum.a
+include $(GOROOT)/src/Make.pkg
diff --git a/src/pkg/bignum/bignum.go b/src/pkg/bignum/bignum.go
index 2b36fbd75..7d2dde61f 100755
--- a/src/pkg/bignum/bignum.go
+++ b/src/pkg/bignum/bignum.go
@@ -12,7 +12,6 @@
package bignum
import (
- "bignum";
"fmt";
)
@@ -308,9 +307,6 @@ func (x Natural) Sub(y Natural) Natural {
}
-// MulAdd128 is defined in arith.go and arith.s .
-func MulAdd128(x, y, c uint64) (z1, z0 uint64)
-
// Returns z1 = (x*y + c) div B, z0 = (x*y + c) mod B.
//
func muladd11(x, y, c digit) (digit, digit) {
diff --git a/src/pkg/bignum/bignum_test.go b/src/pkg/bignum/bignum_test.go
index d691da232..5b4cf8fd1 100644
--- a/src/pkg/bignum/bignum_test.go
+++ b/src/pkg/bignum/bignum_test.go
@@ -5,7 +5,6 @@
package bignum
import (
- "bignum";
"fmt";
"testing";
)
diff --git a/src/pkg/bignum/integer.go b/src/pkg/bignum/integer.go
index 30e13092f..35a95bb3c 100644
--- a/src/pkg/bignum/integer.go
+++ b/src/pkg/bignum/integer.go
@@ -10,7 +10,6 @@
package bignum
import (
- "bignum";
"fmt";
)
@@ -352,7 +351,7 @@ func (x *Integer) Shr(s uint) *Integer {
// (-x) >> s == ^(x-1) >> s == ^((x-1) >> s) == -(((x-1) >> s) + 1)
return MakeInt(true, x.mant.Sub(Nat(1)).Shr(s).Add(Nat(1)));
}
-
+
return MakeInt(false, x.mant.Shr(s));
}
diff --git a/src/pkg/bignum/rational.go b/src/pkg/bignum/rational.go
index 92b5d8883..baa9b4110 100644
--- a/src/pkg/bignum/rational.go
+++ b/src/pkg/bignum/rational.go
@@ -6,7 +6,6 @@
package bignum
-import "bignum"
import "fmt"
@@ -179,7 +178,7 @@ func (x *Rational) Format(h fmt.State, c int) {
// of the numerator is returned. If the mantissa contains a decimal point,
// the base for the fractional part is the same as for the part before the
// decimal point and the fractional part does not accept a base prefix.
-// The base for the exponent is always 10.
+// The base for the exponent is always 10.
//
func RatFromString(s string, base uint) (*Rational, uint, int) {
// read numerator
diff --git a/src/pkg/bufio/Makefile b/src/pkg/bufio/Makefile
index abb826e7f..af41e888b 100644
--- a/src/pkg/bufio/Makefile
+++ b/src/pkg/bufio/Makefile
@@ -2,59 +2,10 @@
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-# DO NOT EDIT. Automatically generated by gobuild.
-# gobuild -m >Makefile
-
-D=
-
include $(GOROOT)/src/Make.$(GOARCH)
-AR=gopack
-
-default: packages
-
-clean:
- rm -rf *.[$(OS)] *.a [$(OS)].out _obj
-
-test: packages
- gotest
-
-coverage: packages
- gotest
- 6cov -g `pwd` | grep -v '_test\.go:'
-
-%.$O: %.go
- $(GC) -I_obj $*.go
-
-%.$O: %.c
- $(CC) $*.c
-
-%.$O: %.s
- $(AS) $*.s
-
-O1=\
- bufio.$O\
-
-
-phases: a1
-_obj$D/bufio.a: phases
-
-a1: $(O1)
- $(AR) grc _obj$D/bufio.a bufio.$O
- rm -f $(O1)
-
-
-newpkg: clean
- mkdir -p _obj$D
- $(AR) grc _obj$D/bufio.a
-
-$(O1): newpkg
-$(O2): a1
-
-nuke: clean
- rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/bufio.a
-packages: _obj$D/bufio.a
+TARG=bufio
+GOFILES=\
+ bufio.go\
-install: packages
- test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
- cp _obj$D/bufio.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/bufio.a
+include $(GOROOT)/src/Make.pkg
diff --git a/src/pkg/bufio/bufio_test.go b/src/pkg/bufio/bufio_test.go
index c08f68ebe..e5bf904a0 100644
--- a/src/pkg/bufio/bufio_test.go
+++ b/src/pkg/bufio/bufio_test.go
@@ -6,7 +6,6 @@ package bufio
import (
"bytes";
- "bufio";
"fmt";
"io";
"os";
@@ -191,7 +190,7 @@ func (r *StringReader) Read (p []byte) (n int, err os.Error) {
func readRuneSegments(t *testing.T, segments []string) {
got := "";
want := strings.Join(segments, "");
- r := bufio.NewReader(&StringReader{data: segments});
+ r := NewReader(&StringReader{data: segments});
for {
rune, size, err := r.ReadRune();
if err != nil {
diff --git a/src/pkg/compress/flate/Makefile b/src/pkg/compress/flate/Makefile
index 3f73a1932..1759dfb01 100644
--- a/src/pkg/compress/flate/Makefile
+++ b/src/pkg/compress/flate/Makefile
@@ -2,59 +2,10 @@
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-# DO NOT EDIT. Automatically generated by gobuild.
-# gobuild -m >Makefile
-
-D=/compress/
-
include $(GOROOT)/src/Make.$(GOARCH)
-AR=gopack
-
-default: packages
-
-clean:
- rm -rf *.[$(OS)] *.a [$(OS)].out _obj
-
-test: packages
- gotest
-
-coverage: packages
- gotest
- 6cov -g `pwd` | grep -v '_test\.go:'
-
-%.$O: %.go
- $(GC) -I_obj $*.go
-
-%.$O: %.c
- $(CC) $*.c
-
-%.$O: %.s
- $(AS) $*.s
-
-O1=\
- inflate.$O\
-
-
-phases: a1
-_obj$D/flate.a: phases
-
-a1: $(O1)
- $(AR) grc _obj$D/flate.a inflate.$O
- rm -f $(O1)
-
-
-newpkg: clean
- mkdir -p _obj$D
- $(AR) grc _obj$D/flate.a
-
-$(O1): newpkg
-$(O2): a1
-
-nuke: clean
- rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/flate.a
-packages: _obj$D/flate.a
+TARG=compress/flate
+GOFILES=\
+ inflate.go\
-install: packages
- test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
- cp _obj$D/flate.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/flate.a
+include $(GOROOT)/src/Make.pkg
diff --git a/src/pkg/compress/flate/flate_test.go b/src/pkg/compress/flate/flate_test.go
index bfa562715..01d875c0a 100644
--- a/src/pkg/compress/flate/flate_test.go
+++ b/src/pkg/compress/flate/flate_test.go
@@ -11,7 +11,6 @@ package flate
import (
"bytes";
"bufio";
- "compress/flate";
"io";
"os";
"reflect";
@@ -102,7 +101,7 @@ var initDecoderTests = []*InitDecoderTest{
fixedHuffmanDecoder,
true,
},
-
+
// Illegal input.
&InitDecoderTest{
[]int{ },
diff --git a/src/pkg/compress/flate/inflate.go b/src/pkg/compress/flate/inflate.go
index 95973b4c7..8719473d9 100644
--- a/src/pkg/compress/flate/inflate.go
+++ b/src/pkg/compress/flate/inflate.go
@@ -263,13 +263,6 @@ type inflater struct {
buf [4]byte;
}
-func (f *inflater) dataBlock() os.Error
-func (f *inflater) readHuffman() os.Error
-func (f *inflater) decodeBlock(hl, hd *huffmanDecoder) os.Error
-func (f *inflater) moreBits() os.Error
-func (f *inflater) huffSym(h *huffmanDecoder) (int, os.Error)
-func (f *inflater) flush() os.Error
-
func (f *inflater) inflate() (err os.Error) {
final := false;
for err == nil && !final {
diff --git a/src/pkg/compress/gzip/Makefile b/src/pkg/compress/gzip/Makefile
index 514118ae0..717a2d608 100644
--- a/src/pkg/compress/gzip/Makefile
+++ b/src/pkg/compress/gzip/Makefile
@@ -2,59 +2,10 @@
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-# DO NOT EDIT. Automatically generated by gobuild.
-# gobuild -m >Makefile
-
-D=/compress/
-
include $(GOROOT)/src/Make.$(GOARCH)
-AR=gopack
-
-default: packages
-
-clean:
- rm -rf *.[$(OS)] *.a [$(OS)].out _obj
-
-test: packages
- gotest
-
-coverage: packages
- gotest
- 6cov -g `pwd` | grep -v '_test\.go:'
-
-%.$O: %.go
- $(GC) -I_obj $*.go
-
-%.$O: %.c
- $(CC) $*.c
-
-%.$O: %.s
- $(AS) $*.s
-
-O1=\
- gunzip.$O\
-
-
-phases: a1
-_obj$D/gzip.a: phases
-
-a1: $(O1)
- $(AR) grc _obj$D/gzip.a gunzip.$O
- rm -f $(O1)
-
-
-newpkg: clean
- mkdir -p _obj$D
- $(AR) grc _obj$D/gzip.a
-
-$(O1): newpkg
-$(O2): a1
-
-nuke: clean
- rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/gzip.a
-packages: _obj$D/gzip.a
+TARG=compress/gzip
+GOFILES=\
+ gunzip.go\
-install: packages
- test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
- cp _obj$D/gzip.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/gzip.a
+include $(GOROOT)/src/Make.pkg
diff --git a/src/pkg/compress/gzip/gunzip.go b/src/pkg/compress/gzip/gunzip.go
index f170e8bcd..f4accf1a8 100644
--- a/src/pkg/compress/gzip/gunzip.go
+++ b/src/pkg/compress/gzip/gunzip.go
@@ -71,8 +71,6 @@ type GzipInflater struct {
eof bool;
}
-func (z *GzipInflater) readHeader(save bool) os.Error
-
// NewGzipInflater creates a new GzipInflater reading the given reader.
// The implementation buffers input and may read more data than necessary from r.
func NewGzipInflater(r io.Reader) (*GzipInflater, os.Error) {
diff --git a/src/pkg/compress/gzip/gunzip_test.go b/src/pkg/compress/gzip/gunzip_test.go
index b8c9c7189..99df3261d 100644
--- a/src/pkg/compress/gzip/gunzip_test.go
+++ b/src/pkg/compress/gzip/gunzip_test.go
@@ -6,7 +6,6 @@ package gzip
import (
"bytes";
- "compress/gzip";
"fmt";
"io";
"testing";
diff --git a/src/pkg/container/list/Makefile b/src/pkg/container/list/Makefile
index 2a647eb2a..3ed4d1f6c 100644
--- a/src/pkg/container/list/Makefile
+++ b/src/pkg/container/list/Makefile
@@ -2,59 +2,10 @@
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-# DO NOT EDIT. Automatically generated by gobuild.
-# gobuild -m >Makefile
-
-D=/container/
-
include $(GOROOT)/src/Make.$(GOARCH)
-AR=gopack
-
-default: packages
-
-clean:
- rm -rf *.[$(OS)] *.a [$(OS)].out _obj
-
-test: packages
- gotest
-
-coverage: packages
- gotest
- 6cov -g `pwd` | grep -v '_test\.go:'
-
-%.$O: %.go
- $(GC) -I_obj $*.go
-
-%.$O: %.c
- $(CC) $*.c
-
-%.$O: %.s
- $(AS) $*.s
-
-O1=\
- list.$O\
-
-
-phases: a1
-_obj$D/list.a: phases
-
-a1: $(O1)
- $(AR) grc _obj$D/list.a list.$O
- rm -f $(O1)
-
-
-newpkg: clean
- mkdir -p _obj$D
- $(AR) grc _obj$D/list.a
-
-$(O1): newpkg
-$(O2): a1
-
-nuke: clean
- rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/list.a
-packages: _obj$D/list.a
+TARG=container/list
+GOFILES=\
+ list.go\
-install: packages
- test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
- cp _obj$D/list.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/list.a
+include $(GOROOT)/src/Make.pkg
diff --git a/src/pkg/container/list/list_test.go b/src/pkg/container/list/list_test.go
index bdfed3578..7b2480f9c 100755
--- a/src/pkg/container/list/list_test.go
+++ b/src/pkg/container/list/list_test.go
@@ -5,7 +5,6 @@
package list
import (
- "container/list";
"testing";
)
diff --git a/src/pkg/container/ring/Makefile b/src/pkg/container/ring/Makefile
index 931f40524..70046cb54 100644
--- a/src/pkg/container/ring/Makefile
+++ b/src/pkg/container/ring/Makefile
@@ -2,60 +2,10 @@
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-
-# DO NOT EDIT. Automatically generated by gobuild.
-# gobuild -m >Makefile
-
-D=/container/
-
include $(GOROOT)/src/Make.$(GOARCH)
-AR=gopack
-
-default: packages
-
-clean:
- rm -rf *.[$(OS)] *.a [$(OS)].out _obj
-
-test: packages
- gotest
-
-coverage: packages
- gotest
- 6cov -g $$(pwd) | grep -v '_test\.go:'
-
-%.$O: %.go
- $(GC) -I_obj $*.go
-
-%.$O: %.c
- $(CC) $*.c
-
-%.$O: %.s
- $(AS) $*.s
-
-O1=\
- ring.$O\
-
-
-phases: a1
-_obj$D/ring.a: phases
-
-a1: $(O1)
- $(AR) grc _obj$D/ring.a ring.$O
- rm -f $(O1)
-
-
-newpkg: clean
- mkdir -p _obj$D
- $(AR) grc _obj$D/ring.a
-
-$(O1): newpkg
-$(O2): a1
-
-nuke: clean
- rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/ring.a
-packages: _obj$D/ring.a
+TARG=container/ring
+GOFILES=\
+ ring.go\
-install: packages
- test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
- cp _obj$D/ring.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/ring.a
+include $(GOROOT)/src/Make.pkg
diff --git a/src/pkg/container/ring/ring_test.go b/src/pkg/container/ring/ring_test.go
index c2e9d414c..8ecbacd14 100644
--- a/src/pkg/container/ring/ring_test.go
+++ b/src/pkg/container/ring/ring_test.go
@@ -5,7 +5,6 @@
package ring
import (
- "container/ring";
"fmt";
"testing";
)
@@ -90,7 +89,7 @@ func verify(t *testing.T, r *Ring, N int, sum int) {
if r.Prev() != r.prev {
t.Errorf("r.Prev() != r.prev");
}
-
+
// Move
if r.Move(0) != r {
t.Errorf("r.Move(0) != r");
diff --git a/src/pkg/container/vector/Makefile b/src/pkg/container/vector/Makefile
index 20490549d..1237f2c3b 100644
--- a/src/pkg/container/vector/Makefile
+++ b/src/pkg/container/vector/Makefile
@@ -2,68 +2,12 @@
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-# DO NOT EDIT. Automatically generated by gobuild.
-# gobuild -m >Makefile
-
-D=/container/
-
include $(GOROOT)/src/Make.$(GOARCH)
-AR=gopack
-
-default: packages
-
-clean:
- rm -rf *.[$(OS)] *.a [$(OS)].out _obj
-
-test: packages
- gotest
-
-coverage: packages
- gotest
- 6cov -g `pwd` | grep -v '_test\.go:'
-
-%.$O: %.go
- $(GC) -I_obj $*.go
-
-%.$O: %.c
- $(CC) $*.c
-
-%.$O: %.s
- $(AS) $*.s
-
-O1=\
- vector.$O\
-
-O2=\
- intvector.$O\
- stringvector.$O\
-
-
-phases: a1 a2
-_obj$D/vector.a: phases
-
-a1: $(O1)
- $(AR) grc _obj$D/vector.a vector.$O
- rm -f $(O1)
-
-a2: $(O2)
- $(AR) grc _obj$D/vector.a intvector.$O stringvector.$O
- rm -f $(O2)
-
-
-newpkg: clean
- mkdir -p _obj$D
- $(AR) grc _obj$D/vector.a
-
-$(O1): newpkg
-$(O2): a1
-$(O3): a2
-
-nuke: clean
- rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/vector.a
-packages: _obj$D/vector.a
+TARG=container/vector
+GOFILES=\
+ intvector.go\
+ stringvector.go\
+ vector.go\
-install: packages
- test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
- cp _obj$D/vector.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/vector.a
+include $(GOROOT)/src/Make.pkg
diff --git a/src/pkg/container/vector/intvector.go b/src/pkg/container/vector/intvector.go
index ca2c4d103..f599ce185 100644
--- a/src/pkg/container/vector/intvector.go
+++ b/src/pkg/container/vector/intvector.go
@@ -4,7 +4,6 @@
package vector
-import "container/vector"
// IntVector is a specialization of Vector that hides the wrapping of Elements around ints.
type IntVector struct {
diff --git a/src/pkg/container/vector/stringvector.go b/src/pkg/container/vector/stringvector.go
index 4cf047f2c..4f6d74e29 100644
--- a/src/pkg/container/vector/stringvector.go
+++ b/src/pkg/container/vector/stringvector.go
@@ -4,8 +4,6 @@
package vector
-import "container/vector"
-
// StringVector is a specialization of Vector that hides the wrapping of Elements around strings.
type StringVector struct {
Vector;
diff --git a/src/pkg/container/vector/vector_test.go b/src/pkg/container/vector/vector_test.go
index 8b4f54dae..51acb7474 100644
--- a/src/pkg/container/vector/vector_test.go
+++ b/src/pkg/container/vector/vector_test.go
@@ -4,7 +4,6 @@
package vector
-import "container/vector"
import "testing"
import "sort"
import "fmt"
diff --git a/src/pkg/crypto/aes/Makefile b/src/pkg/crypto/aes/Makefile
index c62275b3c..f7352cb91 100644
--- a/src/pkg/crypto/aes/Makefile
+++ b/src/pkg/crypto/aes/Makefile
@@ -2,75 +2,12 @@
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-# DO NOT EDIT. Automatically generated by gobuild.
-# gobuild -m >Makefile
-
-D=/crypto/
-
include $(GOROOT)/src/Make.$(GOARCH)
-AR=gopack
-
-default: packages
-
-clean:
- rm -rf *.[$(OS)] *.a [$(OS)].out _obj
-
-test: packages
- gotest
-
-coverage: packages
- gotest
- 6cov -g `pwd` | grep -v '_test\.go:'
-
-%.$O: %.go
- $(GC) -I_obj $*.go
-
-%.$O: %.c
- $(CC) $*.c
-
-%.$O: %.s
- $(AS) $*.s
-
-O1=\
- const.$O\
-
-O2=\
- block.$O\
-
-O3=\
- cipher.$O\
-
-
-phases: a1 a2 a3
-_obj$D/aes.a: phases
-
-a1: $(O1)
- $(AR) grc _obj$D/aes.a const.$O
- rm -f $(O1)
-
-a2: $(O2)
- $(AR) grc _obj$D/aes.a block.$O
- rm -f $(O2)
-
-a3: $(O3)
- $(AR) grc _obj$D/aes.a cipher.$O
- rm -f $(O3)
-
-
-newpkg: clean
- mkdir -p _obj$D
- $(AR) grc _obj$D/aes.a
-
-$(O1): newpkg
-$(O2): a1
-$(O3): a2
-$(O4): a3
-
-nuke: clean
- rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/aes.a
-packages: _obj$D/aes.a
+TARG=crypto/aes
+GOFILES=\
+ block.go\
+ cipher.go\
+ const.go\
-install: packages
- test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
- cp _obj$D/aes.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/aes.a
+include $(GOROOT)/src/Make.pkg
diff --git a/src/pkg/crypto/aes/aes_test.go b/src/pkg/crypto/aes/aes_test.go
index 2f6cb4a92..95e43f117 100644
--- a/src/pkg/crypto/aes/aes_test.go
+++ b/src/pkg/crypto/aes/aes_test.go
@@ -5,7 +5,6 @@
package aes
import (
- "crypto/aes";
"fmt";
"testing";
)
diff --git a/src/pkg/crypto/aes/block.go b/src/pkg/crypto/aes/block.go
index 3c67d1c3c..fb4efc191 100644
--- a/src/pkg/crypto/aes/block.go
+++ b/src/pkg/crypto/aes/block.go
@@ -36,8 +36,6 @@
package aes
-import "crypto/aes"
-
// Encrypt one block from src into dst, using the expanded key xk.
func encryptBlock(xk []uint32, src, dst []byte) {
var s0, s1, s2, s3, t0, t1, t2, t3 uint32;
diff --git a/src/pkg/crypto/aes/cipher.go b/src/pkg/crypto/aes/cipher.go
index e430c9e14..e73335feb 100644
--- a/src/pkg/crypto/aes/cipher.go
+++ b/src/pkg/crypto/aes/cipher.go
@@ -5,7 +5,6 @@
package aes
import (
- "crypto/aes";
"os";
"strconv";
)
diff --git a/src/pkg/crypto/block/Makefile b/src/pkg/crypto/block/Makefile
index e8bc8e907..a277d0dd9 100644
--- a/src/pkg/crypto/block/Makefile
+++ b/src/pkg/crypto/block/Makefile
@@ -2,81 +2,18 @@
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-# DO NOT EDIT. Automatically generated by gobuild.
-# gobuild -m >Makefile
-
-D=/crypto/
-
include $(GOROOT)/src/Make.$(GOARCH)
-AR=gopack
-
-default: packages
-
-clean:
- rm -rf *.[$(OS)] *.a [$(OS)].out _obj
-
-test: packages
- gotest
-
-coverage: packages
- gotest
- 6cov -g `pwd` | grep -v '_test\.go:'
-
-%.$O: %.go
- $(GC) -I_obj $*.go
-
-%.$O: %.c
- $(CC) $*.c
-
-%.$O: %.s
- $(AS) $*.s
-
-O1=\
- cipher.$O\
- xor.$O\
-
-O2=\
- cmac.$O\
- ctr.$O\
- ecb.$O\
- ofb.$O\
-
-O3=\
- cbc.$O\
- cfb.$O\
- eax.$O\
-
-
-phases: a1 a2 a3
-_obj$D/block.a: phases
-
-a1: $(O1)
- $(AR) grc _obj$D/block.a cipher.$O xor.$O
- rm -f $(O1)
-
-a2: $(O2)
- $(AR) grc _obj$D/block.a cmac.$O ctr.$O ecb.$O ofb.$O
- rm -f $(O2)
-
-a3: $(O3)
- $(AR) grc _obj$D/block.a cbc.$O cfb.$O eax.$O
- rm -f $(O3)
-
-
-newpkg: clean
- mkdir -p _obj$D
- $(AR) grc _obj$D/block.a
-
-$(O1): newpkg
-$(O2): a1
-$(O3): a2
-$(O4): a3
-
-nuke: clean
- rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/block.a
-
-packages: _obj$D/block.a
-install: packages
- test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
- cp _obj$D/block.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/block.a
+TARG=crypto/block
+GOFILES=\
+ cbc.go\
+ cfb.go\
+ cipher.go\
+ cmac.go\
+ ctr.go\
+ eax.go\
+ ecb.go\
+ ofb.go\
+ xor.go\
+
+include $(GOROOT)/src/Make.pkg
diff --git a/src/pkg/crypto/block/cbc.go b/src/pkg/crypto/block/cbc.go
index 85a746b72..3aea0c182 100644
--- a/src/pkg/crypto/block/cbc.go
+++ b/src/pkg/crypto/block/cbc.go
@@ -12,7 +12,6 @@
package block
import (
- "crypto/block";
"io";
)
diff --git a/src/pkg/crypto/block/cbc_aes_test.go b/src/pkg/crypto/block/cbc_aes_test.go
index 0c10b171d..51e30b5f4 100644
--- a/src/pkg/crypto/block/cbc_aes_test.go
+++ b/src/pkg/crypto/block/cbc_aes_test.go
@@ -10,17 +10,12 @@
package block
-// gobuild: $GC ecb_aes_test.go
-
import (
"bytes";
"crypto/aes";
- "crypto/block";
"io";
"os";
"testing";
-
- "./ecb_aes_test";
)
type cbcTest struct {
diff --git a/src/pkg/crypto/block/cfb.go b/src/pkg/crypto/block/cfb.go
index 5c4c09a1b..0d73827b4 100644
--- a/src/pkg/crypto/block/cfb.go
+++ b/src/pkg/crypto/block/cfb.go
@@ -13,7 +13,6 @@
package block
import (
- "crypto/block";
"io";
)
diff --git a/src/pkg/crypto/block/cfb_aes_test.go b/src/pkg/crypto/block/cfb_aes_test.go
index 95b251196..b0dcef7b2 100644
--- a/src/pkg/crypto/block/cfb_aes_test.go
+++ b/src/pkg/crypto/block/cfb_aes_test.go
@@ -10,17 +10,12 @@
package block
-// gobuild: $GC ecb_aes_test.go
-
import (
"bytes";
"crypto/aes";
- "crypto/block";
"io";
"os";
"testing";
-
- "./ecb_aes_test";
)
type cfbTest struct {
diff --git a/src/pkg/crypto/block/cmac.go b/src/pkg/crypto/block/cmac.go
index 40697cabd..a556cf567 100644
--- a/src/pkg/crypto/block/cmac.go
+++ b/src/pkg/crypto/block/cmac.go
@@ -8,7 +8,6 @@
package block
import (
- "crypto/block";
"io";
"os";
)
diff --git a/src/pkg/crypto/block/cmac_aes_test.go b/src/pkg/crypto/block/cmac_aes_test.go
index 9284ac40a..3b2602c51 100644
--- a/src/pkg/crypto/block/cmac_aes_test.go
+++ b/src/pkg/crypto/block/cmac_aes_test.go
@@ -6,14 +6,9 @@
package block
-// gobuild: $GC ecb_aes_test.go
-
import (
"crypto/aes";
- "crypto/block";
"testing";
-
- "./ecb_aes_test";
)
type cmacAESTest struct {
diff --git a/src/pkg/crypto/block/ctr.go b/src/pkg/crypto/block/ctr.go
index eecb615ad..38700c185 100644
--- a/src/pkg/crypto/block/ctr.go
+++ b/src/pkg/crypto/block/ctr.go
@@ -13,7 +13,6 @@
package block
import (
- "crypto/block";
"io";
)
diff --git a/src/pkg/crypto/block/ctr_aes_test.go b/src/pkg/crypto/block/ctr_aes_test.go
index dceb85a8b..4f90af173 100644
--- a/src/pkg/crypto/block/ctr_aes_test.go
+++ b/src/pkg/crypto/block/ctr_aes_test.go
@@ -13,12 +13,9 @@ package block
import (
"bytes";
"crypto/aes";
- "crypto/block";
"io";
"os";
"testing";
-
- "./ecb_aes_test";
)
type ctrTest struct {
@@ -86,7 +83,7 @@ func TestCTR_AES(t *testing.T) {
for j := 0; j <= 5; j += 5 {
var crypt bytes.Buffer;
in := tt.in[0:len(tt.in) - j];
- w := block.NewCTRWriter(c, tt.iv, &crypt);
+ w := NewCTRWriter(c, tt.iv, &crypt);
var r io.Reader = io.NewByteReader(in);
n, err := io.Copy(r, w);
if n != int64(len(in)) || err != nil {
@@ -99,7 +96,7 @@ func TestCTR_AES(t *testing.T) {
for j := 0; j <= 7; j += 7 {
var plain bytes.Buffer;
out := tt.out[0:len(tt.out) - j];
- r := block.NewCTRReader(c, tt.iv, io.NewByteReader(out));
+ r := NewCTRReader(c, tt.iv, io.NewByteReader(out));
w := &plain;
n, err := io.Copy(r, w);
if n != int64(len(out)) || err != nil {
diff --git a/src/pkg/crypto/block/eax.go b/src/pkg/crypto/block/eax.go
index 301564074..bac721dbf 100644
--- a/src/pkg/crypto/block/eax.go
+++ b/src/pkg/crypto/block/eax.go
@@ -15,7 +15,6 @@
package block
import (
- "crypto/block";
"fmt";
"io";
"os";
diff --git a/src/pkg/crypto/block/eax_aes_test.go b/src/pkg/crypto/block/eax_aes_test.go
index b4280ee11..94a3d7c40 100644
--- a/src/pkg/crypto/block/eax_aes_test.go
+++ b/src/pkg/crypto/block/eax_aes_test.go
@@ -7,7 +7,6 @@ package block
import (
"bytes";
"crypto/aes";
- "crypto/block";
"fmt";
"io";
"testing";
diff --git a/src/pkg/crypto/block/ecb.go b/src/pkg/crypto/block/ecb.go
index 134ac6da0..d250b18ec 100644
--- a/src/pkg/crypto/block/ecb.go
+++ b/src/pkg/crypto/block/ecb.go
@@ -14,7 +14,6 @@
package block
import (
- "crypto/block";
"io";
"os";
"strconv";
diff --git a/src/pkg/crypto/block/ecb_aes_test.go b/src/pkg/crypto/block/ecb_aes_test.go
index 518897df5..7359c6ce7 100644
--- a/src/pkg/crypto/block/ecb_aes_test.go
+++ b/src/pkg/crypto/block/ecb_aes_test.go
@@ -13,7 +13,6 @@ package block
import (
"bytes";
"crypto/aes";
- "crypto/block";
"io";
"os";
"testing";
diff --git a/src/pkg/crypto/block/ecb_test.go b/src/pkg/crypto/block/ecb_test.go
index 872226512..0938cbe7a 100644
--- a/src/pkg/crypto/block/ecb_test.go
+++ b/src/pkg/crypto/block/ecb_test.go
@@ -6,7 +6,6 @@ package block
import (
"bytes";
- "crypto/block";
"fmt";
"io";
"testing";
diff --git a/src/pkg/crypto/block/ofb.go b/src/pkg/crypto/block/ofb.go
index 084274a08..f6d5f98ad 100644
--- a/src/pkg/crypto/block/ofb.go
+++ b/src/pkg/crypto/block/ofb.go
@@ -13,7 +13,6 @@
package block
import (
- "crypto/block";
"io";
)
diff --git a/src/pkg/crypto/block/ofb_aes_test.go b/src/pkg/crypto/block/ofb_aes_test.go
index 96673fecb..303202d71 100644
--- a/src/pkg/crypto/block/ofb_aes_test.go
+++ b/src/pkg/crypto/block/ofb_aes_test.go
@@ -10,17 +10,12 @@
package block
-// gotest: $GC ecb_aes_test.go
-
import (
"bytes";
"crypto/aes";
- "crypto/block";
"io";
"os";
"testing";
-
- "./ecb_aes_test";
)
type ofbTest struct {
diff --git a/src/pkg/crypto/block/xor.go b/src/pkg/crypto/block/xor.go
index 63229dbb4..675dcb77a 100644
--- a/src/pkg/crypto/block/xor.go
+++ b/src/pkg/crypto/block/xor.go
@@ -7,7 +7,6 @@
package block
import (
- "crypto/block";
"io";
"os";
)
diff --git a/src/pkg/crypto/block/xor_test.go b/src/pkg/crypto/block/xor_test.go
index 1dca92e55..7e26533c4 100644
--- a/src/pkg/crypto/block/xor_test.go
+++ b/src/pkg/crypto/block/xor_test.go
@@ -6,7 +6,6 @@ package block
import (
"bytes";
- "crypto/block";
"fmt";
"io";
"testing";
diff --git a/src/pkg/crypto/hmac/Makefile b/src/pkg/crypto/hmac/Makefile
index 1da3f58dd..9da53a474 100644
--- a/src/pkg/crypto/hmac/Makefile
+++ b/src/pkg/crypto/hmac/Makefile
@@ -2,59 +2,10 @@
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-# DO NOT EDIT. Automatically generated by gobuild.
-# gobuild -m >Makefile
-
-D=/crypto/
-
include $(GOROOT)/src/Make.$(GOARCH)
-AR=gopack
-
-default: packages
-
-clean:
- rm -rf *.[$(OS)] *.a [$(OS)].out _obj
-
-test: packages
- gotest
-
-coverage: packages
- gotest
- 6cov -g `pwd` | grep -v '_test\.go:'
-
-%.$O: %.go
- $(GC) -I_obj $*.go
-
-%.$O: %.c
- $(CC) $*.c
-
-%.$O: %.s
- $(AS) $*.s
-
-O1=\
- hmac.$O\
-
-
-phases: a1
-_obj$D/hmac.a: phases
-
-a1: $(O1)
- $(AR) grc _obj$D/hmac.a hmac.$O
- rm -f $(O1)
-
-
-newpkg: clean
- mkdir -p _obj$D
- $(AR) grc _obj$D/hmac.a
-
-$(O1): newpkg
-$(O2): a1
-
-nuke: clean
- rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/hmac.a
-packages: _obj$D/hmac.a
+TARG=crypto/hmac
+GOFILES=\
+ hmac.go\
-install: packages
- test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
- cp _obj$D/hmac.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/hmac.a
+include $(GOROOT)/src/Make.pkg
diff --git a/src/pkg/crypto/hmac/hmac_test.go b/src/pkg/crypto/hmac/hmac_test.go
index 74fcacfb5..d0de00dce 100644
--- a/src/pkg/crypto/hmac/hmac_test.go
+++ b/src/pkg/crypto/hmac/hmac_test.go
@@ -8,7 +8,6 @@ package hmac
import (
"hash";
- "crypto/hmac";
"fmt";
"strings";
"testing";
diff --git a/src/pkg/crypto/md5/Makefile b/src/pkg/crypto/md5/Makefile
index b6c88d45a..53fcf874a 100644
--- a/src/pkg/crypto/md5/Makefile
+++ b/src/pkg/crypto/md5/Makefile
@@ -2,67 +2,11 @@
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-# DO NOT EDIT. Automatically generated by gobuild.
-# gobuild -m >Makefile
-
-D=/crypto/
-
include $(GOROOT)/src/Make.$(GOARCH)
-AR=gopack
-
-default: packages
-
-clean:
- rm -rf *.[$(OS)] *.a [$(OS)].out _obj
-
-test: packages
- gotest
-
-coverage: packages
- gotest
- 6cov -g `pwd` | grep -v '_test\.go:'
-
-%.$O: %.go
- $(GC) -I_obj $*.go
-
-%.$O: %.c
- $(CC) $*.c
-
-%.$O: %.s
- $(AS) $*.s
-
-O1=\
- md5.$O\
-
-O2=\
- md5block.$O\
-
-
-phases: a1 a2
-_obj$D/md5.a: phases
-
-a1: $(O1)
- $(AR) grc _obj$D/md5.a md5.$O
- rm -f $(O1)
-
-a2: $(O2)
- $(AR) grc _obj$D/md5.a md5block.$O
- rm -f $(O2)
-
-
-newpkg: clean
- mkdir -p _obj$D
- $(AR) grc _obj$D/md5.a
-
-$(O1): newpkg
-$(O2): a1
-$(O3): a2
-
-nuke: clean
- rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/md5.a
-packages: _obj$D/md5.a
+TARG=crypto/md5
+GOFILES=\
+ md5.go\
+ md5block.go\
-install: packages
- test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
- cp _obj$D/md5.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/md5.a
+include $(GOROOT)/src/Make.pkg
diff --git a/src/pkg/crypto/md5/md5.go b/src/pkg/crypto/md5/md5.go
index cbc007f01..a47d91341 100644
--- a/src/pkg/crypto/md5/md5.go
+++ b/src/pkg/crypto/md5/md5.go
@@ -50,8 +50,6 @@ func (d *digest) Size() int {
return Size;
}
-func _Block(dig *digest, p []byte) int
-
func (d *digest) Write(p []byte) (nn int, err os.Error) {
nn = len(p);
d.len += uint64(nn);
diff --git a/src/pkg/crypto/md5/md5_test.go b/src/pkg/crypto/md5/md5_test.go
index f610f1143..c6319c7d8 100644
--- a/src/pkg/crypto/md5/md5_test.go
+++ b/src/pkg/crypto/md5/md5_test.go
@@ -6,7 +6,6 @@ package md5
import (
"fmt";
- "crypto/md5";
"io";
"testing";
)
diff --git a/src/pkg/crypto/md5/md5block.go b/src/pkg/crypto/md5/md5block.go
index 2776c8795..6ca9d58e0 100644
--- a/src/pkg/crypto/md5/md5block.go
+++ b/src/pkg/crypto/md5/md5block.go
@@ -8,8 +8,6 @@
package md5
-import "crypto/md5"
-
// table[i] = int((1<<32) * abs(sin(i+1 radians))).
var table = []uint32 {
// round 1
diff --git a/src/pkg/crypto/sha1/Makefile b/src/pkg/crypto/sha1/Makefile
index 03ffe4fd7..940e2ff15 100644
--- a/src/pkg/crypto/sha1/Makefile
+++ b/src/pkg/crypto/sha1/Makefile
@@ -2,67 +2,11 @@
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-# DO NOT EDIT. Automatically generated by gobuild.
-# gobuild -m >Makefile
-
-D=/crypto/
-
include $(GOROOT)/src/Make.$(GOARCH)
-AR=gopack
-
-default: packages
-
-clean:
- rm -rf *.[$(OS)] *.a [$(OS)].out _obj
-
-test: packages
- gotest
-
-coverage: packages
- gotest
- 6cov -g `pwd` | grep -v '_test\.go:'
-
-%.$O: %.go
- $(GC) -I_obj $*.go
-
-%.$O: %.c
- $(CC) $*.c
-
-%.$O: %.s
- $(AS) $*.s
-
-O1=\
- sha1.$O\
-
-O2=\
- sha1block.$O\
-
-
-phases: a1 a2
-_obj$D/sha1.a: phases
-
-a1: $(O1)
- $(AR) grc _obj$D/sha1.a sha1.$O
- rm -f $(O1)
-
-a2: $(O2)
- $(AR) grc _obj$D/sha1.a sha1block.$O
- rm -f $(O2)
-
-
-newpkg: clean
- mkdir -p _obj$D
- $(AR) grc _obj$D/sha1.a
-
-$(O1): newpkg
-$(O2): a1
-$(O3): a2
-
-nuke: clean
- rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/sha1.a
-packages: _obj$D/sha1.a
+TARG=crypto/sha1
+GOFILES=\
+ sha1.go\
+ sha1block.go\
-install: packages
- test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
- cp _obj$D/sha1.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/sha1.a
+include $(GOROOT)/src/Make.pkg
diff --git a/src/pkg/crypto/sha1/sha1.go b/src/pkg/crypto/sha1/sha1.go
index a4cccd7a3..fd553895c 100644
--- a/src/pkg/crypto/sha1/sha1.go
+++ b/src/pkg/crypto/sha1/sha1.go
@@ -52,8 +52,6 @@ func (d *digest) Size() int {
return Size;
}
-func _Block(dig *digest, p []byte) int
-
func (d *digest) Write(p []byte) (nn int, err os.Error) {
nn = len(p);
d.len += uint64(nn);
diff --git a/src/pkg/crypto/sha1/sha1_test.go b/src/pkg/crypto/sha1/sha1_test.go
index 381cc76ee..d2f3788a4 100644
--- a/src/pkg/crypto/sha1/sha1_test.go
+++ b/src/pkg/crypto/sha1/sha1_test.go
@@ -8,7 +8,6 @@ package sha1
import (
"fmt";
- "crypto/sha1";
"io";
"testing";
)
diff --git a/src/pkg/crypto/sha1/sha1block.go b/src/pkg/crypto/sha1/sha1block.go
index 01ddd9506..023703b8f 100644
--- a/src/pkg/crypto/sha1/sha1block.go
+++ b/src/pkg/crypto/sha1/sha1block.go
@@ -8,8 +8,6 @@
package sha1
-import "crypto/sha1"
-
const (
_K0 = 0x5A827999;
_K1 = 0x6ED9EBA1;
diff --git a/src/pkg/datafmt/Makefile b/src/pkg/datafmt/Makefile
index 1546faf7e..421382d98 100644
--- a/src/pkg/datafmt/Makefile
+++ b/src/pkg/datafmt/Makefile
@@ -2,67 +2,11 @@
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-# DO NOT EDIT. Automatically generated by gobuild.
-# gobuild -m >Makefile
-
-D=
-
include $(GOROOT)/src/Make.$(GOARCH)
-AR=gopack
-
-default: packages
-
-clean:
- rm -rf *.[$(OS)] *.a [$(OS)].out _obj
-
-test: packages
- gotest
-
-coverage: packages
- gotest
- 6cov -g `pwd` | grep -v '_test\.go:'
-
-%.$O: %.go
- $(GC) -I_obj $*.go
-
-%.$O: %.c
- $(CC) $*.c
-
-%.$O: %.s
- $(AS) $*.s
-
-O1=\
- datafmt.$O\
-
-O2=\
- parser.$O\
-
-
-phases: a1 a2
-_obj$D/datafmt.a: phases
-
-a1: $(O1)
- $(AR) grc _obj$D/datafmt.a datafmt.$O
- rm -f $(O1)
-
-a2: $(O2)
- $(AR) grc _obj$D/datafmt.a parser.$O
- rm -f $(O2)
-
-
-newpkg: clean
- mkdir -p _obj$D
- $(AR) grc _obj$D/datafmt.a
-
-$(O1): newpkg
-$(O2): a1
-$(O3): a2
-
-nuke: clean
- rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/datafmt.a
-packages: _obj$D/datafmt.a
+TARG=datafmt
+GOFILES=\
+ datafmt.go\
+ parser.go\
-install: packages
- test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
- cp _obj$D/datafmt.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/datafmt.a
+include $(GOROOT)/src/Make.pkg
diff --git a/src/pkg/datafmt/datafmt_test.go b/src/pkg/datafmt/datafmt_test.go
index 8c3e00287..e1355dd36 100644
--- a/src/pkg/datafmt/datafmt_test.go
+++ b/src/pkg/datafmt/datafmt_test.go
@@ -6,7 +6,6 @@ package datafmt
import (
"fmt";
- "datafmt";
"os";
"strings";
"testing";
diff --git a/src/pkg/datafmt/parser.go b/src/pkg/datafmt/parser.go
index ea34623dc..3e86e0f2d 100644
--- a/src/pkg/datafmt/parser.go
+++ b/src/pkg/datafmt/parser.go
@@ -6,7 +6,6 @@ package datafmt
import (
"container/vector";
- "datafmt";
"fmt";
"go/scanner";
"go/token";
@@ -203,8 +202,6 @@ func (p *parser) parseField() expr {
}
-func (p *parser) parseExpression() expr
-
func (p *parser) parseOperand() (x expr) {
switch p.tok {
case token.STRING:
diff --git a/src/pkg/ebnf/Makefile b/src/pkg/ebnf/Makefile
index 06c0fc832..8b3b0774c 100644
--- a/src/pkg/ebnf/Makefile
+++ b/src/pkg/ebnf/Makefile
@@ -2,68 +2,11 @@
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-
-# DO NOT EDIT. Automatically generated by gobuild.
-# gobuild -m ebnf.go parser.go >Makefile
-
-D=
-
include $(GOROOT)/src/Make.$(GOARCH)
-AR=gopack
-
-default: packages
-
-clean:
- rm -rf *.[$(OS)] *.a [$(OS)].out _obj
-
-test: packages
- gotest
-
-coverage: packages
- gotest
- 6cov -g $$(pwd) | grep -v '_test\.go:'
-
-%.$O: %.go
- $(GC) -I_obj $*.go
-
-%.$O: %.c
- $(CC) $*.c
-
-%.$O: %.s
- $(AS) $*.s
-
-O1=\
- ebnf.$O\
-
-O2=\
- parser.$O\
-
-
-phases: a1 a2
-_obj$D/ebnf.a: phases
-
-a1: $(O1)
- $(AR) grc _obj$D/ebnf.a ebnf.$O
- rm -f $(O1)
-
-a2: $(O2)
- $(AR) grc _obj$D/ebnf.a parser.$O
- rm -f $(O2)
-
-
-newpkg: clean
- mkdir -p _obj$D
- $(AR) grc _obj$D/ebnf.a
-
-$(O1): newpkg
-$(O2): a1
-$(O3): a2
-
-nuke: clean
- rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/ebnf.a
-packages: _obj$D/ebnf.a
+TARG=ebnf
+GOFILES=\
+ ebnf.go\
+ parser.go\
-install: packages
- test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
- cp _obj$D/ebnf.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/ebnf.a
+include $(GOROOT)/src/Make.pkg
diff --git a/src/pkg/ebnf/ebnf_test.go b/src/pkg/ebnf/ebnf_test.go
index 9bcb5d91f..3dd3c7a6c 100644
--- a/src/pkg/ebnf/ebnf_test.go
+++ b/src/pkg/ebnf/ebnf_test.go
@@ -5,7 +5,6 @@
package ebnf
import (
- "ebnf";
"io";
"strings";
"testing";
diff --git a/src/pkg/ebnf/parser.go b/src/pkg/ebnf/parser.go
index e621c4d89..d32b1b926 100644
--- a/src/pkg/ebnf/parser.go
+++ b/src/pkg/ebnf/parser.go
@@ -6,7 +6,6 @@ package ebnf
import (
"container/vector";
- "ebnf";
"fmt";
"go/scanner";
"go/token";
@@ -86,8 +85,6 @@ func (p *parser) parseToken() *Token {
}
-func (p *parser) parseExpression() Expression
-
func (p *parser) parseTerm() (x Expression) {
pos := p.pos;
diff --git a/src/pkg/exec/Makefile b/src/pkg/exec/Makefile
index 679cc39c0..9927eb3e7 100644
--- a/src/pkg/exec/Makefile
+++ b/src/pkg/exec/Makefile
@@ -2,59 +2,10 @@
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-# DO NOT EDIT. Automatically generated by gobuild.
-# gobuild -m >Makefile
-
-D=
-
include $(GOROOT)/src/Make.$(GOARCH)
-AR=gopack
-
-default: packages
-
-clean:
- rm -rf *.[$(OS)] *.a [$(OS)].out _obj
-
-test: packages
- gotest
-
-coverage: packages
- gotest
- 6cov -g `pwd` | grep -v '_test\.go:'
-
-%.$O: %.go
- $(GC) -I_obj $*.go
-
-%.$O: %.c
- $(CC) $*.c
-
-%.$O: %.s
- $(AS) $*.s
-
-O1=\
- exec.$O\
-
-
-phases: a1
-_obj$D/exec.a: phases
-
-a1: $(O1)
- $(AR) grc _obj$D/exec.a exec.$O
- rm -f $(O1)
-
-
-newpkg: clean
- mkdir -p _obj$D
- $(AR) grc _obj$D/exec.a
-
-$(O1): newpkg
-$(O2): a1
-
-nuke: clean
- rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/exec.a
-packages: _obj$D/exec.a
+TARG=exec
+GOFILES=\
+ exec.go\
-install: packages
- test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
- cp _obj$D/exec.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/exec.a
+include $(GOROOT)/src/Make.pkg
diff --git a/src/pkg/exec/exec_test.go b/src/pkg/exec/exec_test.go
index 9a9fca2e7..d5585029e 100644
--- a/src/pkg/exec/exec_test.go
+++ b/src/pkg/exec/exec_test.go
@@ -5,14 +5,13 @@
package exec
import (
- "exec";
"io";
"testing";
)
func TestRunCat(t *testing.T) {
- cmd, err := exec.Run("/bin/cat", []string{"cat"}, nil,
- exec.Pipe, exec.Pipe, exec.DevNull);
+ cmd, err := Run("/bin/cat", []string{"cat"}, nil,
+ Pipe, Pipe, DevNull);
if err != nil {
t.Fatalf("opencmd /bin/cat: %v", err);
}
@@ -32,7 +31,7 @@ func TestRunCat(t *testing.T) {
func TestRunEcho(t *testing.T) {
cmd, err := Run("/bin/echo", []string{"echo", "hello", "world"}, nil,
- exec.DevNull, exec.Pipe, exec.DevNull);
+ DevNull, Pipe, DevNull);
if err != nil {
t.Fatalf("opencmd /bin/echo: %v", err);
}
diff --git a/src/pkg/exvar/Makefile b/src/pkg/exvar/Makefile
index a65a1ee6b..795e8a644 100644
--- a/src/pkg/exvar/Makefile
+++ b/src/pkg/exvar/Makefile
@@ -2,59 +2,10 @@
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-# DO NOT EDIT. Automatically generated by gobuild.
-# gobuild -m >Makefile
-
-D=
-
include $(GOROOT)/src/Make.$(GOARCH)
-AR=gopack
-
-default: packages
-
-clean:
- rm -rf *.[$(OS)] *.a [$(OS)].out _obj
-
-test: packages
- gotest
-
-coverage: packages
- gotest
- 6cov -g `pwd` | grep -v '_test\.go:'
-
-%.$O: %.go
- $(GC) -I_obj $*.go
-
-%.$O: %.c
- $(CC) $*.c
-
-%.$O: %.s
- $(AS) $*.s
-
-O1=\
- exvar.$O\
-
-
-phases: a1
-_obj$D/exvar.a: phases
-
-a1: $(O1)
- $(AR) grc _obj$D/exvar.a exvar.$O
- rm -f $(O1)
-
-
-newpkg: clean
- mkdir -p _obj$D
- $(AR) grc _obj$D/exvar.a
-
-$(O1): newpkg
-$(O2): a1
-
-nuke: clean
- rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/exvar.a
-packages: _obj$D/exvar.a
+TARG=exvar
+GOFILES=\
+ exvar.go\
-install: packages
- test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
- cp _obj$D/exvar.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/exvar.a
+include $(GOROOT)/src/Make.pkg
diff --git a/src/pkg/exvar/exvar_test.go b/src/pkg/exvar/exvar_test.go
index 8b028bccb..34b87acfd 100644
--- a/src/pkg/exvar/exvar_test.go
+++ b/src/pkg/exvar/exvar_test.go
@@ -5,7 +5,6 @@
package exvar
import (
- "exvar";
"fmt";
"json";
"testing";
diff --git a/src/pkg/go/ast/Makefile b/src/pkg/go/ast/Makefile
index cf37bba4c..0c3d9f1d6 100644
--- a/src/pkg/go/ast/Makefile
+++ b/src/pkg/go/ast/Makefile
@@ -2,68 +2,11 @@
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-
-# DO NOT EDIT. Automatically generated by gobuild.
-# gobuild -m ast.go filter.go >Makefile
-
-D=/go/
-
include $(GOROOT)/src/Make.$(GOARCH)
-AR=gopack
-
-default: packages
-
-clean:
- rm -rf *.[$(OS)] *.a [$(OS)].out _obj
-
-test: packages
- gotest
-
-coverage: packages
- gotest
- 6cov -g $$(pwd) | grep -v '_test\.go:'
-
-%.$O: %.go
- $(GC) -I_obj $*.go
-
-%.$O: %.c
- $(CC) $*.c
-
-%.$O: %.s
- $(AS) $*.s
-
-O1=\
- ast.$O\
-
-O2=\
- filter.$O\
-
-
-phases: a1 a2
-_obj$D/ast.a: phases
-
-a1: $(O1)
- $(AR) grc _obj$D/ast.a ast.$O
- rm -f $(O1)
-
-a2: $(O2)
- $(AR) grc _obj$D/ast.a filter.$O
- rm -f $(O2)
-
-
-newpkg: clean
- mkdir -p _obj$D
- $(AR) grc _obj$D/ast.a
-
-$(O1): newpkg
-$(O2): a1
-$(O3): a2
-
-nuke: clean
- rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/ast.a
-packages: _obj$D/ast.a
+TARG=go/ast
+GOFILES=\
+ ast.go\
+ filter.go\
-install: packages
- test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
- cp _obj$D/ast.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/ast.a
+include $(GOROOT)/src/Make.pkg
diff --git a/src/pkg/go/ast/filter.go b/src/pkg/go/ast/filter.go
index 0b9d508bb..16bcdb9d7 100644
--- a/src/pkg/go/ast/filter.go
+++ b/src/pkg/go/ast/filter.go
@@ -5,7 +5,6 @@
package ast
import (
- "go/ast";
"go/token";
)
@@ -39,8 +38,6 @@ func isExportedType(typ Expr) bool {
}
-func filterType(typ Expr)
-
func filterFieldList(list []*Field) []*Field {
j := 0;
for _, f := range list {
diff --git a/src/pkg/go/doc/Makefile b/src/pkg/go/doc/Makefile
index d7c6acaac..60ce26483 100644
--- a/src/pkg/go/doc/Makefile
+++ b/src/pkg/go/doc/Makefile
@@ -2,67 +2,11 @@
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-# DO NOT EDIT. Automatically generated by gobuild.
-# gobuild -m >Makefile
-
-D=/go/
-
include $(GOROOT)/src/Make.$(GOARCH)
-AR=gopack
-
-default: packages
-
-clean:
- rm -rf *.[$(OS)] *.a [$(OS)].out _obj
-
-test: packages
- gotest
-
-coverage: packages
- gotest
- 6cov -g `pwd` | grep -v '_test\.go:'
-
-%.$O: %.go
- $(GC) -I_obj $*.go
-
-%.$O: %.c
- $(CC) $*.c
-
-%.$O: %.s
- $(AS) $*.s
-
-O1=\
- comment.$O\
-
-O2=\
- doc.$O\
-
-
-phases: a1 a2
-_obj$D/doc.a: phases
-
-a1: $(O1)
- $(AR) grc _obj$D/doc.a comment.$O
- rm -f $(O1)
-
-a2: $(O2)
- $(AR) grc _obj$D/doc.a doc.$O
- rm -f $(O2)
-
-
-newpkg: clean
- mkdir -p _obj$D
- $(AR) grc _obj$D/doc.a
-
-$(O1): newpkg
-$(O2): a1
-$(O3): a2
-
-nuke: clean
- rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/doc.a
-packages: _obj$D/doc.a
+TARG=go/doc
+GOFILES=\
+ comment.go\
+ doc.go\
-install: packages
- test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
- cp _obj$D/doc.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/doc.a
+include $(GOROOT)/src/Make.pkg
diff --git a/src/pkg/go/doc/doc.go b/src/pkg/go/doc/doc.go
index 2edc84638..b88709980 100644
--- a/src/pkg/go/doc/doc.go
+++ b/src/pkg/go/doc/doc.go
@@ -8,7 +8,6 @@ import (
"container/vector";
"fmt";
"go/ast";
- "go/doc";
"go/token";
"io";
"regexp";
@@ -237,9 +236,6 @@ func (doc *docReader) addFile(src *ast.File) {
}
-type PackageDoc struct
-func (doc *docReader) newDoc(pkgname, importpath, filepath string, filenames []string) *PackageDoc
-
func NewFileDoc(file *ast.File) *PackageDoc {
var r docReader;
r.init();
diff --git a/src/pkg/go/parser/Makefile b/src/pkg/go/parser/Makefile
index 5e5c51a5a..a8f14ff63 100644
--- a/src/pkg/go/parser/Makefile
+++ b/src/pkg/go/parser/Makefile
@@ -2,68 +2,11 @@
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-
-# DO NOT EDIT. Automatically generated by gobuild.
-# gobuild -m parser.go interface.go >Makefile
-
-D=/go/
-
include $(GOROOT)/src/Make.$(GOARCH)
-AR=gopack
-
-default: packages
-
-clean:
- rm -rf *.[$(OS)] *.a [$(OS)].out _obj
-
-test: packages
- gotest
-
-coverage: packages
- gotest
- 6cov -g $$(pwd) | grep -v '_test\.go:'
-
-%.$O: %.go
- $(GC) -I_obj $*.go
-
-%.$O: %.c
- $(CC) $*.c
-
-%.$O: %.s
- $(AS) $*.s
-
-O1=\
- parser.$O\
-
-O2=\
- interface.$O\
-
-
-phases: a1 a2
-_obj$D/parser.a: phases
-
-a1: $(O1)
- $(AR) grc _obj$D/parser.a parser.$O
- rm -f $(O1)
-
-a2: $(O2)
- $(AR) grc _obj$D/parser.a interface.$O
- rm -f $(O2)
-
-
-newpkg: clean
- mkdir -p _obj$D
- $(AR) grc _obj$D/parser.a
-
-$(O1): newpkg
-$(O2): a1
-$(O3): a2
-
-nuke: clean
- rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/parser.a
-packages: _obj$D/parser.a
+TARG=go/parser
+GOFILES=\
+ interface.go\
+ parser.go\
-install: packages
- test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
- cp _obj$D/parser.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/parser.a
+include $(GOROOT)/src/Make.pkg
diff --git a/src/pkg/go/parser/interface.go b/src/pkg/go/parser/interface.go
index 5fa60c1cd..94835b8ec 100644
--- a/src/pkg/go/parser/interface.go
+++ b/src/pkg/go/parser/interface.go
@@ -10,7 +10,6 @@ import (
"bytes";
"fmt";
"go/ast";
- "go/parser";
"go/scanner";
"io";
"os";
diff --git a/src/pkg/go/parser/parser.go b/src/pkg/go/parser/parser.go
index f0fa487cc..537832209 100644
--- a/src/pkg/go/parser/parser.go
+++ b/src/pkg/go/parser/parser.go
@@ -74,8 +74,6 @@ func scannerMode(mode uint) uint {
}
-func (p *parser) next()
-
func (p *parser) init(filename string, src []byte, mode uint) {
p.ErrorVector.Init();
p.scanner.Init(filename, src, p, scannerMode(mode));
@@ -267,13 +265,6 @@ func (p *parser) expect(tok token.Token) token.Position {
// ----------------------------------------------------------------------------
// Common productions
-func (p *parser) tryType() ast.Expr
-func (p *parser) parseStringList(x *ast.StringLit) []*ast.StringLit
-func (p *parser) parseExpr() ast.Expr
-func (p *parser) parseStmt() ast.Stmt
-func (p *parser) parseDecl(getSemi bool) (decl ast.Decl, gotSemi bool)
-
-
func (p *parser) parseIdent() *ast.Ident {
if p.tok == token.IDENT {
x := &ast.Ident{p.pos, string(p.lit)};
diff --git a/src/pkg/go/parser/parser_test.go b/src/pkg/go/parser/parser_test.go
index 29719b6de..7a0b24d07 100644
--- a/src/pkg/go/parser/parser_test.go
+++ b/src/pkg/go/parser/parser_test.go
@@ -6,7 +6,6 @@ package parser
import (
"go/ast";
- "go/parser";
"os";
"testing";
)
diff --git a/src/pkg/go/printer/Makefile b/src/pkg/go/printer/Makefile
index 88fb48bd9..c18cb8de5 100644
--- a/src/pkg/go/printer/Makefile
+++ b/src/pkg/go/printer/Makefile
@@ -2,60 +2,10 @@
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-
-# DO NOT EDIT. Automatically generated by gobuild.
-# gobuild -m >Makefile
-
-D=/go/
-
include $(GOROOT)/src/Make.$(GOARCH)
-AR=gopack
-
-default: packages
-
-clean:
- rm -rf *.[$(OS)] *.a [$(OS)].out _obj
-
-test: packages
- gotest
-
-coverage: packages
- gotest
- 6cov -g $$(pwd) | grep -v '_test\.go:'
-
-%.$O: %.go
- $(GC) -I_obj $*.go
-
-%.$O: %.c
- $(CC) $*.c
-
-%.$O: %.s
- $(AS) $*.s
-
-O1=\
- printer.$O\
-
-
-phases: a1
-_obj$D/printer.a: phases
-
-a1: $(O1)
- $(AR) grc _obj$D/printer.a printer.$O
- rm -f $(O1)
-
-
-newpkg: clean
- mkdir -p _obj$D
- $(AR) grc _obj$D/printer.a
-
-$(O1): newpkg
-$(O2): a1
-
-nuke: clean
- rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/printer.a
-packages: _obj$D/printer.a
+TARG=go/printer
+GOFILES=\
+ printer.go\
-install: packages
- test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
- cp _obj$D/printer.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/printer.a
+include $(GOROOT)/src/Make.pkg
diff --git a/src/pkg/go/printer/printer.go b/src/pkg/go/printer/printer.go
index d863c01c3..bb2f63a56 100644
--- a/src/pkg/go/printer/printer.go
+++ b/src/pkg/go/printer/printer.go
@@ -457,8 +457,6 @@ func (p *printer) lineComment(d *ast.CommentGroup) {
}
-func (p *printer) expr(x ast.Expr) bool
-
func (p *printer) identList(list []*ast.Ident) {
for i, x := range list {
if i > 0 {
@@ -595,8 +593,6 @@ func (p *printer) fieldList(lbrace token.Position, list []*ast.Field, rbrace tok
// ----------------------------------------------------------------------------
// Expressions
-func (p *printer) stmt(s ast.Stmt) (optSemi bool)
-
// Returns true if a separating semicolon is optional.
func (p *printer) expr1(expr ast.Expr, prec1 int) (optSemi bool) {
p.print(expr.Pos());
@@ -781,8 +777,6 @@ func (p *printer) expr(x ast.Expr) bool {
// ----------------------------------------------------------------------------
// Statements
-func (p *printer) decl(decl ast.Decl) (comment *ast.CommentGroup, optSemi bool)
-
// Print the statement list indented, but without a newline after the last statement.
func (p *printer) stmtList(list []ast.Stmt) {
if len(list) > 0 {
diff --git a/src/pkg/go/printer/printer_test.go b/src/pkg/go/printer/printer_test.go
index d4046e279..a7207ba24 100644
--- a/src/pkg/go/printer/printer_test.go
+++ b/src/pkg/go/printer/printer_test.go
@@ -10,7 +10,6 @@ import (
"io";
"go/ast";
"go/parser";
- "go/printer";
"os";
"path";
"testing";
diff --git a/src/pkg/go/scanner/Makefile b/src/pkg/go/scanner/Makefile
index 7845fe5a7..5e3f38d00 100644
--- a/src/pkg/go/scanner/Makefile
+++ b/src/pkg/go/scanner/Makefile
@@ -2,68 +2,11 @@
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-
-# DO NOT EDIT. Automatically generated by gobuild.
-# gobuild -m scanner.go errors.go >Makefile
-
-D=/go/
-
include $(GOROOT)/src/Make.$(GOARCH)
-AR=gopack
-
-default: packages
-
-clean:
- rm -rf *.[$(OS)] *.a [$(OS)].out _obj
-
-test: packages
- gotest
-
-coverage: packages
- gotest
- 6cov -g $$(pwd) | grep -v '_test\.go:'
-
-%.$O: %.go
- $(GC) -I_obj $*.go
-
-%.$O: %.c
- $(CC) $*.c
-
-%.$O: %.s
- $(AS) $*.s
-
-O1=\
- errors.$O\
-
-O2=\
- scanner.$O\
-
-
-phases: a1 a2
-_obj$D/scanner.a: phases
-
-a1: $(O1)
- $(AR) grc _obj$D/scanner.a errors.$O
- rm -f $(O1)
-
-a2: $(O2)
- $(AR) grc _obj$D/scanner.a scanner.$O
- rm -f $(O2)
-
-
-newpkg: clean
- mkdir -p _obj$D
- $(AR) grc _obj$D/scanner.a
-
-$(O1): newpkg
-$(O2): a1
-$(O3): a2
-
-nuke: clean
- rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/scanner.a
-packages: _obj$D/scanner.a
+TARG=go/scanner
+GOFILES=\
+ errors.go\
+ scanner.go\
-install: packages
- test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
- cp _obj$D/scanner.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/scanner.a
+include $(GOROOT)/src/Make.pkg
diff --git a/src/pkg/go/scanner/scanner.go b/src/pkg/go/scanner/scanner.go
index 2d5e2a83f..9a040aa6c 100644
--- a/src/pkg/go/scanner/scanner.go
+++ b/src/pkg/go/scanner/scanner.go
@@ -11,7 +11,6 @@ package scanner
import (
"bytes";
"go/token";
- "go/scanner";
"strconv";
"unicode";
"utf8";
diff --git a/src/pkg/go/scanner/scanner_test.go b/src/pkg/go/scanner/scanner_test.go
index 0cb200b48..2b3c94629 100644
--- a/src/pkg/go/scanner/scanner_test.go
+++ b/src/pkg/go/scanner/scanner_test.go
@@ -5,7 +5,6 @@
package scanner
import (
- "go/scanner";
"go/token";
"os";
"strings";
@@ -207,7 +206,7 @@ func TestScan(t *testing.T) {
// verify scan
index := 0;
epos := token.Position{"", 0, 1, 1};
- nerrors := scanner.Tokenize("", strings.Bytes(src), &TestErrorHandler{t}, scanner.ScanComments,
+ nerrors := Tokenize("", strings.Bytes(src), &TestErrorHandler{t}, ScanComments,
func (pos token.Position, tok token.Token, litb []byte) bool {
e := elt{token.EOF, "", special};
if index < len(tokens) {
@@ -280,7 +279,7 @@ func TestLineComments(t *testing.T) {
}
// verify scan
- var S scanner.Scanner;
+ var S Scanner;
S.Init("TestLineComments", strings.Bytes(src), nil, 0);
for _, s := range segments {
pos, tok, lit := S.Scan();
@@ -295,7 +294,7 @@ func TestLineComments(t *testing.T) {
// Verify that initializing the same scanner more then once works correctly.
func TestInit(t *testing.T) {
- var s scanner.Scanner;
+ var s Scanner;
// 1st init
s.Init("", strings.Bytes("if true { }"), nil, 0);
@@ -320,10 +319,10 @@ func TestInit(t *testing.T) {
func TestIllegalChars(t *testing.T) {
- var s scanner.Scanner;
+ var s Scanner;
const src = "*?*$*@*";
- s.Init("", strings.Bytes(src), &TestErrorHandler{t}, scanner.AllowIllegalChars);
+ s.Init("", strings.Bytes(src), &TestErrorHandler{t}, AllowIllegalChars);
for offs, ch := range src {
pos, tok, lit := s.Scan();
if pos.Offset != offs {
@@ -352,9 +351,9 @@ func TestStdErrorHander(t *testing.T) {
"@ @ @" // original file, line 1 again
;
- var s scanner.Scanner;
+ var s Scanner;
v := NewErrorVector();
- nerrors := scanner.Tokenize("File1", strings.Bytes(src), v, 0,
+ nerrors := Tokenize("File1", strings.Bytes(src), v, 0,
func (pos token.Position, tok token.Token, litb []byte) bool {
return tok != token.EOF;
}
diff --git a/src/pkg/go/token/Makefile b/src/pkg/go/token/Makefile
index 12ef2a4aa..259fb29f6 100644
--- a/src/pkg/go/token/Makefile
+++ b/src/pkg/go/token/Makefile
@@ -2,59 +2,10 @@
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-# DO NOT EDIT. Automatically generated by gobuild.
-# gobuild -m >Makefile
-
-D=/go/
-
include $(GOROOT)/src/Make.$(GOARCH)
-AR=gopack
-
-default: packages
-
-clean:
- rm -rf *.[$(OS)] *.a [$(OS)].out _obj
-
-test: packages
- gotest
-
-coverage: packages
- gotest
- 6cov -g `pwd` | grep -v '_test\.go:'
-
-%.$O: %.go
- $(GC) -I_obj $*.go
-
-%.$O: %.c
- $(CC) $*.c
-
-%.$O: %.s
- $(AS) $*.s
-
-O1=\
- token.$O\
-
-
-phases: a1
-_obj$D/token.a: phases
-
-a1: $(O1)
- $(AR) grc _obj$D/token.a token.$O
- rm -f $(O1)
-
-
-newpkg: clean
- mkdir -p _obj$D
- $(AR) grc _obj$D/token.a
-
-$(O1): newpkg
-$(O2): a1
-
-nuke: clean
- rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/token.a
-packages: _obj$D/token.a
+TARG=go/token
+GOFILES=\
+ token.go\
-install: packages
- test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
- cp _obj$D/token.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/token.a
+include $(GOROOT)/src/Make.pkg
diff --git a/src/pkg/hash/Makefile b/src/pkg/hash/Makefile
index bdbb6f347..5bf470fd1 100644
--- a/src/pkg/hash/Makefile
+++ b/src/pkg/hash/Makefile
@@ -2,59 +2,10 @@
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-# DO NOT EDIT. Automatically generated by gobuild.
-# gobuild -m >Makefile
-
-D=
-
include $(GOROOT)/src/Make.$(GOARCH)
-AR=gopack
-
-default: packages
-
-clean:
- rm -rf *.[$(OS)] *.a [$(OS)].out _obj
-
-test: packages
- gotest
-
-coverage: packages
- gotest
- 6cov -g `pwd` | grep -v '_test\.go:'
-
-%.$O: %.go
- $(GC) -I_obj $*.go
-
-%.$O: %.c
- $(CC) $*.c
-
-%.$O: %.s
- $(AS) $*.s
-
-O1=\
- hash.$O\
-
-
-phases: a1
-_obj$D/hash.a: phases
-
-a1: $(O1)
- $(AR) grc _obj$D/hash.a hash.$O
- rm -f $(O1)
-
-
-newpkg: clean
- mkdir -p _obj$D
- $(AR) grc _obj$D/hash.a
-
-$(O1): newpkg
-$(O2): a1
-
-nuke: clean
- rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/hash.a
-packages: _obj$D/hash.a
+TARG=hash
+GOFILES=\
+ hash.go\
-install: packages
- test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
- cp _obj$D/hash.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/hash.a
+include $(GOROOT)/src/Make.pkg
diff --git a/src/pkg/hash/adler32/Makefile b/src/pkg/hash/adler32/Makefile
index 134131259..8e5a3389b 100644
--- a/src/pkg/hash/adler32/Makefile
+++ b/src/pkg/hash/adler32/Makefile
@@ -2,59 +2,10 @@
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-# DO NOT EDIT. Automatically generated by gobuild.
-# gobuild -m >Makefile
-
-D=/hash/
-
include $(GOROOT)/src/Make.$(GOARCH)
-AR=gopack
-
-default: packages
-
-clean:
- rm -rf *.[$(OS)] *.a [$(OS)].out _obj
-
-test: packages
- gotest
-
-coverage: packages
- gotest
- 6cov -g `pwd` | grep -v '_test\.go:'
-
-%.$O: %.go
- $(GC) -I_obj $*.go
-
-%.$O: %.c
- $(CC) $*.c
-
-%.$O: %.s
- $(AS) $*.s
-
-O1=\
- adler32.$O\
-
-
-phases: a1
-_obj$D/adler32.a: phases
-
-a1: $(O1)
- $(AR) grc _obj$D/adler32.a adler32.$O
- rm -f $(O1)
-
-
-newpkg: clean
- mkdir -p _obj$D
- $(AR) grc _obj$D/adler32.a
-
-$(O1): newpkg
-$(O2): a1
-
-nuke: clean
- rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/adler32.a
-packages: _obj$D/adler32.a
+TARG=hash/adler32
+GOFILES=\
+ adler32.go\
-install: packages
- test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
- cp _obj$D/adler32.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/adler32.a
+include $(GOROOT)/src/Make.pkg
diff --git a/src/pkg/hash/adler32/adler32_test.go b/src/pkg/hash/adler32/adler32_test.go
index ce49a110b..87ca2e008 100644
--- a/src/pkg/hash/adler32/adler32_test.go
+++ b/src/pkg/hash/adler32/adler32_test.go
@@ -5,7 +5,6 @@
package adler32
import (
- "hash/adler32";
"io";
"testing";
)
diff --git a/src/pkg/hash/crc32/Makefile b/src/pkg/hash/crc32/Makefile
index 08d4f5e4e..dbfcda10c 100644
--- a/src/pkg/hash/crc32/Makefile
+++ b/src/pkg/hash/crc32/Makefile
@@ -2,59 +2,10 @@
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-# DO NOT EDIT. Automatically generated by gobuild.
-# gobuild -m >Makefile
-
-D=/hash/
-
include $(GOROOT)/src/Make.$(GOARCH)
-AR=gopack
-
-default: packages
-
-clean:
- rm -rf *.[$(OS)] *.a [$(OS)].out _obj
-
-test: packages
- gotest
-
-coverage: packages
- gotest
- 6cov -g `pwd` | grep -v '_test\.go:'
-
-%.$O: %.go
- $(GC) -I_obj $*.go
-
-%.$O: %.c
- $(CC) $*.c
-
-%.$O: %.s
- $(AS) $*.s
-
-O1=\
- crc32.$O\
-
-
-phases: a1
-_obj$D/crc32.a: phases
-
-a1: $(O1)
- $(AR) grc _obj$D/crc32.a crc32.$O
- rm -f $(O1)
-
-
-newpkg: clean
- mkdir -p _obj$D
- $(AR) grc _obj$D/crc32.a
-
-$(O1): newpkg
-$(O2): a1
-
-nuke: clean
- rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/crc32.a
-packages: _obj$D/crc32.a
+TARG=hash/crc32
+GOFILES=\
+ crc32.go\
-install: packages
- test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
- cp _obj$D/crc32.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/crc32.a
+include $(GOROOT)/src/Make.pkg
diff --git a/src/pkg/hash/crc32/crc32_test.go b/src/pkg/hash/crc32/crc32_test.go
index c037da600..687389894 100644
--- a/src/pkg/hash/crc32/crc32_test.go
+++ b/src/pkg/hash/crc32/crc32_test.go
@@ -5,7 +5,6 @@
package crc32
import (
- "hash/crc32";
"io";
"testing";
)
diff --git a/src/pkg/http/Makefile b/src/pkg/http/Makefile
index 34445b577..974067882 100644
--- a/src/pkg/http/Makefile
+++ b/src/pkg/http/Makefile
@@ -2,85 +2,15 @@
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-# DO NOT EDIT. Automatically generated by gobuild.
-# gobuild -m >Makefile
-
-D=
-
include $(GOROOT)/src/Make.$(GOARCH)
-AR=gopack
-
-default: packages
-
-clean:
- rm -rf *.[$(OS)] *.a [$(OS)].out _obj
-
-test: packages
- gotest
-
-coverage: packages
- gotest
- 6cov -g `pwd` | grep -v '_test\.go:'
-
-%.$O: %.go
- $(GC) -I_obj $*.go
-
-%.$O: %.c
- $(CC) $*.c
-
-%.$O: %.s
- $(AS) $*.s
-
-O1=\
- status.$O\
- url.$O\
-
-O2=\
- request.$O\
-
-O3=\
- client.$O\
- server.$O\
-
-O4=\
- fs.$O\
-
-
-phases: a1 a2 a3 a4
-_obj$D/http.a: phases
-
-a1: $(O1)
- $(AR) grc _obj$D/http.a status.$O url.$O
- rm -f $(O1)
-
-a2: $(O2)
- $(AR) grc _obj$D/http.a request.$O
- rm -f $(O2)
-
-a3: $(O3)
- $(AR) grc _obj$D/http.a client.$O server.$O
- rm -f $(O3)
-
-a4: $(O4)
- $(AR) grc _obj$D/http.a fs.$O
- rm -f $(O4)
-
-
-newpkg: clean
- mkdir -p _obj$D
- $(AR) grc _obj$D/http.a
-
-$(O1): newpkg
-$(O2): a1
-$(O3): a2
-$(O4): a3
-$(O5): a4
-
-nuke: clean
- rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/http.a
-packages: _obj$D/http.a
+TARG=http
+GOFILES=\
+ client.go\
+ fs.go\
+ request.go\
+ server.go\
+ status.go\
+ url.go\
-install: packages
- test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
- cp _obj$D/http.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/http.a
+include $(GOROOT)/src/Make.pkg
diff --git a/src/pkg/http/client.go b/src/pkg/http/client.go
index 197f6c858..839241d33 100644
--- a/src/pkg/http/client.go
+++ b/src/pkg/http/client.go
@@ -9,7 +9,6 @@ package http
import (
"bufio";
"fmt";
- "http";
"io";
"log";
"net";
diff --git a/src/pkg/http/client_test.go b/src/pkg/http/client_test.go
index f697fb856..69938f030 100644
--- a/src/pkg/http/client_test.go
+++ b/src/pkg/http/client_test.go
@@ -8,7 +8,6 @@ package http
import (
"fmt";
- "http";
"io";
"strings";
"testing";
diff --git a/src/pkg/http/fs.go b/src/pkg/http/fs.go
index 6af85ca03..e8dda1d30 100644
--- a/src/pkg/http/fs.go
+++ b/src/pkg/http/fs.go
@@ -8,7 +8,6 @@ package http
import (
"fmt";
- "http";
"io";
"os";
"path";
diff --git a/src/pkg/http/request.go b/src/pkg/http/request.go
index 0cc83a8b8..15dc15c1e 100644
--- a/src/pkg/http/request.go
+++ b/src/pkg/http/request.go
@@ -14,7 +14,6 @@ import (
"bytes";
"container/vector";
"fmt";
- "http";
"io";
"os";
"strconv";
diff --git a/src/pkg/http/request_test.go b/src/pkg/http/request_test.go
index 1cd91717d..86ec0efac 100644
--- a/src/pkg/http/request_test.go
+++ b/src/pkg/http/request_test.go
@@ -6,7 +6,6 @@ package http
import (
"fmt";
- "http";
"os";
"testing";
)
diff --git a/src/pkg/http/server.go b/src/pkg/http/server.go
index c1de5de78..47f7d01e7 100644
--- a/src/pkg/http/server.go
+++ b/src/pkg/http/server.go
@@ -14,7 +14,6 @@ package http
import (
"bufio";
"fmt";
- "http";
"io";
"log";
"net";
@@ -70,8 +69,6 @@ func newConn(rwc io.ReadWriteCloser, raddr string, handler Handler) (c *Conn, er
return c, nil
}
-func (c *Conn) SetHeader(hdr, val string)
-
// Read next request from connection.
func (c *Conn) readRequest() (req *Request, err os.Error) {
if c.hijacked {
@@ -547,7 +544,6 @@ func Serve(l net.Listener, handler Handler) os.Error {
// package main
//
// import (
-// "http";
// "io";
// )
//
diff --git a/src/pkg/http/triv.go b/src/pkg/http/triv.go
index 546f2a75d..7b7484d3b 100644
--- a/src/pkg/http/triv.go
+++ b/src/pkg/http/triv.go
@@ -10,7 +10,6 @@ import (
"exvar";
"flag";
"fmt";
- "http";
"io";
"log";
"net";
diff --git a/src/pkg/http/url_test.go b/src/pkg/http/url_test.go
index 51d0283fe..6a3cdb0c5 100644
--- a/src/pkg/http/url_test.go
+++ b/src/pkg/http/url_test.go
@@ -6,7 +6,6 @@ package http
import (
"fmt";
- "http";
"os";
"reflect";
"testing";
@@ -14,7 +13,7 @@ import (
// TODO(rsc):
// test URLUnescape
-// test URLEscape
+// test URLEscape
// test ParseURL
type URLTest struct {
diff --git a/src/pkg/json/Makefile b/src/pkg/json/Makefile
index 2d70c2cf8..061ab88cf 100644
--- a/src/pkg/json/Makefile
+++ b/src/pkg/json/Makefile
@@ -2,68 +2,12 @@
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-# DO NOT EDIT. Automatically generated by gobuild.
-# gobuild -m >Makefile
-
-D=
-
include $(GOROOT)/src/Make.$(GOARCH)
-AR=gopack
-
-default: packages
-
-clean:
- rm -rf *.[$(OS)] *.a [$(OS)].out _obj
-
-test: packages
- gotest
-
-coverage: packages
- gotest
- 6cov -g `pwd` | grep -v '_test\.go:'
-
-%.$O: %.go
- $(GC) -I_obj $*.go
-
-%.$O: %.c
- $(CC) $*.c
-
-%.$O: %.s
- $(AS) $*.s
-
-O1=\
- parse.$O\
-
-O2=\
- generic.$O\
- struct.$O\
-
-
-phases: a1 a2
-_obj$D/json.a: phases
-
-a1: $(O1)
- $(AR) grc _obj$D/json.a parse.$O
- rm -f $(O1)
-
-a2: $(O2)
- $(AR) grc _obj$D/json.a generic.$O struct.$O
- rm -f $(O2)
-
-
-newpkg: clean
- mkdir -p _obj$D
- $(AR) grc _obj$D/json.a
-
-$(O1): newpkg
-$(O2): a1
-$(O3): a2
-
-nuke: clean
- rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/json.a
-packages: _obj$D/json.a
+TARG=json
+GOFILES=\
+ generic.go\
+ parse.go\
+ struct.go\
-install: packages
- test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
- cp _obj$D/json.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/json.a
+include $(GOROOT)/src/Make.pkg
diff --git a/src/pkg/json/generic.go b/src/pkg/json/generic.go
index e3194eb17..302b0c9e4 100644
--- a/src/pkg/json/generic.go
+++ b/src/pkg/json/generic.go
@@ -9,7 +9,6 @@ package json
import (
"container/vector";
"fmt";
- "json";
"math";
"strconv";
"strings";
diff --git a/src/pkg/json/generic_test.go b/src/pkg/json/generic_test.go
index 68868d7a5..3d82c8e35 100644
--- a/src/pkg/json/generic_test.go
+++ b/src/pkg/json/generic_test.go
@@ -5,7 +5,6 @@
package json
import (
- "json";
"testing";
)
diff --git a/src/pkg/json/struct.go b/src/pkg/json/struct.go
index b6cebe12d..99312e9c4 100644
--- a/src/pkg/json/struct.go
+++ b/src/pkg/json/struct.go
@@ -8,7 +8,6 @@
package json
import (
- "json";
"reflect";
"strings";
)
diff --git a/src/pkg/json/struct_test.go b/src/pkg/json/struct_test.go
index 4fbfd424c..ce0ab3473 100644
--- a/src/pkg/json/struct_test.go
+++ b/src/pkg/json/struct_test.go
@@ -5,7 +5,6 @@
package json
import (
- "json";
"testing";
)
diff --git a/src/pkg/log/Makefile b/src/pkg/log/Makefile
index 4b1c4b5a2..b569c9e9f 100644
--- a/src/pkg/log/Makefile
+++ b/src/pkg/log/Makefile
@@ -2,59 +2,10 @@
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-# DO NOT EDIT. Automatically generated by gobuild.
-# gobuild -m >Makefile
-
-D=
-
include $(GOROOT)/src/Make.$(GOARCH)
-AR=gopack
-
-default: packages
-
-clean:
- rm -rf *.[$(OS)] *.a [$(OS)].out _obj
-
-test: packages
- gotest
-
-coverage: packages
- gotest
- 6cov -g `pwd` | grep -v '_test\.go:'
-
-%.$O: %.go
- $(GC) -I_obj $*.go
-
-%.$O: %.c
- $(CC) $*.c
-
-%.$O: %.s
- $(AS) $*.s
-
-O1=\
- log.$O\
-
-
-phases: a1
-_obj$D/log.a: phases
-
-a1: $(O1)
- $(AR) grc _obj$D/log.a log.$O
- rm -f $(O1)
-
-
-newpkg: clean
- mkdir -p _obj$D
- $(AR) grc _obj$D/log.a
-
-$(O1): newpkg
-$(O2): a1
-
-nuke: clean
- rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/log.a
-packages: _obj$D/log.a
+TARG=log
+GOFILES=\
+ log.go\
-install: packages
- test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
- cp _obj$D/log.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/log.a
+include $(GOROOT)/src/Make.pkg
diff --git a/src/pkg/log/log_test.go b/src/pkg/log/log_test.go
index e346b3b58..12f732632 100644
--- a/src/pkg/log/log_test.go
+++ b/src/pkg/log/log_test.go
@@ -8,7 +8,6 @@ package log
import (
"bufio";
- "log";
"os";
"regexp";
"testing";
diff --git a/src/pkg/malloc/Makefile b/src/pkg/malloc/Makefile
index 61894f71f..8a108c802 100644
--- a/src/pkg/malloc/Makefile
+++ b/src/pkg/malloc/Makefile
@@ -2,59 +2,10 @@
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-# DO NOT EDIT. Automatically generated by gobuild.
-# gobuild -m >Makefile
-
-D=
-
include $(GOROOT)/src/Make.$(GOARCH)
-AR=gopack
-
-default: packages
-
-clean:
- rm -rf *.[$(OS)] *.a [$(OS)].out _obj
-
-test: packages
- gotest
-
-coverage: packages
- gotest
- 6cov -g `pwd` | grep -v '_test\.go:'
-
-%.$O: %.go
- $(GC) -I_obj $*.go
-
-%.$O: %.c
- $(CC) $*.c
-
-%.$O: %.s
- $(AS) $*.s
-
-O1=\
- malloc.$O\
-
-
-phases: a1
-_obj$D/malloc.a: phases
-
-a1: $(O1)
- $(AR) grc _obj$D/malloc.a malloc.$O
- rm -f $(O1)
-
-
-newpkg: clean
- mkdir -p _obj$D
- $(AR) grc _obj$D/malloc.a
-
-$(O1): newpkg
-$(O2): a1
-
-nuke: clean
- rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/malloc.a
-packages: _obj$D/malloc.a
+TARG=malloc
+GOFILES=\
+ malloc.go\
-install: packages
- test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
- cp _obj$D/malloc.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/malloc.a
+include $(GOROOT)/src/Make.pkg
diff --git a/src/pkg/net/Makefile b/src/pkg/net/Makefile
index 77056198a..a56f7c9b3 100644
--- a/src/pkg/net/Makefile
+++ b/src/pkg/net/Makefile
@@ -2,89 +2,18 @@
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-
-# DO NOT EDIT. Automatically generated by gobuild.
-# gobuild -m dnsclient.go dnsconfig.go dnsmsg.go fd.go fd_${GOOS}.go ip.go net.go parse.go port.go >Makefile
-
-D=
-
include $(GOROOT)/src/Make.$(GOARCH)
-AR=gopack
-
-default: packages
-
-clean:
- rm -rf *.[$(OS)] *.a [$(OS)].out _obj
-
-test: packages
- gotest
-
-coverage: packages
- gotest
- 6cov -g $$(pwd) | grep -v '_test\.go:'
-
-%.$O: %.go
- $(GC) -I_obj $*.go
-
-%.$O: %.c
- $(CC) $*.c
-
-%.$O: %.s
- $(AS) $*.s
-
-O1=\
- fd_$(GOOS).$O\
- parse.$O\
-
-O2=\
- fd.$O\
- ip.$O\
-
-O3=\
- dnsconfig.$O\
- dnsmsg.$O\
- net.$O\
-
-O4=\
- dnsclient.$O\
- port.$O\
-
-
-phases: a1 a2 a3 a4
-_obj$D/net.a: phases
-
-a1: $(O1)
- $(AR) grc _obj$D/net.a fd_$(GOOS).$O parse.$O
- rm -f $(O1)
-
-a2: $(O2)
- $(AR) grc _obj$D/net.a fd.$O ip.$O
- rm -f $(O2)
-
-a3: $(O3)
- $(AR) grc _obj$D/net.a dnsconfig.$O dnsmsg.$O net.$O
- rm -f $(O3)
-
-a4: $(O4)
- $(AR) grc _obj$D/net.a dnsclient.$O port.$O
- rm -f $(O4)
-
-
-newpkg: clean
- mkdir -p _obj$D
- $(AR) grc _obj$D/net.a
-
-$(O1): newpkg
-$(O2): a1
-$(O3): a2
-$(O4): a3
-$(O5): a4
-
-nuke: clean
- rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/net.a
-
-packages: _obj$D/net.a
-install: packages
- test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
- cp _obj$D/net.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/net.a
+TARG=net
+GOFILES=\
+ dnsclient.go\
+ dnsconfig.go\
+ dnsmsg.go\
+ fd.go\
+ fd_$(GOOS).go\
+ ip.go\
+ net.go\
+ parse.go\
+ port.go\
+
+include $(GOROOT)/src/Make.pkg
diff --git a/src/pkg/net/dialgoogle_test.go b/src/pkg/net/dialgoogle_test.go
index e65aaac30..cb5389aad 100644
--- a/src/pkg/net/dialgoogle_test.go
+++ b/src/pkg/net/dialgoogle_test.go
@@ -7,7 +7,6 @@ package net
import (
"flag";
"io";
- "net";
"os";
"strings";
"syscall";
@@ -19,7 +18,7 @@ var ipv6 = flag.Bool("ipv6", false, "assume ipv6 tunnel is present")
// fd is already connected to the destination, port 80.
// Run an HTTP request to fetch the appropriate page.
-func fetchGoogle(t *testing.T, fd net.Conn, network, addr string) {
+func fetchGoogle(t *testing.T, fd Conn, network, addr string) {
req := strings.Bytes("GET /intl/en/privacy.html HTTP/1.0\r\nHost: www.google.com\r\n\r\n");
n, err := fd.Write(req);
@@ -33,9 +32,9 @@ func fetchGoogle(t *testing.T, fd net.Conn, network, addr string) {
}
func doDial(t *testing.T, network, addr string) {
- fd, err := net.Dial(network, "", addr);
+ fd, err := Dial(network, "", addr);
if err != nil {
- t.Errorf("net.Dial(%q, %q, %q) = _, %v", network, "", addr, err);
+ t.Errorf("Dial(%q, %q, %q) = _, %v", network, "", addr, err);
return
}
fetchGoogle(t, fd, network, addr);
@@ -43,9 +42,9 @@ func doDial(t *testing.T, network, addr string) {
}
func doDialTCP(t *testing.T, network, addr string) {
- fd, err := net.DialTCP(network, "", addr);
+ fd, err := DialTCP(network, "", addr);
if err != nil {
- t.Errorf("net.DialTCP(%q, %q, %q) = _, %v", network, "", addr, err);
+ t.Errorf("DialTCP(%q, %q, %q) = _, %v", network, "", addr, err);
} else {
fetchGoogle(t, fd, network, addr);
}
diff --git a/src/pkg/net/dnsclient.go b/src/pkg/net/dnsclient.go
index 7e82855a1..859bef33a 100644
--- a/src/pkg/net/dnsclient.go
+++ b/src/pkg/net/dnsclient.go
@@ -17,7 +17,6 @@ package net
import (
"io";
- "net";
"once";
"os";
"strings";
diff --git a/src/pkg/net/dnsconfig.go b/src/pkg/net/dnsconfig.go
index 7e455d5f8..5cbfbc4e0 100644
--- a/src/pkg/net/dnsconfig.go
+++ b/src/pkg/net/dnsconfig.go
@@ -8,7 +8,6 @@ package net
import (
"io";
- "net";
"os";
"strconv";
)
diff --git a/src/pkg/net/dnsmsg.go b/src/pkg/net/dnsmsg.go
index c7fb07f6d..a166c9661 100644
--- a/src/pkg/net/dnsmsg.go
+++ b/src/pkg/net/dnsmsg.go
@@ -25,7 +25,6 @@ package net
import (
"fmt";
- "net";
"os";
"reflect";
)
diff --git a/src/pkg/net/fd.go b/src/pkg/net/fd.go
index 0917c50fc..ec125f228 100644
--- a/src/pkg/net/fd.go
+++ b/src/pkg/net/fd.go
@@ -7,7 +7,6 @@
package net
import (
- "net";
"once";
"os";
"sync";
@@ -73,7 +72,6 @@ type pollServer struct {
poll *pollster; // low-level OS hooks
deadline int64; // next deadline (nsec since 1970)
}
-func (s *pollServer) Run();
func newPollServer() (s *pollServer, err os.Error) {
s = new(pollServer);
@@ -324,8 +322,6 @@ func isEAGAIN(e os.Error) bool {
return e == os.EAGAIN;
}
-func sockaddrToString(sa syscall.Sockaddr) (name string, err os.Error)
-
func (fd *netFD) addr() string {
sa, e := syscall.Getsockname(fd.fd);
if e != 0 {
diff --git a/src/pkg/net/fd_darwin.go b/src/pkg/net/fd_darwin.go
index c5b38eb3b..8de8ce300 100644
--- a/src/pkg/net/fd_darwin.go
+++ b/src/pkg/net/fd_darwin.go
@@ -7,7 +7,6 @@
package net
import (
- "net";
"os";
"syscall";
)
diff --git a/src/pkg/net/fd_linux.go b/src/pkg/net/fd_linux.go
index 04cf8eac4..5f4b5a9a2 100644
--- a/src/pkg/net/fd_linux.go
+++ b/src/pkg/net/fd_linux.go
@@ -7,7 +7,6 @@
package net
import (
- "net";
"os";
"syscall";
)
diff --git a/src/pkg/net/ip.go b/src/pkg/net/ip.go
index 8c52ede1e..8efdb5778 100644
--- a/src/pkg/net/ip.go
+++ b/src/pkg/net/ip.go
@@ -13,7 +13,6 @@
package net
import (
- "net"
)
// IP address lengths (bytes).
diff --git a/src/pkg/net/ip_test.go b/src/pkg/net/ip_test.go
index fb2ae8216..32840a886 100644
--- a/src/pkg/net/ip_test.go
+++ b/src/pkg/net/ip_test.go
@@ -5,7 +5,6 @@
package net
import (
- "net";
"testing"
)
diff --git a/src/pkg/net/net.go b/src/pkg/net/net.go
index 46efa6e58..c8d533206 100644
--- a/src/pkg/net/net.go
+++ b/src/pkg/net/net.go
@@ -5,7 +5,6 @@
package net
import (
- "net";
"os";
"reflect";
"strconv";
@@ -158,9 +157,6 @@ func listenBacklog() int {
return syscall.SOMAXCONN
}
-func LookupHost(name string) (cname string, addrs []string, err os.Error)
-func LookupPort(network, service string) (port int, err os.Error)
-
// Split "host:port" into "host" and "port".
// Host cannot contain colons unless it is bracketed.
func splitHostPort(hostport string) (host, port string, err os.Error) {
diff --git a/src/pkg/net/net_test.go b/src/pkg/net/net_test.go
index ec2037fe9..3430efb9a 100644
--- a/src/pkg/net/net_test.go
+++ b/src/pkg/net/net_test.go
@@ -5,7 +5,6 @@
package net
import (
- "net";
"os";
"regexp";
"testing";
@@ -55,7 +54,7 @@ var dialErrorTests = []DialErrorTest {
func TestDialError(t *testing.T) {
for i, tt := range dialErrorTests {
- c, e := net.Dial(tt.Net, tt.Laddr, tt.Raddr);
+ c, e := Dial(tt.Net, tt.Laddr, tt.Raddr);
if c != nil {
c.Close();
}
diff --git a/src/pkg/net/parse_test.go b/src/pkg/net/parse_test.go
index ce0bb4709..227ae55f1 100644
--- a/src/pkg/net/parse_test.go
+++ b/src/pkg/net/parse_test.go
@@ -6,7 +6,6 @@ package net
import (
"bufio";
- "net";
"os";
"testing";
)
diff --git a/src/pkg/net/port.go b/src/pkg/net/port.go
index a9cd98daf..c5789adc9 100644
--- a/src/pkg/net/port.go
+++ b/src/pkg/net/port.go
@@ -8,7 +8,6 @@ package net
import (
"io";
- "net";
"once";
"os";
)
diff --git a/src/pkg/net/port_test.go b/src/pkg/net/port_test.go
index c535d4caa..aa2a3a7a6 100644
--- a/src/pkg/net/port_test.go
+++ b/src/pkg/net/port_test.go
@@ -5,7 +5,6 @@
package net
import (
- "net";
"testing";
)
diff --git a/src/pkg/net/server_test.go b/src/pkg/net/server_test.go
index 92ed68338..c2be68a0d 100644
--- a/src/pkg/net/server_test.go
+++ b/src/pkg/net/server_test.go
@@ -6,7 +6,6 @@ package net
import (
"io";
- "net";
"os";
"strings";
"syscall";
@@ -27,7 +26,7 @@ func runEcho(fd io.ReadWriter, done chan<- int) {
}
func runServe(t *testing.T, network, addr string, listening chan<- string, done chan<- int) {
- l, err := net.Listen(network, addr);
+ l, err := Listen(network, addr);
if err != nil {
t.Fatalf("net.Listen(%q, %q) = _, %v", network, addr, err);
}
@@ -47,7 +46,7 @@ func runServe(t *testing.T, network, addr string, listening chan<- string, done
}
func connect(t *testing.T, network, addr string) {
- fd, err := net.Dial(network, "", addr);
+ fd, err := Dial(network, "", addr);
if err != nil {
t.Fatalf("net.Dial(%q, %q, %q) = _, %v", network, "", addr, err);
}
diff --git a/src/pkg/net/timeout_test.go b/src/pkg/net/timeout_test.go
index 0aebce88a..bc49dadf4 100644
--- a/src/pkg/net/timeout_test.go
+++ b/src/pkg/net/timeout_test.go
@@ -5,14 +5,13 @@
package net
import (
- "net";
"os";
"testing";
"time";
)
func testTimeout(t *testing.T, network, addr string) {
- fd, err := net.Dial(network, "", addr);
+ fd, err := Dial(network, "", addr);
defer fd.Close();
if err != nil {
t.Errorf("dial %s %s failed: %v", network, addr, err);
diff --git a/src/pkg/path/Makefile b/src/pkg/path/Makefile
index d9f9fd562..d3a40bfcf 100644
--- a/src/pkg/path/Makefile
+++ b/src/pkg/path/Makefile
@@ -2,59 +2,10 @@
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-# DO NOT EDIT. Automatically generated by gobuild.
-# gobuild -m >Makefile
-
-D=
-
include $(GOROOT)/src/Make.$(GOARCH)
-AR=gopack
-
-default: packages
-
-clean:
- rm -rf *.[$(OS)] *.a [$(OS)].out _obj
-
-test: packages
- gotest
-
-coverage: packages
- gotest
- 6cov -g `pwd` | grep -v '_test\.go:'
-
-%.$O: %.go
- $(GC) -I_obj $*.go
-
-%.$O: %.c
- $(CC) $*.c
-
-%.$O: %.s
- $(AS) $*.s
-
-O1=\
- path.$O\
-
-
-phases: a1
-_obj$D/path.a: phases
-
-a1: $(O1)
- $(AR) grc _obj$D/path.a path.$O
- rm -f $(O1)
-
-
-newpkg: clean
- mkdir -p _obj$D
- $(AR) grc _obj$D/path.a
-
-$(O1): newpkg
-$(O2): a1
-
-nuke: clean
- rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/path.a
-packages: _obj$D/path.a
+TARG=path
+GOFILES=\
+ path.go\
-install: packages
- test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
- cp _obj$D/path.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/path.a
+include $(GOROOT)/src/Make.pkg
diff --git a/src/pkg/path/path_test.go b/src/pkg/path/path_test.go
index 1238ac1cd..386c17c70 100644
--- a/src/pkg/path/path_test.go
+++ b/src/pkg/path/path_test.go
@@ -5,7 +5,6 @@
package path
import (
- "path";
"testing"
)
@@ -120,7 +119,6 @@ type ExtTest struct {
var exttests = []ExtTest {
ExtTest{"path.go", ".go"},
ExtTest{"path.pb.go", ".go"},
- ExtTest{"path", ""},
ExtTest{"a.dir/b", ""},
ExtTest{"a.dir/b.go", ".go"},
ExtTest{"a.dir/", ""},
diff --git a/src/pkg/rand/Makefile b/src/pkg/rand/Makefile
index 63d26ac99..142aa7f4c 100644
--- a/src/pkg/rand/Makefile
+++ b/src/pkg/rand/Makefile
@@ -2,59 +2,10 @@
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-# DO NOT EDIT. Automatically generated by gobuild.
-# gobuild -m >Makefile
-
-D=
-
include $(GOROOT)/src/Make.$(GOARCH)
-AR=gopack
-
-default: packages
-
-clean:
- rm -rf *.[$(OS)] *.a [$(OS)].out _obj
-
-test: packages
- gotest
-
-coverage: packages
- gotest
- 6cov -g `pwd` | grep -v '_test\.go:'
-
-%.$O: %.go
- $(GC) -I_obj $*.go
-
-%.$O: %.c
- $(CC) $*.c
-
-%.$O: %.s
- $(AS) $*.s
-
-O1=\
- rand.$O\
-
-
-phases: a1
-_obj$D/rand.a: phases
-
-a1: $(O1)
- $(AR) grc _obj$D/rand.a rand.$O
- rm -f $(O1)
-
-
-newpkg: clean
- mkdir -p _obj$D
- $(AR) grc _obj$D/rand.a
-
-$(O1): newpkg
-$(O2): a1
-
-nuke: clean
- rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/rand.a
-packages: _obj$D/rand.a
+TARG=rand
+GOFILES=\
+ rand.go\
-install: packages
- test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
- cp _obj$D/rand.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/rand.a
+include $(GOROOT)/src/Make.pkg
diff --git a/src/pkg/regexp/Makefile b/src/pkg/regexp/Makefile
index 0312d510e..84d1a5d51 100644
--- a/src/pkg/regexp/Makefile
+++ b/src/pkg/regexp/Makefile
@@ -2,59 +2,10 @@
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-# DO NOT EDIT. Automatically generated by gobuild.
-# gobuild -m >Makefile
-
-D=
-
include $(GOROOT)/src/Make.$(GOARCH)
-AR=gopack
-
-default: packages
-
-clean:
- rm -rf *.[$(OS)] *.a [$(OS)].out _obj
-
-test: packages
- gotest
-
-coverage: packages
- gotest
- 6cov -g `pwd` | grep -v '_test\.go:'
-
-%.$O: %.go
- $(GC) -I_obj $*.go
-
-%.$O: %.c
- $(CC) $*.c
-
-%.$O: %.s
- $(AS) $*.s
-
-O1=\
- regexp.$O\
-
-
-phases: a1
-_obj$D/regexp.a: phases
-
-a1: $(O1)
- $(AR) grc _obj$D/regexp.a regexp.$O
- rm -f $(O1)
-
-
-newpkg: clean
- mkdir -p _obj$D
- $(AR) grc _obj$D/regexp.a
-
-$(O1): newpkg
-$(O2): a1
-
-nuke: clean
- rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/regexp.a
-packages: _obj$D/regexp.a
+TARG=regexp
+GOFILES=\
+ regexp.go\
-install: packages
- test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
- cp _obj$D/regexp.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/regexp.a
+include $(GOROOT)/src/Make.pkg
diff --git a/src/pkg/regexp/all_test.go b/src/pkg/regexp/all_test.go
index c985dad42..e6e3eb2f1 100644
--- a/src/pkg/regexp/all_test.go
+++ b/src/pkg/regexp/all_test.go
@@ -6,7 +6,6 @@ package regexp
import (
"os";
- "regexp";
"strings";
"testing";
)
diff --git a/src/pkg/regexp/regexp.go b/src/pkg/regexp/regexp.go
index f78bf864e..15361a2f7 100644
--- a/src/pkg/regexp/regexp.go
+++ b/src/pkg/regexp/regexp.go
@@ -288,8 +288,6 @@ func newParser(re *Regexp) *parser {
return p;
}
-func (p *parser) regexp() (start, end instr)
-
var iNULL instr
func special(c int) bool {
diff --git a/src/pkg/rpc/Makefile b/src/pkg/rpc/Makefile
index a06250326..9ea178238 100644
--- a/src/pkg/rpc/Makefile
+++ b/src/pkg/rpc/Makefile
@@ -2,69 +2,12 @@
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-
-# DO NOT EDIT. Automatically generated by gobuild.
-# gobuild -m >Makefile
-
-D=
-
include $(GOROOT)/src/Make.$(GOARCH)
-AR=gopack
-
-default: packages
-
-clean:
- rm -rf *.[$(OS)] *.a [$(OS)].out _obj
-
-test: packages
- gotest
-
-coverage: packages
- gotest
- 6cov -g $$(pwd) | grep -v '_test\.go:'
-
-%.$O: %.go
- $(GC) -I_obj $*.go
-
-%.$O: %.c
- $(CC) $*.c
-
-%.$O: %.s
- $(AS) $*.s
-
-O1=\
- server.$O\
-
-O2=\
- client.$O\
- debug.$O\
-
-
-phases: a1 a2
-_obj$D/rpc.a: phases
-
-a1: $(O1)
- $(AR) grc _obj$D/rpc.a server.$O
- rm -f $(O1)
-
-a2: $(O2)
- $(AR) grc _obj$D/rpc.a client.$O debug.$O
- rm -f $(O2)
-
-
-newpkg: clean
- mkdir -p _obj$D
- $(AR) grc _obj$D/rpc.a
-
-$(O1): newpkg
-$(O2): a1
-$(O3): a2
-
-nuke: clean
- rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/rpc.a
-packages: _obj$D/rpc.a
+TARG=rpc
+GOFILES=\
+ client.go\
+ debug.go\
+ server.go\
-install: packages
- test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
- cp _obj$D/rpc.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/rpc.a
+include $(GOROOT)/src/Make.pkg
diff --git a/src/pkg/rpc/client.go b/src/pkg/rpc/client.go
index 92c283e6b..5846d6b33 100644
--- a/src/pkg/rpc/client.go
+++ b/src/pkg/rpc/client.go
@@ -12,7 +12,6 @@ import (
"log";
"net";
"os";
- "rpc";
"strconv";
"sync";
)
diff --git a/src/pkg/rpc/debug.go b/src/pkg/rpc/debug.go
index 3b927cf24..990bd1f9c 100644
--- a/src/pkg/rpc/debug.go
+++ b/src/pkg/rpc/debug.go
@@ -16,7 +16,6 @@ import (
"io";
"log";
"os";
- "rpc";
"sort";
"template";
)
diff --git a/src/pkg/rpc/server.go b/src/pkg/rpc/server.go
index d1b7de714..37afa7748 100644
--- a/src/pkg/rpc/server.go
+++ b/src/pkg/rpc/server.go
@@ -409,8 +409,6 @@ func serveHTTP(c *http.Conn, req *http.Request) {
server.input(conn);
}
-func debugHTTP(c *http.Conn, req *http.Request)
-
// HandleHTTP registers an HTTP handler for RPC messages.
// It is still necessary to invoke http.Serve(), typically in a go statement.
func HandleHTTP() {
diff --git a/src/pkg/rpc/server_test.go b/src/pkg/rpc/server_test.go
index e21680eb6..ff5de90c8 100644
--- a/src/pkg/rpc/server_test.go
+++ b/src/pkg/rpc/server_test.go
@@ -12,7 +12,6 @@ import (
"net";
"once";
"os";
- "rpc";
"strings";
"testing";
)
diff --git a/src/pkg/sort/Makefile b/src/pkg/sort/Makefile
index 4d193f859..a10e407d6 100644
--- a/src/pkg/sort/Makefile
+++ b/src/pkg/sort/Makefile
@@ -2,59 +2,10 @@
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-# DO NOT EDIT. Automatically generated by gobuild.
-# gobuild -m >Makefile
-
-D=
-
include $(GOROOT)/src/Make.$(GOARCH)
-AR=gopack
-
-default: packages
-
-clean:
- rm -rf *.[$(OS)] *.a [$(OS)].out _obj
-
-test: packages
- gotest
-
-coverage: packages
- gotest
- 6cov -g `pwd` | grep -v '_test\.go:'
-
-%.$O: %.go
- $(GC) -I_obj $*.go
-
-%.$O: %.c
- $(CC) $*.c
-
-%.$O: %.s
- $(AS) $*.s
-
-O1=\
- sort.$O\
-
-
-phases: a1
-_obj$D/sort.a: phases
-
-a1: $(O1)
- $(AR) grc _obj$D/sort.a sort.$O
- rm -f $(O1)
-
-
-newpkg: clean
- mkdir -p _obj$D
- $(AR) grc _obj$D/sort.a
-
-$(O1): newpkg
-$(O2): a1
-
-nuke: clean
- rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/sort.a
-packages: _obj$D/sort.a
+TARG=sort
+GOFILES=\
+ sort.go\
-install: packages
- test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
- cp _obj$D/sort.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/sort.a
+include $(GOROOT)/src/Make.pkg
diff --git a/src/pkg/sort/sort_test.go b/src/pkg/sort/sort_test.go
index 1747daca6..bc56469bb 100644
--- a/src/pkg/sort/sort_test.go
+++ b/src/pkg/sort/sort_test.go
@@ -7,7 +7,6 @@ package sort
import (
"fmt";
"rand";
- "sort";
"testing";
)
@@ -19,8 +18,8 @@ var strings = [...]string{"", "Hello", "foo", "bar", "foo", "f00", "%*&^*&^&", "
func TestSortIntArray(t *testing.T) {
data := ints;
a := IntArray(&data);
- sort.Sort(a);
- if !sort.IsSorted(a) {
+ Sort(a);
+ if !IsSorted(a) {
t.Errorf("sorted %v", ints);
t.Errorf(" got %v", data);
}
@@ -29,8 +28,8 @@ func TestSortIntArray(t *testing.T) {
func TestSortFloatArray(t *testing.T) {
data := floats;
a := FloatArray(&data);
- sort.Sort(a);
- if !sort.IsSorted(a) {
+ Sort(a);
+ if !IsSorted(a) {
t.Errorf("sorted %v", floats);
t.Errorf(" got %v", data);
}
@@ -39,8 +38,8 @@ func TestSortFloatArray(t *testing.T) {
func TestSortStringArray(t *testing.T) {
data := strings;
a := StringArray(&data);
- sort.Sort(a);
- if !sort.IsSorted(a) {
+ Sort(a);
+ if !IsSorted(a) {
t.Errorf("sorted %v", strings);
t.Errorf(" got %v", data);
}
@@ -48,8 +47,8 @@ func TestSortStringArray(t *testing.T) {
func TestSortInts(t *testing.T) {
data := ints;
- sort.SortInts(&data);
- if !sort.IntsAreSorted(&data) {
+ SortInts(&data);
+ if !IntsAreSorted(&data) {
t.Errorf("sorted %v", ints);
t.Errorf(" got %v", data);
}
@@ -57,8 +56,8 @@ func TestSortInts(t *testing.T) {
func TestSortFloats(t *testing.T) {
data := floats;
- sort.SortFloats(&data);
- if !sort.FloatsAreSorted(&data) {
+ SortFloats(&data);
+ if !FloatsAreSorted(&data) {
t.Errorf("sorted %v", floats);
t.Errorf(" got %v", data);
}
@@ -66,8 +65,8 @@ func TestSortFloats(t *testing.T) {
func TestSortStrings(t *testing.T) {
data := strings;
- sort.SortStrings(&data);
- if !sort.StringsAreSorted(&data) {
+ SortStrings(&data);
+ if !StringsAreSorted(&data) {
t.Errorf("sorted %v", strings);
t.Errorf(" got %v", data);
}
@@ -78,11 +77,11 @@ func TestSortLarge_Random(t *testing.T) {
for i := 0; i < len(data); i++ {
data[i] = rand.Intn(100);
}
- if sort.IntsAreSorted(data) {
+ if IntsAreSorted(data) {
t.Fatalf("terrible rand.rand");
}
- sort.SortInts(data);
- if !sort.IntsAreSorted(data) {
+ SortInts(data);
+ if !IntsAreSorted(data) {
t.Errorf("sort didn't sort - 1M ints");
}
}
@@ -195,9 +194,9 @@ func TestBentleyMcIlroy(t *testing.T) {
for i := 0; i < n; i++ {
mdata[i] = data[i];
}
- // sort.SortInts is known to be correct
+ // SortInts is known to be correct
// because mode Sort runs after mode _Copy.
- sort.SortInts(mdata);
+ SortInts(mdata);
case _Dither:
for i := 0; i < n; i++ {
mdata[i] = data[i] + i%5;
@@ -206,7 +205,7 @@ func TestBentleyMcIlroy(t *testing.T) {
desc := fmt.Sprintf("n=%d m=%d dist=%s mode=%s", n, m, dists[dist], modes[mode]);
d := &testingData{desc, t, mdata[0:n], n*lg(n)*12/10, 0};
- sort.Sort(d);
+ Sort(d);
// If we were testing C qsort, we'd have to make a copy
// of the array and sort it ourselves and then compare
@@ -214,9 +213,9 @@ func TestBentleyMcIlroy(t *testing.T) {
// the data, not (for example) overwriting it with zeros.
//
// In go, we don't have to be so paranoid: since the only
- // mutating method sort.Sort can call is TestingData.swap,
+ // mutating method Sort can call is TestingData.swap,
// it suffices here just to check that the final array is sorted.
- if !sort.IntsAreSorted(mdata) {
+ if !IntsAreSorted(mdata) {
t.Errorf("%s: ints not sorted", desc);
t.Errorf("\t%v", mdata);
t.FailNow();
diff --git a/src/pkg/strings/Makefile b/src/pkg/strings/Makefile
index b6660cfc7..dcfa6066c 100644
--- a/src/pkg/strings/Makefile
+++ b/src/pkg/strings/Makefile
@@ -2,59 +2,10 @@
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-# DO NOT EDIT. Automatically generated by gobuild.
-# gobuild -m >Makefile
-
-D=
-
include $(GOROOT)/src/Make.$(GOARCH)
-AR=gopack
-
-default: packages
-
-clean:
- rm -rf *.[$(OS)] *.a [$(OS)].out _obj
-
-test: packages
- gotest
-
-coverage: packages
- gotest
- 6cov -g `pwd` | grep -v '_test\.go:'
-
-%.$O: %.go
- $(GC) -I_obj $*.go
-
-%.$O: %.c
- $(CC) $*.c
-
-%.$O: %.s
- $(AS) $*.s
-
-O1=\
- strings.$O\
-
-
-phases: a1
-_obj$D/strings.a: phases
-
-a1: $(O1)
- $(AR) grc _obj$D/strings.a strings.$O
- rm -f $(O1)
-
-
-newpkg: clean
- mkdir -p _obj$D
- $(AR) grc _obj$D/strings.a
-
-$(O1): newpkg
-$(O2): a1
-
-nuke: clean
- rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/strings.a
-packages: _obj$D/strings.a
+TARG=strings
+GOFILES=\
+ strings.go\
-install: packages
- test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
- cp _obj$D/strings.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/strings.a
+include $(GOROOT)/src/Make.pkg
diff --git a/src/pkg/strings/strings_test.go b/src/pkg/strings/strings_test.go
index a1733b3df..714507b6d 100644
--- a/src/pkg/strings/strings_test.go
+++ b/src/pkg/strings/strings_test.go
@@ -5,7 +5,6 @@
package strings
import (
- "strings";
"testing";
)
diff --git a/src/pkg/syscall/Makefile b/src/pkg/syscall/Makefile
index a5cc042d7..2800a8470 100644
--- a/src/pkg/syscall/Makefile
+++ b/src/pkg/syscall/Makefile
@@ -2,96 +2,22 @@
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-# DO NOT EDIT. Automatically generated by gobuild.
-# gobuild -m asm_${GOOS}_${GOARCH}.s errstr.go exec.go syscall.go syscall_${GOOS}.go syscall_${GOOS}_${GOARCH}.go zerrors_${GOOS}_${GOARCH}.go zsyscall_${GOOS}_${GOARCH}.go zsysnum_${GOOS}_${GOARCH}.go ztypes_${GOOS}_${GOARCH}.go >Makefile
-
-D=
-
include $(GOROOT)/src/Make.$(GOARCH)
-AR=gopack
-
-default: packages
-
-clean:
- rm -rf *.[$(OS)] *.a [$(OS)].out _obj
-
-test: packages
- gotest
-
-coverage: packages
- gotest
- 6cov -g `pwd` | grep -v '_test\.go:'
-
-%.$O: %.go
- $(GC) -I_obj $*.go
-%.$O: %.c
- $(CC) $*.c
-
-%.$O: %.s
- $(AS) $*.s
-
-O1=\
+TARG=syscall
+GOFILES=\
+ errstr.go\
+ exec.go\
+ syscall.go\
+ syscall_$(GOOS).go\
+ syscall_$(GOOS)_$(GOARCH).go\
+ zerrors_$(GOOS)_$(GOARCH).go\
+ zsyscall_$(GOOS)_$(GOARCH).go\
+ zsysnum_$(GOOS)_$(GOARCH).go\
+ ztypes_$(GOOS)_$(GOARCH).go\
+
+OFILES=\
asm_$(GOOS)_$(GOARCH).$O\
- syscall.$O\
- zerrors_$(GOOS)_$(GOARCH).$O\
- zsysnum_$(GOOS)_$(GOARCH).$O\
- ztypes_$(GOOS)_$(GOARCH).$O\
-
-O2=\
- errstr.$O\
- zsyscall_$(GOOS)_$(GOARCH).$O\
-
-O3=\
- syscall_$(GOOS)_$(GOARCH).$O\
-
-O4=\
- syscall_$(GOOS).$O\
-
-O5=\
- exec.$O\
-
-
-phases: a1 a2 a3 a4 a5
-_obj$D/syscall.a: phases
-
-a1: $(O1)
- $(AR) grc _obj$D/syscall.a asm_$(GOOS)_$(GOARCH).$O syscall.$O zerrors_$(GOOS)_$(GOARCH).$O zsysnum_$(GOOS)_$(GOARCH).$O ztypes_$(GOOS)_$(GOARCH).$O
- rm -f $(O1)
-
-a2: $(O2)
- $(AR) grc _obj$D/syscall.a errstr.$O zsyscall_$(GOOS)_$(GOARCH).$O
- rm -f $(O2)
-
-a3: $(O3)
- $(AR) grc _obj$D/syscall.a syscall_$(GOOS)_$(GOARCH).$O
- rm -f $(O3)
-
-a4: $(O4)
- $(AR) grc _obj$D/syscall.a syscall_$(GOOS).$O
- rm -f $(O4)
-
-a5: $(O5)
- $(AR) grc _obj$D/syscall.a exec.$O
- rm -f $(O5)
-
-
-newpkg: clean
- mkdir -p _obj$D
- $(AR) grc _obj$D/syscall.a
-
-$(O1): newpkg
-$(O2): a1
-$(O3): a2
-$(O4): a3
-$(O5): a4
-$(O6): a5
-
-nuke: clean
- rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/syscall.a
-
-packages: _obj$D/syscall.a
+ types_$(GOOS)_$(GOARCH).$O\
-install: packages
- test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
- cp _obj$D/syscall.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/syscall.a
+include $(GOROOT)/src/Make.pkg
diff --git a/src/pkg/syscall/errstr.go b/src/pkg/syscall/errstr.go
index 67a529d34..12a2c0d62 100644
--- a/src/pkg/syscall/errstr.go
+++ b/src/pkg/syscall/errstr.go
@@ -4,7 +4,6 @@
package syscall
-import "syscall"
func str(val int) string { // do it here rather than with fmt to avoid dependency
if val < 0 {
diff --git a/src/pkg/syscall/exec.go b/src/pkg/syscall/exec.go
index 3dd0727f8..91d8a3f8c 100644
--- a/src/pkg/syscall/exec.go
+++ b/src/pkg/syscall/exec.go
@@ -8,7 +8,6 @@ package syscall
import (
"sync";
- "syscall";
"unsafe";
)
diff --git a/src/pkg/syscall/syscall.go b/src/pkg/syscall/syscall.go
index 5ee44e3e8..59f35b2bf 100644
--- a/src/pkg/syscall/syscall.go
+++ b/src/pkg/syscall/syscall.go
@@ -11,10 +11,7 @@
// the manuals for the appropriate operating system.
package syscall
-import (
- "syscall";
- "unsafe";
-)
+import "unsafe"
func Syscall(trap, a1, a2, a3 uintptr) (r1, r2, err uintptr)
func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2, err uintptr)
diff --git a/src/pkg/syscall/syscall_darwin.go b/src/pkg/syscall/syscall_darwin.go
index 49d2815b3..b19d42782 100644
--- a/src/pkg/syscall/syscall_darwin.go
+++ b/src/pkg/syscall/syscall_darwin.go
@@ -11,10 +11,7 @@
package syscall
-import (
- "syscall";
- "unsafe";
-)
+import "unsafe"
const OS = "darwin"
diff --git a/src/pkg/syscall/syscall_darwin_386.go b/src/pkg/syscall/syscall_darwin_386.go
index 6792109d7..aa558c217 100644
--- a/src/pkg/syscall/syscall_darwin_386.go
+++ b/src/pkg/syscall/syscall_darwin_386.go
@@ -4,8 +4,6 @@
package syscall
-import "syscall"
-
func Getpagesize() int {
return 4096
}
diff --git a/src/pkg/syscall/syscall_darwin_amd64.go b/src/pkg/syscall/syscall_darwin_amd64.go
index f7a93f121..34e83ec6b 100644
--- a/src/pkg/syscall/syscall_darwin_amd64.go
+++ b/src/pkg/syscall/syscall_darwin_amd64.go
@@ -4,8 +4,6 @@
package syscall
-import "syscall"
-
func Getpagesize() int {
return 4096
}
diff --git a/src/pkg/syscall/syscall_linux.go b/src/pkg/syscall/syscall_linux.go
index ac77942a3..10fedb939 100644
--- a/src/pkg/syscall/syscall_linux.go
+++ b/src/pkg/syscall/syscall_linux.go
@@ -11,10 +11,7 @@
package syscall
-import (
- "syscall";
- "unsafe";
-)
+import "unsafe"
const OS = "linux"
diff --git a/src/pkg/syscall/syscall_linux_386.go b/src/pkg/syscall/syscall_linux_386.go
index b44428e11..dc64ae79f 100644
--- a/src/pkg/syscall/syscall_linux_386.go
+++ b/src/pkg/syscall/syscall_linux_386.go
@@ -4,10 +4,7 @@
package syscall
-import (
- "syscall";
- "unsafe";
-)
+import "unsafe"
func Getpagesize() int {
return 4096
diff --git a/src/pkg/syscall/syscall_linux_amd64.go b/src/pkg/syscall/syscall_linux_amd64.go
index 4f7b33bc1..28d74b758 100644
--- a/src/pkg/syscall/syscall_linux_amd64.go
+++ b/src/pkg/syscall/syscall_linux_amd64.go
@@ -4,8 +4,6 @@
package syscall
-import "syscall"
-
//sys Chown(path string, uid int, gid int) (errno int)
//sys Fchown(fd int, uid int, gid int) (errno int)
//sys Fstat(fd int, stat *Stat_t) (errno int)
diff --git a/src/pkg/syscall/zsyscall_darwin_386.go b/src/pkg/syscall/zsyscall_darwin_386.go
index c83e63de3..688649abf 100644
--- a/src/pkg/syscall/zsyscall_darwin_386.go
+++ b/src/pkg/syscall/zsyscall_darwin_386.go
@@ -3,10 +3,7 @@
package syscall
-import (
- "syscall";
- "unsafe";
-)
+import "unsafe"
func getgroups(ngid int, gid *_Gid_t) (n int, errno int) {
r0, r1, e1 := Syscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0);
diff --git a/src/pkg/syscall/zsyscall_darwin_amd64.go b/src/pkg/syscall/zsyscall_darwin_amd64.go
index 7afb20953..28d04c626 100644
--- a/src/pkg/syscall/zsyscall_darwin_amd64.go
+++ b/src/pkg/syscall/zsyscall_darwin_amd64.go
@@ -3,10 +3,7 @@
package syscall
-import (
- "syscall";
- "unsafe";
-)
+import "unsafe"
func getgroups(ngid int, gid *_Gid_t) (n int, errno int) {
r0, r1, e1 := Syscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0);
diff --git a/src/pkg/syscall/zsyscall_linux_386.go b/src/pkg/syscall/zsyscall_linux_386.go
index 11d08d2c7..3444c6dfb 100644
--- a/src/pkg/syscall/zsyscall_linux_386.go
+++ b/src/pkg/syscall/zsyscall_linux_386.go
@@ -3,10 +3,7 @@
package syscall
-import (
- "syscall";
- "unsafe";
-)
+import "unsafe"
func pipe(p *[2]_C_int) (errno int) {
r0, r1, e1 := Syscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0);
diff --git a/src/pkg/syscall/zsyscall_linux_amd64.go b/src/pkg/syscall/zsyscall_linux_amd64.go
index 743c5285b..7834cfbea 100644
--- a/src/pkg/syscall/zsyscall_linux_amd64.go
+++ b/src/pkg/syscall/zsyscall_linux_amd64.go
@@ -3,10 +3,7 @@
package syscall
-import (
- "syscall";
- "unsafe";
-)
+import "unsafe"
func pipe(p *[2]_C_int) (errno int) {
r0, r1, e1 := Syscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0);
diff --git a/src/pkg/tabwriter/Makefile b/src/pkg/tabwriter/Makefile
index 1c4518066..28cb50580 100644
--- a/src/pkg/tabwriter/Makefile
+++ b/src/pkg/tabwriter/Makefile
@@ -2,59 +2,10 @@
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-# DO NOT EDIT. Automatically generated by gobuild.
-# gobuild -m >Makefile
-
-D=
-
include $(GOROOT)/src/Make.$(GOARCH)
-AR=gopack
-
-default: packages
-
-clean:
- rm -rf *.[$(OS)] *.a [$(OS)].out _obj
-
-test: packages
- gotest
-
-coverage: packages
- gotest
- 6cov -g `pwd` | grep -v '_test\.go:'
-
-%.$O: %.go
- $(GC) -I_obj $*.go
-
-%.$O: %.c
- $(CC) $*.c
-
-%.$O: %.s
- $(AS) $*.s
-
-O1=\
- tabwriter.$O\
-
-
-phases: a1
-_obj$D/tabwriter.a: phases
-
-a1: $(O1)
- $(AR) grc _obj$D/tabwriter.a tabwriter.$O
- rm -f $(O1)
-
-
-newpkg: clean
- mkdir -p _obj$D
- $(AR) grc _obj$D/tabwriter.a
-
-$(O1): newpkg
-$(O2): a1
-
-nuke: clean
- rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/tabwriter.a
-packages: _obj$D/tabwriter.a
+TARG=tabwriter
+GOFILES=\
+ tabwriter.go\
-install: packages
- test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
- cp _obj$D/tabwriter.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/tabwriter.a
+include $(GOROOT)/src/Make.pkg
diff --git a/src/pkg/tabwriter/tabwriter_test.go b/src/pkg/tabwriter/tabwriter_test.go
index 7967a4674..65641dad0 100644
--- a/src/pkg/tabwriter/tabwriter_test.go
+++ b/src/pkg/tabwriter/tabwriter_test.go
@@ -7,7 +7,6 @@ package tabwriter
import (
"io";
"os";
- "tabwriter";
"testing";
)
@@ -47,7 +46,7 @@ func (b *buffer) String() string {
}
-func write(t *testing.T, testname string, w *tabwriter.Writer, src string) {
+func write(t *testing.T, testname string, w *Writer, src string) {
written, err := io.WriteString(w, src);
if err != nil {
t.Errorf("--- test: %s\n--- src:\n%s\n--- write error: %v\n", testname, src, err);
@@ -58,7 +57,7 @@ func write(t *testing.T, testname string, w *tabwriter.Writer, src string) {
}
-func verify(t *testing.T, testname string, w *tabwriter.Writer, b *buffer, src, expected string) {
+func verify(t *testing.T, testname string, w *Writer, b *buffer, src, expected string) {
err := w.Flush();
if err != nil {
t.Errorf("--- test: %s\n--- src:\n%s\n--- flush error: %v\n", testname, src, err);
@@ -75,7 +74,7 @@ func check(t *testing.T, testname string, tabwidth, padding int, padchar byte, f
var b buffer;
b.init(1000);
- var w tabwriter.Writer;
+ var w Writer;
w.Init(&b, tabwidth, padding, padchar, flags);
// write all at once
@@ -143,7 +142,7 @@ var tests = []entry {
entry{
"4b",
- 8, 1, '.', tabwriter.AlignRight,
+ 8, 1, '.', AlignRight,
"\t", // '\t' terminates an empty cell on last line - nothing to print
""
},
@@ -171,7 +170,7 @@ var tests = []entry {
entry{
"5d",
- 8, 1, '.', tabwriter.AlignRight,
+ 8, 1, '.', AlignRight,
"*\t*\t",
".......**"
},
@@ -220,14 +219,14 @@ var tests = []entry {
entry{
"7f",
- 8, 1, '.', tabwriter.FilterHTML,
+ 8, 1, '.', FilterHTML,
"f) f&lt;o\t<b>bar</b>\t\n",
"f) f&lt;o..<b>bar</b>.....\n"
},
entry{
"7g",
- 8, 1, '.', tabwriter.FilterHTML,
+ 8, 1, '.', FilterHTML,
"g) f&lt;o\t<b>bar</b>\t non-terminated entity &amp",
"g) f&lt;o..<b>bar</b>..... non-terminated entity &amp"
},
@@ -251,7 +250,7 @@ var tests = []entry {
entry{
"9b",
- 0, 0, '.', tabwriter.FilterHTML,
+ 0, 0, '.', FilterHTML,
"1\t2<!---\f--->\t3\t4\n" // \f inside HTML is ignored
"11\t222\t3333\t44444\n",
@@ -297,7 +296,7 @@ var tests = []entry {
entry{
"12a",
- 8, 1, ' ', tabwriter.AlignRight,
+ 8, 1, ' ', AlignRight,
"a\tè\tc\t\n"
"aa\tèèè\tcccc\tddddd\t\n"
"aaa\tèèèè\t\n",
@@ -373,7 +372,7 @@ var tests = []entry {
entry{
"13c",
- 8, 1, '\t', tabwriter.FilterHTML,
+ 8, 1, '\t', FilterHTML,
"4444\t333\t22\t1\t333\n"
"999999999\t22\n"
"7\t22\n"
@@ -393,7 +392,7 @@ var tests = []entry {
entry{
"14",
- 0, 2, ' ', tabwriter.AlignRight,
+ 0, 2, ' ', AlignRight,
".0\t.3\t2.4\t-5.1\t\n"
"23.0\t12345678.9\t2.4\t-989.4\t\n"
"5.1\t12.0\t2.4\t-7.0\t\n"
diff --git a/src/pkg/template/Makefile b/src/pkg/template/Makefile
index e91c08818..832f5046c 100644
--- a/src/pkg/template/Makefile
+++ b/src/pkg/template/Makefile
@@ -2,67 +2,11 @@
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-# DO NOT EDIT. Automatically generated by gobuild.
-# gobuild -m >Makefile
-
-D=
-
include $(GOROOT)/src/Make.$(GOARCH)
-AR=gopack
-
-default: packages
-
-clean:
- rm -rf *.[$(OS)] *.a [$(OS)].out _obj
-
-test: packages
- gotest
-
-coverage: packages
- gotest
- 6cov -g `pwd` | grep -v '_test\.go:'
-
-%.$O: %.go
- $(GC) -I_obj $*.go
-
-%.$O: %.c
- $(CC) $*.c
-
-%.$O: %.s
- $(AS) $*.s
-
-O1=\
- format.$O\
-
-O2=\
- template.$O\
-
-
-phases: a1 a2
-_obj$D/template.a: phases
-
-a1: $(O1)
- $(AR) grc _obj$D/template.a format.$O
- rm -f $(O1)
-
-a2: $(O2)
- $(AR) grc _obj$D/template.a template.$O
- rm -f $(O2)
-
-
-newpkg: clean
- mkdir -p _obj$D
- $(AR) grc _obj$D/template.a
-
-$(O1): newpkg
-$(O2): a1
-$(O3): a2
-
-nuke: clean
- rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/template.a
-packages: _obj$D/template.a
+TARG=template
+GOFILES=\
+ format.go\
+ template.go\
-install: packages
- test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
- cp _obj$D/template.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/template.a
+include $(GOROOT)/src/Make.pkg
diff --git a/src/pkg/template/template.go b/src/pkg/template/template.go
index 956e45257..a75265535 100644
--- a/src/pkg/template/template.go
+++ b/src/pkg/template/template.go
@@ -63,7 +63,6 @@ import (
"reflect";
"runtime";
"strings";
- "template";
)
// Errors returned during parsing and execution. Users may extract the information and reformat
@@ -442,8 +441,7 @@ func (t *Template) parseSimple(item []byte) (done bool, tok int, w []string) {
return false, tok, w
}
-// parseSection and parseRepeated are mutually recursive
-func (t *Template) parseSection(words []string) *sectionElement
+// parseRepeated and parseSection are mutually recursive
func (t *Template) parseRepeated(words []string) *repeatedElement {
r := new(repeatedElement);
@@ -641,10 +639,6 @@ func (t *Template) writeVariable(v *variableElement, st *state) {
t.execError(st, v.linenum, "missing formatter %s for variable %s", v.formatter, v.name)
}
-// execute{|Element|Section|Repeated} are mutually recursive
-func (t *Template) executeSection(s *sectionElement, st *state)
-func (t *Template) executeRepeated(r *repeatedElement, st *state)
-
// Execute element i. Return next index to execute.
func (t *Template) executeElement(i int, st *state) int {
switch elem := t.elems.At(i).(type) {
diff --git a/src/pkg/template/template_test.go b/src/pkg/template/template_test.go
index c293f6646..f31f43d1e 100644
--- a/src/pkg/template/template_test.go
+++ b/src/pkg/template/template_test.go
@@ -10,7 +10,6 @@ import (
"io";
"os";
"reflect";
- "template";
"testing";
)
diff --git a/src/pkg/testing/Makefile b/src/pkg/testing/Makefile
index eab8a4cf0..809bb5642 100644
--- a/src/pkg/testing/Makefile
+++ b/src/pkg/testing/Makefile
@@ -2,68 +2,11 @@
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-
-# DO NOT EDIT. Automatically generated by gobuild.
-# gobuild -m >Makefile
-
-D=
-
include $(GOROOT)/src/Make.$(GOARCH)
-AR=gopack
-
-default: packages
-
-clean:
- rm -rf *.[$(OS)] *.a [$(OS)].out _obj
-
-test: packages
- gotest
-
-coverage: packages
- gotest
- 6cov -g $$(pwd) | grep -v '_test\.go:'
-
-%.$O: %.go
- $(GC) -I_obj $*.go
-
-%.$O: %.c
- $(CC) $*.c
-
-%.$O: %.s
- $(AS) $*.s
-
-O1=\
- regexp.$O\
-
-O2=\
- testing.$O\
-
-
-phases: a1 a2
-_obj$D/testing.a: phases
-
-a1: $(O1)
- $(AR) grc _obj$D/testing.a regexp.$O
- rm -f $(O1)
-
-a2: $(O2)
- $(AR) grc _obj$D/testing.a testing.$O
- rm -f $(O2)
-
-
-newpkg: clean
- mkdir -p _obj$D
- $(AR) grc _obj$D/testing.a
-
-$(O1): newpkg
-$(O2): a1
-$(O3): a2
-
-nuke: clean
- rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/testing.a
-packages: _obj$D/testing.a
+TARG=testing
+GOFILES=\
+ regexp.go\
+ testing.go\
-install: packages
- test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
- cp _obj$D/testing.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/testing.a
+include $(GOROOT)/src/Make.pkg
diff --git a/src/pkg/testing/iotest/Makefile b/src/pkg/testing/iotest/Makefile
index 1d01041f5..b223fb932 100644
--- a/src/pkg/testing/iotest/Makefile
+++ b/src/pkg/testing/iotest/Makefile
@@ -2,60 +2,11 @@
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-# DO NOT EDIT. Automatically generated by gobuild.
-# gobuild -m >Makefile
-
-D=/testing/
-
include $(GOROOT)/src/Make.$(GOARCH)
-AR=gopack
-
-default: packages
-
-clean:
- rm -rf *.[$(OS)] *.a [$(OS)].out _obj
-
-test: packages
- gotest
-
-coverage: packages
- gotest
- 6cov -g `pwd` | grep -v '_test\.go:'
-
-%.$O: %.go
- $(GC) -I_obj $*.go
-
-%.$O: %.c
- $(CC) $*.c
-
-%.$O: %.s
- $(AS) $*.s
-
-O1=\
- logger.$O\
- reader.$O\
-
-
-phases: a1
-_obj$D/iotest.a: phases
-
-a1: $(O1)
- $(AR) grc _obj$D/iotest.a logger.$O reader.$O
- rm -f $(O1)
-
-
-newpkg: clean
- mkdir -p _obj$D
- $(AR) grc _obj$D/iotest.a
-
-$(O1): newpkg
-$(O2): a1
-
-nuke: clean
- rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/iotest.a
-packages: _obj$D/iotest.a
+TARG=testing/iotest
+GOFILES=\
+ logger.go\
+ reader.go\
-install: packages
- test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
- cp _obj$D/iotest.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/iotest.a
+include $(GOROOT)/src/Make.pkg
diff --git a/src/pkg/testing/regexp.go b/src/pkg/testing/regexp.go
index ae698264f..2b12250f5 100644
--- a/src/pkg/testing/regexp.go
+++ b/src/pkg/testing/regexp.go
@@ -306,8 +306,6 @@ func newParser(re *Regexp) *parser {
return p;
}
-func (p *parser) regexp() (start, end instr)
-
var iNULL instr
func special(c int) bool {
diff --git a/src/pkg/testing/testing.go b/src/pkg/testing/testing.go
index 276129393..617efa4ab 100644
--- a/src/pkg/testing/testing.go
+++ b/src/pkg/testing/testing.go
@@ -16,7 +16,6 @@ import (
"fmt";
"os";
"runtime";
- "testing";
)
// Report as tests are run; default is silent for success.
diff --git a/src/pkg/unicode/Makefile b/src/pkg/unicode/Makefile
index de1677b8d..7ab29c6c4 100644
--- a/src/pkg/unicode/Makefile
+++ b/src/pkg/unicode/Makefile
@@ -2,67 +2,11 @@
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-# DO NOT EDIT. Automatically generated by gobuild.
-# gobuild -m >Makefile
-
-D=
-
include $(GOROOT)/src/Make.$(GOARCH)
-AR=gopack
-
-default: packages
-
-clean:
- rm -rf *.[$(OS)] *.a [$(OS)].out _obj
-
-test: packages
- gotest
-
-coverage: packages
- gotest
- 6cov -g `pwd` | grep -v '_test\.go:'
-
-%.$O: %.go
- $(GC) -I_obj $*.go
-
-%.$O: %.c
- $(CC) $*.c
-
-%.$O: %.s
- $(AS) $*.s
-
-O1=\
- letter.$O\
-
-O2=\
- decimaldigit.$O\
-
-
-phases: a1 a2
-_obj$D/unicode.a: phases
-
-a1: $(O1)
- $(AR) grc _obj$D/unicode.a letter.$O
- rm -f $(O1)
-
-a2: $(O2)
- $(AR) grc _obj$D/unicode.a decimaldigit.$O
- rm -f $(O2)
-
-
-newpkg: clean
- mkdir -p _obj$D
- $(AR) grc _obj$D/unicode.a
-
-$(O1): newpkg
-$(O2): a1
-$(O3): a2
-
-nuke: clean
- rm -f $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/unicode.a
-packages: _obj$D/unicode.a
+TARG=unicode
+GOFILES=\
+ decimaldigit.go\
+ letter.go\
-install: packages
- test -d $(GOROOT)/pkg && mkdir -p $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D
- cp _obj$D/unicode.a $(GOROOT)/pkg/$(GOOS)_$(GOARCH)$D/unicode.a
+include $(GOROOT)/src/Make.pkg
diff --git a/src/pkg/unicode/decimaldigit.go b/src/pkg/unicode/decimaldigit.go
index 1165e3ae1..ab65b433d 100644
--- a/src/pkg/unicode/decimaldigit.go
+++ b/src/pkg/unicode/decimaldigit.go
@@ -9,8 +9,6 @@ package unicode
// These ranges are the characters with the third field "Nd".
// Should generate automatically etc.
-import "unicode"
-
// Decimal digit is the set of Unicode characters with the "decimal digit" property.
var DecimalDigit = []Range{
Range{0x0030, 0x0039, 1},
diff --git a/src/pkg/unicode/decimaldigit_test.go b/src/pkg/unicode/decimaldigit_test.go
index 393846e2e..05d75b4b2 100644
--- a/src/pkg/unicode/decimaldigit_test.go
+++ b/src/pkg/unicode/decimaldigit_test.go
@@ -4,10 +4,7 @@
package unicode
-import (
- "testing";
- "unicode";
-)
+import "testing"
// To get data:
// grep '^....;[^;]*;Nd;' UnicodeData.txt
diff --git a/src/pkg/unicode/letter_test.go b/src/pkg/unicode/letter_test.go
index 8e4290d6d..15a0a0eed 100644
--- a/src/pkg/unicode/letter_test.go
+++ b/src/pkg/unicode/letter_test.go
@@ -4,10 +4,7 @@
package unicode
-import (
- "testing";
- "unicode";
-)
+import "testing"
var upper = []int{
0x41,