The Go Programming Language

Text file src/pkg/Makefile

     1	# Copyright 2009 The Go Authors. All rights reserved.
     2	# Use of this source code is governed by a BSD-style
     3	# license that can be found in the LICENSE file.
     4	
     5	# After editing the DIRS= list or adding imports to any Go files
     6	# in any of those directories, run:
     7	#
     8	#	./deps.bash
     9	#
    10	# to rebuild the dependency information in Make.deps.
    11	
    12	include ../Make.inc
    13	
    14	all: install
    15	
    16	DIRS=\
    17		archive/tar\
    18		archive/zip\
    19		asn1\
    20		big\
    21		bufio\
    22		bytes\
    23		cmath\
    24		compress/bzip2\
    25		compress/flate\
    26		compress/gzip\
    27		compress/lzw \
    28		compress/zlib\
    29		container/heap\
    30		container/list\
    31		container/ring\
    32		container/vector\
    33		crypto\
    34		crypto/aes\
    35		crypto/blowfish\
    36		crypto/cast5\
    37		crypto/cipher\
    38		crypto/des\
    39		crypto/dsa\
    40		crypto/ecdsa\
    41		crypto/elliptic\
    42		crypto/hmac\
    43		crypto/md4\
    44		crypto/md5\
    45		crypto/ocsp\
    46		crypto/openpgp\
    47		crypto/openpgp/armor\
    48		crypto/openpgp/elgamal\
    49		crypto/openpgp/error\
    50		crypto/openpgp/packet\
    51		crypto/openpgp/s2k\
    52		crypto/rand\
    53		crypto/rc4\
    54		crypto/ripemd160\
    55		crypto/rsa\
    56		crypto/sha1\
    57		crypto/sha256\
    58		crypto/sha512\
    59		crypto/subtle\
    60		crypto/tls\
    61		crypto/twofish\
    62		crypto/x509\
    63		crypto/x509/pkix\
    64		crypto/xtea\
    65		csv\
    66		debug/dwarf\
    67		debug/macho\
    68		debug/elf\
    69		debug/gosym\
    70		debug/pe\
    71		ebnf\
    72		encoding/ascii85\
    73		encoding/base32\
    74		encoding/base64\
    75		encoding/binary\
    76		encoding/git85\
    77		encoding/hex\
    78		encoding/pem\
    79		exec\
    80		exp/gui\
    81		exp/gui/x11\
    82		exp/norm\
    83		exp/regexp/syntax\
    84		exp/template/html\
    85		expvar\
    86		flag\
    87		fmt\
    88		go/ast\
    89		go/build\
    90		go/doc\
    91		go/parser\
    92		go/printer\
    93		go/scanner\
    94		go/token\
    95		go/typechecker\
    96		go/types\
    97		gob\
    98		hash\
    99		hash/adler32\
   100		hash/crc32\
   101		hash/crc64\
   102		hash/fnv\
   103		html\
   104		http\
   105		http/cgi\
   106		http/fcgi\
   107		http/pprof\
   108		http/httptest\
   109		http/spdy\
   110		image\
   111		image/bmp\
   112		image/draw\
   113		image/gif\
   114		image/jpeg\
   115		image/png\
   116		image/tiff\
   117		image/ycbcr\
   118		index/suffixarray\
   119		io\
   120		io/ioutil\
   121		json\
   122		log\
   123		mail\
   124		math\
   125		mime\
   126		mime/multipart\
   127		net\
   128		net/dict\
   129		net/textproto\
   130		netchan\
   131		old/template\
   132		os\
   133		os/signal\
   134		os/user\
   135		patch\
   136		path\
   137		path/filepath\
   138		rand\
   139		reflect\
   140		regexp\
   141		rpc\
   142		rpc/jsonrpc\
   143		runtime\
   144		runtime/cgo\
   145		runtime/debug\
   146		runtime/pprof\
   147		scanner\
   148		smtp\
   149		sort\
   150		strconv\
   151		strings\
   152		sync\
   153		sync/atomic\
   154		syscall\
   155		syslog\
   156		tabwriter\
   157		template\
   158		template/parse\
   159		testing\
   160		testing/iotest\
   161		testing/quick\
   162		testing/script\
   163		time\
   164		try\
   165		unicode\
   166		url\
   167		utf16\
   168		utf8\
   169		websocket\
   170		xml\
   171		../cmd/cgo\
   172		../cmd/ebnflint\
   173		../cmd/godoc\
   174		../cmd/gofix\
   175		../cmd/gofmt\
   176		../cmd/goinstall\
   177		../cmd/gotest\
   178		../cmd/gotype\
   179		../cmd/govet\
   180		../cmd/goyacc\
   181		../cmd/hgpatch\
   182	
   183	ifeq ($(GOOS),linux)
   184	DIRS+=\
   185		os/inotify\
   186	
   187	endif
   188	
   189	ifeq ($(GOOS),plan9)
   190	NOPLAN9BUILD=\
   191		crypto/tls\
   192		exp/gui/x11\
   193		expvar\
   194		http\
   195		http/cgi\
   196		http/fcgi\
   197		http/httptest\
   198		http/pprof\
   199		http/spdy\
   200		mail\
   201		mime/multipart\
   202		net\
   203		net/dict\
   204		net/textproto\
   205		netchan\
   206		os/signal\
   207		rpc\
   208		rpc/jsonrpc\
   209		smtp\
   210		syslog\
   211		websocket\
   212		../cmd/godoc\
   213		../cmd/goinstall\
   214	
   215	DIRS:=$(filter-out $(NOPLAN9BUILD),$(DIRS))
   216	endif
   217	
   218	NOTEST+=\
   219		crypto\
   220		crypto/openpgp/error\
   221		crypto/x509/pkix\
   222		exp/gui\
   223		exp/gui/x11\
   224		go/ast\
   225		go/doc\
   226		go/token\
   227		hash\
   228		http/pprof\
   229		http/httptest\
   230		image/bmp\
   231		image/gif\
   232		net/dict\
   233		rand\
   234		runtime/cgo\
   235		syscall\
   236		testing\
   237		testing/iotest\
   238		try\
   239		../cmd/cgo\
   240		../cmd/ebnflint\
   241		../cmd/godoc\
   242		../cmd/gotest\
   243		../cmd/goyacc\
   244		../cmd/hgpatch\
   245	
   246	NOBENCH+=\
   247		container/vector\
   248	
   249	# Disable tests that windows cannot run yet.
   250	ifeq ($(GOOS),windows)
   251	NOTEST+=os/signal    # no signals
   252	NOTEST+=syslog       # no network
   253	NOTEST+=time         # no syscall.Kill, syscall.SIGCHLD for sleep tests
   254	endif
   255	
   256	TEST=\
   257		$(filter-out $(NOTEST),$(DIRS))
   258	
   259	BENCH=\
   260		$(filter-out $(NOBENCH),$(TEST))
   261	
   262	clean.dirs: $(addsuffix .clean, $(DIRS))
   263	install.dirs: $(addsuffix .install, $(DIRS))
   264	nuke.dirs: $(addsuffix .nuke, $(DIRS))
   265	test.dirs: $(addsuffix .test, $(TEST))
   266	testshort.dirs: $(addsuffix .testshort, $(TEST))
   267	bench.dirs: $(addsuffix .bench, $(BENCH))
   268	
   269	%.clean:
   270		+$(MAKE) -C $* clean
   271	
   272	%.install:
   273		+@echo install $*
   274		+@$(MAKE) -C $* install.clean >$*/build.out 2>&1 || (echo INSTALL FAIL $*; cat $*/build.out; exit 1)
   275	
   276	%.nuke:
   277		+$(MAKE) -C $* nuke
   278	
   279	%.test:
   280		+@echo test $*
   281		+@$(MAKE) -C $* test.clean >$*/test.out 2>&1 || (echo TEST FAIL $*; cat $*/test.out; exit 1)
   282	
   283	%.testshort:
   284		+@echo test $*
   285		+@$(MAKE) -C $* testshort.clean >$*/test.out 2>&1 || (echo TEST FAIL $*; cat $*/test.out; exit 1)
   286	
   287	%.bench:
   288		+$(MAKE) -C $* bench	
   289	
   290	clean: clean.dirs
   291	
   292	install: install.dirs
   293	
   294	test:	test.dirs
   295	
   296	testshort: testshort.dirs
   297	
   298	bench:	bench.dirs ../../test/garbage.bench
   299	
   300	nuke: nuke.dirs
   301		rm -rf "$(GOROOT)"/pkg/*
   302	
   303	deps:
   304		./deps.bash
   305	
   306	echo-dirs:
   307		@echo $(DIRS)
   308	
   309	-include Make.deps
   310	
   311	runtime/cgo.install: ../cmd/cgo.install

release.r60.3. Except as noted, this content is licensed under a Creative Commons Attribution 3.0 License.