1
0
mirror of https://github.com/golang/go synced 2024-10-04 16:21:22 -06:00
go/src/pkg/Makefile

289 lines
4.2 KiB
Makefile
Raw Normal View History

# Copyright 2009 The Go Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
# After editing the DIRS= list or adding imports to any Go files
# in any of those directories, run:
#
# ./deps.bash
#
# to rebuild the dependency information in Make.deps.
include ../Make.inc
all: install
DIRS=\
archive/tar\
archive/zip\
asn1\
big\
bufio\
bytes\
cmath\
compress/bzip2\
compress/flate\
compress/gzip\
compress/lzw \
compress/zlib\
container/heap\
container/list\
container/ring\
crypto\
crypto/aes\
crypto/blowfish\
crypto/bcrypt\
crypto/cast5\
crypto/cipher\
crypto/des\
crypto/dsa\
crypto/ecdsa\
crypto/elliptic\
crypto/hmac\
crypto/md4\
crypto/md5\
crypto/ocsp\
crypto/openpgp\
crypto/openpgp/armor\
crypto/openpgp/elgamal\
crypto/openpgp/error\
crypto/openpgp/packet\
crypto/openpgp/s2k\
crypto/rand\
crypto/rc4\
crypto/ripemd160\
crypto/rsa\
crypto/sha1\
crypto/sha256\
crypto/sha512\
crypto/subtle\
crypto/tls\
crypto/twofish\
crypto/x509\
crypto/x509/pkix\
crypto/xtea\
csv\
debug/dwarf\
debug/macho\
debug/elf\
debug/gosym\
debug/pe\
encoding/ascii85\
encoding/base32\
encoding/base64\
encoding/binary\
encoding/git85\
encoding/hex\
encoding/pem\
exec\
exp/ebnf\
exp/ebnflint\
exp/gotype\
exp/gui\
exp/gui/x11\
exp/norm\
exp/spdy\
exp/sql\
exp/sql/driver\
exp/template/html\
exp/types\
expvar\
flag\
fmt\
go/ast\
go/build\
go/doc\
go/parser\
go/printer\
go/scanner\
go/token\
gob\
hash\
hash/adler32\
hash/crc32\
hash/crc64\
hash/fnv\
html\
http\
http/cgi\
http/fcgi\
http/pprof\
http/httptest\
image\
image/bmp\
image/color\
image/draw\
image/gif\
Basic image/jpeg decoder. This is not a complete JPEG implementation (e.g. it does not handle progressive JPEGs or restart markers), but I was able to take a photo with my phone, and view the resultant JPEG in pure Go. The decoder is simple, but slow. The Huffman decoder in particular should be easily improvable, but optimization is left to future changelists. Being able to inline functions in the inner loop should also help performance. The output is not pixel-for-pixel identical to libjpeg, although identical behavior isn't necessarily a goal, since JPEG is a lossy codec. There are at least two reasons for the discrepancy. First, the inverse DCT algorithm used is the same as Plan9's src/cmd/jpg, which has different rounding errors from libjpeg's default IDCT implementation. Note that libjpeg actually has three different IDCT implementations: one floating point, and two fixed point. Out of those four, Plan9's seemed the simplest to understand, partly because it has no #ifdef's or C macros. Second, for 4:2:2 or 4:2:0 chroma sampling, this implementation does nearest neighbor upsampling, compared to libjpeg's triangle filter (e.g. see h2v1_fancy_upsample in jdsample.c). The difference from the first reason is typically zero, but sometimes 1 (out of 256) in YCbCr space, or double that in RGB space. The difference from the second reason can be as large as 8/256 in YCbCr space, in regions of steep chroma gradients. Informal eyeballing suggests that the net difference is typically imperceptible, though. R=r CC=golang-dev, rsc https://golang.org/cl/164056
2009-12-16 16:32:17 -07:00
image/jpeg\
image/png\
image/tiff\
image/ycbcr\
index/suffixarray\
io\
io/ioutil\
json\
log\
mail\
math\
mime\
mime/multipart\
net\
net/dict\
net/textproto\
old/netchan\
old/regexp\
old/template\
os\
os/signal\
os/user\
patch\
path\
path/filepath\
rand\
reflect\
regexp\
regexp/syntax\
rpc\
rpc/jsonrpc\
runtime\
runtime/cgo\
runtime/debug\
runtime/pprof\
scanner\
smtp\
sort\
strconv\
strings\
sync\
sync/atomic\
syscall\
syslog\
tabwriter\
template\
template/parse\
testing\
testing/iotest\
testing/quick\
testing/script\
time\
unicode\
url\
utf16\
utf8\
websocket\
xml\
../cmd/cgo\
../cmd/godoc\
../cmd/gofix\
../cmd/gofmt\
../cmd/goinstall\
../cmd/gotest\
../cmd/govet\
../cmd/goyacc\
../cmd/hgpatch\
ifeq ($(GOOS),linux)
DIRS+=\
exp/inotify\
endif
ifeq ($(GOOS),plan9)
NOPLAN9BUILD=\
os/signal\
DIRS:=$(filter-out $(NOPLAN9BUILD),$(DIRS))
endif
NOTEST+=\
crypto\
crypto/openpgp/error\
crypto/x509/pkix\
exp/ebnflint\
exp/gui\
exp/gui/x11\
exp/sql/driver\
go/doc\
hash\
http/pprof\
http/httptest\
image/bmp\
image/color\
image/gif\
net/dict\
rand\
runtime/cgo\
syscall\
testing\
testing/iotest\
../cmd/cgo\
../cmd/godoc\
../cmd/gotest\
../cmd/goyacc\
../cmd/hgpatch\
NOBENCH+=\
# Disable tests that windows cannot run yet.
ifeq ($(GOOS),windows)
NOTEST+=os/signal # no signals
NOTEST+=syslog # no network
endif
TEST=\
$(filter-out $(NOTEST),$(DIRS))
BENCH=\
$(filter-out $(NOBENCH),$(TEST))
clean.dirs: $(addsuffix .clean, $(DIRS))
install.dirs: $(addsuffix .install, $(DIRS))
nuke.dirs: $(addsuffix .nuke, $(DIRS))
test.dirs: $(addsuffix .test, $(TEST))
testshort.dirs: $(addsuffix .testshort, $(TEST))
bench.dirs: $(addsuffix .bench, $(BENCH))
%.clean:
+$(MAKE) -C $* clean
%.install:
src/pkg/Makefile: trim per-directory make output except on failure Not committed to this but it sure makes the output easier to skim. With this CL: $ make install runtime install sync/atomic install sync install unicode install utf16 install syscall install os ... install ../cmd/govet install ../cmd/goyacc install ../cmd/hgpatch $ make test test archive/tar test archive/zip test asn1 test big test bufio ... test path test path/filepath TEST FAIL reflect gotest rm -f _test/reflect.a 6g -o _gotest_.6 deepequal.go type.go value.go rm -f _test/reflect.a gopack grc _test/reflect.a _gotest_.6 all_test.go:210: invalid type assertion: reflect.NewValue(tt.i).(*StructValue) (non-interface type reflect.Value on left) all_test.go:217: cannot type switch on non-interface value v (type reflect.Value) all_test.go:218: undefined: IntValue all_test.go:221: cannot use 132 (type int) as type reflect.Value in function argument all_test.go:223: cannot use 8 (type int) as type reflect.Value in function argument all_test.go:225: cannot use 16 (type int) as type reflect.Value in function argument all_test.go:227: cannot use 32 (type int) as type reflect.Value in function argument all_test.go:229: cannot use 64 (type int) as type reflect.Value in function argument all_test.go:231: undefined: UintValue all_test.go:234: cannot use 132 (type int) as type reflect.Value in function argument all_test.go:234: too many errors gotest: "/Users/rsc/g/go/bin/6g -I _test -o _xtest_.6 all_test.go tostring_test.go" failed: exit status 1 make[1]: *** [test] Error 2 make: *** [reflect.test] Error 1 R=r, r2 CC=golang-dev https://golang.org/cl/4343046
2011-04-06 13:06:28 -06:00
+@echo install $*
+@$(MAKE) -C $* install.clean >$*/build.out 2>&1 || (echo INSTALL FAIL $*; cat $*/build.out; exit 1)
%.nuke:
+$(MAKE) -C $* nuke
%.test:
src/pkg/Makefile: trim per-directory make output except on failure Not committed to this but it sure makes the output easier to skim. With this CL: $ make install runtime install sync/atomic install sync install unicode install utf16 install syscall install os ... install ../cmd/govet install ../cmd/goyacc install ../cmd/hgpatch $ make test test archive/tar test archive/zip test asn1 test big test bufio ... test path test path/filepath TEST FAIL reflect gotest rm -f _test/reflect.a 6g -o _gotest_.6 deepequal.go type.go value.go rm -f _test/reflect.a gopack grc _test/reflect.a _gotest_.6 all_test.go:210: invalid type assertion: reflect.NewValue(tt.i).(*StructValue) (non-interface type reflect.Value on left) all_test.go:217: cannot type switch on non-interface value v (type reflect.Value) all_test.go:218: undefined: IntValue all_test.go:221: cannot use 132 (type int) as type reflect.Value in function argument all_test.go:223: cannot use 8 (type int) as type reflect.Value in function argument all_test.go:225: cannot use 16 (type int) as type reflect.Value in function argument all_test.go:227: cannot use 32 (type int) as type reflect.Value in function argument all_test.go:229: cannot use 64 (type int) as type reflect.Value in function argument all_test.go:231: undefined: UintValue all_test.go:234: cannot use 132 (type int) as type reflect.Value in function argument all_test.go:234: too many errors gotest: "/Users/rsc/g/go/bin/6g -I _test -o _xtest_.6 all_test.go tostring_test.go" failed: exit status 1 make[1]: *** [test] Error 2 make: *** [reflect.test] Error 1 R=r, r2 CC=golang-dev https://golang.org/cl/4343046
2011-04-06 13:06:28 -06:00
+@echo test $*
+@$(MAKE) -C $* test.clean >$*/test.out 2>&1 || (echo TEST FAIL $*; cat $*/test.out; exit 1)
%.testshort:
src/pkg/Makefile: trim per-directory make output except on failure Not committed to this but it sure makes the output easier to skim. With this CL: $ make install runtime install sync/atomic install sync install unicode install utf16 install syscall install os ... install ../cmd/govet install ../cmd/goyacc install ../cmd/hgpatch $ make test test archive/tar test archive/zip test asn1 test big test bufio ... test path test path/filepath TEST FAIL reflect gotest rm -f _test/reflect.a 6g -o _gotest_.6 deepequal.go type.go value.go rm -f _test/reflect.a gopack grc _test/reflect.a _gotest_.6 all_test.go:210: invalid type assertion: reflect.NewValue(tt.i).(*StructValue) (non-interface type reflect.Value on left) all_test.go:217: cannot type switch on non-interface value v (type reflect.Value) all_test.go:218: undefined: IntValue all_test.go:221: cannot use 132 (type int) as type reflect.Value in function argument all_test.go:223: cannot use 8 (type int) as type reflect.Value in function argument all_test.go:225: cannot use 16 (type int) as type reflect.Value in function argument all_test.go:227: cannot use 32 (type int) as type reflect.Value in function argument all_test.go:229: cannot use 64 (type int) as type reflect.Value in function argument all_test.go:231: undefined: UintValue all_test.go:234: cannot use 132 (type int) as type reflect.Value in function argument all_test.go:234: too many errors gotest: "/Users/rsc/g/go/bin/6g -I _test -o _xtest_.6 all_test.go tostring_test.go" failed: exit status 1 make[1]: *** [test] Error 2 make: *** [reflect.test] Error 1 R=r, r2 CC=golang-dev https://golang.org/cl/4343046
2011-04-06 13:06:28 -06:00
+@echo test $*
+@$(MAKE) -C $* testshort.clean >$*/test.out 2>&1 || (echo TEST FAIL $*; cat $*/test.out; exit 1)
%.bench:
+$(MAKE) -C $* bench
clean: clean.dirs
install: install.dirs
test: test.dirs
testshort: testshort.dirs
bench: bench.dirs ../../test/garbage.bench
nuke: nuke.dirs
rm -rf "$(GOROOT)"/pkg/*
deps:
./deps.bash
echo-dirs:
@echo $(DIRS)
-include Make.deps
runtime/cgo.install: ../cmd/cgo.install