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

300 lines
4.8 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\
asn1\
big\
bufio\
bytes\
cmath\
compress/flate\
compress/gzip\
compress/zlib\
container/heap\
container/list\
container/ring\
container/vector\
crypto/aes\
crypto/block\
crypto/blowfish\
crypto/hmac\
crypto/md4\
crypto/md5\
crypto/ocsp\
crypto/rand\
crypto/rc4\
crypto/ripemd160\
crypto/rsa\
crypto/sha1\
crypto/sha256\
crypto/sha512\
crypto/subtle\
crypto/tls\
crypto/x509\
crypto/xtea\
debug/dwarf\
debug/macho\
debug/elf\
debug/gosym\
debug/proc\
ebnf\
encoding/ascii85\
encoding/base64\
encoding/binary\
encoding/git85\
encoding/hex\
encoding/pem\
exec\
exp/datafmt\
exp/draw\
exp/draw/x11\
exp/eval\
exp/iterable\
expvar\
flag\
fmt\
go/ast\
go/doc\
go/parser\
go/printer\
go/scanner\
go/token\
go/typechecker\
gob\
hash\
hash/adler32\
hash/crc32\
hash/crc64\
html\
http\
http/pprof\
image\
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\
index/suffixarray\
io\
io/ioutil\
json\
log\
math\
mime\
mime/multipart\
net\
net/dict\
net/textproto\
netchan\
nntp\
os\
os/signal\
patch\
path\
rand\
reflect\
regexp\
rpc\
rpc/jsonrpc\
runtime\
runtime/pprof\
scanner\
sort\
strconv\
strings\
sync\
syscall\
syslog\
tabwriter\
template\
testing\
testing/iotest\
testing/quick\
testing/script\
time\
unicode\
utf16\
utf8\
websocket\
xml\
../libcgo\
../cmd/cgo\
../cmd/ebnflint\
../cmd/godoc\
../cmd/gofmt\
../cmd/goinstall\
../cmd/goyacc\
../cmd/hgpatch\
NOTEST=\
debug/proc\
exp/draw/x11\
go/ast\
go/doc\
go/token\
hash\
http/pprof\
image\
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\
net/dict\
rand\
runtime\
runtime/pprof\
syscall\
testing/iotest\
../libcgo\
../cmd/cgo\
../cmd/ebnflint\
../cmd/godoc\
../cmd/gofmt\
../cmd/goinstall\
../cmd/goyacc\
../cmd/hgpatch\
NOBENCH=\
container/vector\
# Disable tests that depend on an external network.
ifeq ($(DISABLE_NET_TESTS),1)
NOTEST+=http net
endif
# Disable tests that NaCl cannot run yet.
ifeq ($(GOOS),nacl)
NOTEST+=archive/tar # no pipe
NOTEST+=debug/dwarf # no pread
NOTEST+=debug/macho # no pread
NOTEST+=debug/elf # no pread
NOTEST+=exec # no pipe
NOTEST+=http # no network
NOTEST+=log # no runtime.Caller
NOTEST+=net # no network
NOTEST+=netchan # no network
NOTEST+=os # many things unimplemented
NOTEST+=os/signal # no signals
NOTEST+=path # tree walking does not work
NOTEST+=rpc # no network
NOTEST+=syslog # no network
NOTEST+=time # no syscall.Kill, syscall.SIGCHLD for sleep tests
NOTEST+=websocket # no network
endif
# Disable tests that windows cannot run yet.
ifeq ($(GOOS),windows)
NOTEST+=exec # no pipe
NOTEST+=os # many things unimplemented
NOTEST+=os/signal # no signals
NOTEST+=path # tree walking does not work
NOTEST+=syslog # no network
NOTEST+=time # no syscall.Kill, syscall.SIGCHLD for sleep tests
NOTEST+=websocket # no network
endif
ifeq ($(GOARCH),arm)
# Tests that fail, probably 5g bugs.
# Disable so that dashboard all.bash can catch regressions.
NOTEST+=archive/tar
NOTEST+=asn1
NOTEST+=big
NOTEST+=bytes
NOTEST+=cmath
NOTEST+=compress/gzip
NOTEST+=compress/zlib
NOTEST+=crypto/block
NOTEST+=crypto/ocsp
NOTEST+=crypto/rsa
NOTEST+=crypto/subtle
NOTEST+=crypto/tls
NOTEST+=crypto/x509
NOTEST+=debug/dwarf
NOTEST+=debug/elf
NOTEST+=debug/macho
NOTEST+=encoding/binary
NOTEST+=exp/datafmt
NOTEST+=exp/eval
NOTEST+=expvar
NOTEST+=flag
NOTEST+=fmt
NOTEST+=go/printer
NOTEST+=gob
NOTEST+=http
NOTEST+=image/png
NOTEST+=io
NOTEST+=json
NOTEST+=log
NOTEST+=math
NOTEST+=mime
NOTEST+=mime/multipart
NOTEST+=net
NOTEST+=netchan
NOTEST+=os
NOTEST+=os/signal
NOTEST+=reflect
NOTEST+=rpc
NOTEST+=rpc/jsonrpc
NOTEST+=scanner
NOTEST+=strconv
NOTEST+=strings
NOTEST+=syslog
NOTEST+=template
NOTEST+=testing/quick
NOTEST+=time
NOTEST+=websocket
NOTEST+=xml
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))
bench.dirs: $(addsuffix .bench, $(BENCH))
%.clean:
+cd $* && gomake clean
%.install:
+cd $* && gomake install
%.nuke:
+cd $* && gomake nuke
%.test:
+cd $* && gomake test
%.bench:
+cd $* && gomake bench
clean: clean.dirs
install: install.dirs
test: test.dirs
bench: bench.dirs ../../test/garbage.bench
nuke: nuke.dirs
rm -rf "$(GOROOT)"/pkg/*
deps:
./deps.bash
-include Make.deps
../cmd/cgo.install: ../libcgo.install