2010-12-03 05:34:57 +01:00
|
|
|
# Makefile.am -- Go library Makefile.
|
|
|
|
|
2011-01-14 19:46:42 +01:00
|
|
|
# Copyright 2009 The Go Authors. All rights reserved.
|
2010-12-03 05:34:57 +01:00
|
|
|
# Use of this source code is governed by a BSD-style
|
|
|
|
# license that can be found in the LICENSE file.
|
|
|
|
|
|
|
|
# Process this file with autoreconf to produce Makefile.in.
|
|
|
|
|
|
|
|
# Go support.
|
|
|
|
SUFFIXES = .c .go .gox .o .obj .lo .a
|
|
|
|
|
|
|
|
if LIBGO_IS_RTEMS
|
|
|
|
subdirs = testsuite
|
|
|
|
endif
|
|
|
|
|
|
|
|
SUBDIRS = ${subdirs}
|
|
|
|
|
2014-11-03 17:30:51 +01:00
|
|
|
gcc_version := $(shell $(GOC) -dumpversion)
|
2010-12-07 15:18:35 +01:00
|
|
|
|
2010-12-03 05:34:57 +01:00
|
|
|
MAINT_CHARSET = latin1
|
|
|
|
|
|
|
|
mkinstalldirs = $(SHELL) $(toplevel_srcdir)/mkinstalldirs
|
|
|
|
PWD_COMMAND = $${PWDCMD-pwd}
|
|
|
|
STAMP = echo timestamp >
|
|
|
|
|
|
|
|
toolexecdir = $(glibgo_toolexecdir)
|
|
|
|
toolexeclibdir = $(glibgo_toolexeclibdir)
|
2012-02-14 20:40:09 +01:00
|
|
|
toolexeclibgodir = $(nover_glibgo_toolexeclibdir)/go/$(gcc_version)/$(target_alias)
|
2015-01-07 00:26:02 +01:00
|
|
|
libexecsubdir = $(libexecdir)/gcc/$(target_alias)/$(gcc_version)
|
2010-12-03 05:34:57 +01:00
|
|
|
|
|
|
|
LIBFFI = @LIBFFI@
|
|
|
|
LIBFFIINCS = @LIBFFIINCS@
|
|
|
|
|
2014-05-29 22:22:27 +02:00
|
|
|
LIBATOMIC = @LIBATOMIC@
|
|
|
|
|
2010-12-03 05:34:57 +01:00
|
|
|
WARN_CFLAGS = $(WARN_FLAGS) $(WERROR)
|
|
|
|
|
|
|
|
# -I/-D flags to pass when compiling.
|
2010-12-03 22:27:06 +01:00
|
|
|
AM_CPPFLAGS = -I $(srcdir)/runtime $(LIBFFIINCS) $(PTHREAD_CFLAGS)
|
2010-12-03 05:34:57 +01:00
|
|
|
|
|
|
|
ACLOCAL_AMFLAGS = -I ./config -I ../config
|
|
|
|
|
2013-11-06 20:49:01 +01:00
|
|
|
AM_CFLAGS = -fexceptions -fnon-call-exceptions -fplan9-extensions \
|
|
|
|
$(SPLIT_STACK) $(WARN_CFLAGS) \
|
2011-12-20 19:14:30 +01:00
|
|
|
$(STRINGOPS_FLAG) $(OSCFLAGS) \
|
2012-09-28 16:48:30 +02:00
|
|
|
-I $(srcdir)/../libgcc -I $(srcdir)/../libbacktrace \
|
|
|
|
-I $(MULTIBUILDTOP)../../gcc/include
|
2010-12-03 05:34:57 +01:00
|
|
|
|
|
|
|
if USING_SPLIT_STACK
|
|
|
|
AM_LDFLAGS = -XCClinker $(SPLIT_STACK)
|
|
|
|
endif
|
|
|
|
|
|
|
|
# Multilib support.
|
|
|
|
MAKEOVERRIDES=
|
|
|
|
|
|
|
|
# Work around what appears to be a GNU make handling MAKEFLAGS
|
|
|
|
# values defined in terms of make variables, as is the case for CC and
|
|
|
|
# friends when we are called from the top level Makefile.
|
|
|
|
AM_MAKEFLAGS = \
|
|
|
|
"AR_FLAGS=$(AR_FLAGS)" \
|
|
|
|
"CC_FOR_BUILD=$(CC_FOR_BUILD)" \
|
|
|
|
"CC_FOR_TARGET=$(CC_FOR_TARGET)" \
|
|
|
|
"CFLAGS=$(CFLAGS)" \
|
|
|
|
"CXXFLAGS=$(CXXFLAGS)" \
|
|
|
|
"CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
|
|
|
|
"CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
|
|
|
|
"GOC_FOR_TARGET=$(GOC_FOR_TARGET)" \
|
|
|
|
"GOC=$(GOC)" \
|
|
|
|
"GOCFLAGS=$(GOCFLAGS)" \
|
|
|
|
"INSTALL=$(INSTALL)" \
|
|
|
|
"INSTALL_DATA=$(INSTALL_DATA)" \
|
|
|
|
"INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
|
|
|
|
"INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
|
|
|
|
"LDFLAGS=$(LDFLAGS)" \
|
|
|
|
"LIBCFLAGS=$(LIBCFLAGS)" \
|
|
|
|
"LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
|
|
|
|
"MAKE=$(MAKE)" \
|
|
|
|
"MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
|
|
|
|
"PICFLAG=$(PICFLAG)" \
|
|
|
|
"PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
|
|
|
|
"SHELL=$(SHELL)" \
|
|
|
|
"RUNTESTFLAGS=$(RUNTESTFLAGS)" \
|
|
|
|
"exec_prefix=$(exec_prefix)" \
|
|
|
|
"infodir=$(infodir)" \
|
|
|
|
"libdir=$(libdir)" \
|
|
|
|
"includedir=$(includedir)" \
|
|
|
|
"prefix=$(prefix)" \
|
|
|
|
"tooldir=$(tooldir)" \
|
|
|
|
"gxx_include_dir=$(gxx_include_dir)" \
|
|
|
|
"AR=$(AR)" \
|
|
|
|
"AS=$(AS)" \
|
|
|
|
"LD=$(LD)" \
|
|
|
|
"RANLIB=$(RANLIB)" \
|
|
|
|
"NM=$(NM)" \
|
|
|
|
"NM_FOR_BUILD=$(NM_FOR_BUILD)" \
|
|
|
|
"NM_FOR_TARGET=$(NM_FOR_TARGET)" \
|
|
|
|
"DESTDIR=$(DESTDIR)" \
|
|
|
|
"WERROR=$(WERROR)"
|
|
|
|
|
|
|
|
# Subdir rules rely on $(FLAGS_TO_PASS)
|
|
|
|
FLAGS_TO_PASS = $(AM_MAKEFLAGS)
|
|
|
|
|
2014-11-14 19:02:50 +01:00
|
|
|
if GOC_IS_LLGO
|
|
|
|
toolexeclib_LTLIBRARIES = libgo-llgo.la
|
|
|
|
toolexeclib_LIBRARIES = libgobegin-llgo.a
|
|
|
|
else
|
2010-12-03 05:34:57 +01:00
|
|
|
toolexeclib_LTLIBRARIES = libgo.la
|
2016-10-30 17:45:34 +01:00
|
|
|
toolexeclib_LIBRARIES = libgobegin.a libgolibbegin.a
|
2014-11-14 19:02:50 +01:00
|
|
|
endif
|
2010-12-03 05:34:57 +01:00
|
|
|
|
2010-12-07 15:18:35 +01:00
|
|
|
toolexeclibgo_DATA = \
|
2010-12-03 05:34:57 +01:00
|
|
|
bufio.gox \
|
|
|
|
bytes.gox \
|
2016-07-22 20:15:38 +02:00
|
|
|
context.gox \
|
2011-03-17 00:05:44 +01:00
|
|
|
crypto.gox \
|
2013-11-06 20:49:01 +01:00
|
|
|
encoding.gox \
|
2011-12-03 03:17:34 +01:00
|
|
|
errors.gox \
|
2010-12-03 05:34:57 +01:00
|
|
|
expvar.gox \
|
|
|
|
flag.gox \
|
|
|
|
fmt.gox \
|
|
|
|
hash.gox \
|
|
|
|
html.gox \
|
|
|
|
image.gox \
|
|
|
|
io.gox \
|
|
|
|
log.gox \
|
|
|
|
math.gox \
|
|
|
|
mime.gox \
|
|
|
|
net.gox \
|
|
|
|
os.gox \
|
|
|
|
path.gox \
|
|
|
|
reflect.gox \
|
|
|
|
regexp.gox \
|
|
|
|
runtime.gox \
|
|
|
|
sort.gox \
|
|
|
|
strconv.gox \
|
|
|
|
strings.gox \
|
|
|
|
sync.gox \
|
|
|
|
syscall.gox \
|
|
|
|
testing.gox \
|
|
|
|
time.gox \
|
2012-02-01 20:26:59 +01:00
|
|
|
unicode.gox
|
2010-12-03 05:34:57 +01:00
|
|
|
|
2010-12-07 15:18:35 +01:00
|
|
|
toolexeclibgoarchivedir = $(toolexeclibgodir)/archive
|
2010-12-03 05:34:57 +01:00
|
|
|
|
2010-12-07 15:18:35 +01:00
|
|
|
toolexeclibgoarchive_DATA = \
|
2010-12-03 05:34:57 +01:00
|
|
|
archive/tar.gox \
|
|
|
|
archive/zip.gox
|
|
|
|
|
2010-12-07 15:18:35 +01:00
|
|
|
toolexeclibgocompressdir = $(toolexeclibgodir)/compress
|
2010-12-03 05:34:57 +01:00
|
|
|
|
2010-12-07 15:18:35 +01:00
|
|
|
toolexeclibgocompress_DATA = \
|
2011-03-17 00:05:44 +01:00
|
|
|
compress/bzip2.gox \
|
2010-12-03 05:34:57 +01:00
|
|
|
compress/flate.gox \
|
|
|
|
compress/gzip.gox \
|
2011-03-17 00:05:44 +01:00
|
|
|
compress/lzw.gox \
|
2010-12-03 05:34:57 +01:00
|
|
|
compress/zlib.gox
|
|
|
|
|
2010-12-07 15:18:35 +01:00
|
|
|
toolexeclibgocontainerdir = $(toolexeclibgodir)/container
|
2010-12-03 05:34:57 +01:00
|
|
|
|
2010-12-07 15:18:35 +01:00
|
|
|
toolexeclibgocontainer_DATA = \
|
2010-12-03 05:34:57 +01:00
|
|
|
container/heap.gox \
|
|
|
|
container/list.gox \
|
2011-10-27 01:57:58 +02:00
|
|
|
container/ring.gox
|
2010-12-03 05:34:57 +01:00
|
|
|
|
2010-12-07 15:18:35 +01:00
|
|
|
toolexeclibgocryptodir = $(toolexeclibgodir)/crypto
|
2010-12-03 05:34:57 +01:00
|
|
|
|
2010-12-07 15:18:35 +01:00
|
|
|
toolexeclibgocrypto_DATA = \
|
2010-12-03 05:34:57 +01:00
|
|
|
crypto/aes.gox \
|
2011-01-21 19:19:03 +01:00
|
|
|
crypto/cipher.gox \
|
2011-04-07 19:09:10 +02:00
|
|
|
crypto/des.gox \
|
2011-03-17 00:05:44 +01:00
|
|
|
crypto/dsa.gox \
|
2011-03-25 00:46:17 +01:00
|
|
|
crypto/ecdsa.gox \
|
2011-01-21 19:19:03 +01:00
|
|
|
crypto/elliptic.gox \
|
2010-12-03 05:34:57 +01:00
|
|
|
crypto/hmac.gox \
|
|
|
|
crypto/md5.gox \
|
|
|
|
crypto/rand.gox \
|
|
|
|
crypto/rc4.gox \
|
|
|
|
crypto/rsa.gox \
|
|
|
|
crypto/sha1.gox \
|
|
|
|
crypto/sha256.gox \
|
|
|
|
crypto/sha512.gox \
|
|
|
|
crypto/subtle.gox \
|
|
|
|
crypto/tls.gox \
|
2012-02-01 20:26:59 +01:00
|
|
|
crypto/x509.gox
|
2011-01-21 19:19:03 +01:00
|
|
|
|
2011-09-16 17:47:21 +02:00
|
|
|
toolexeclibgocryptox509dir = $(toolexeclibgocryptodir)/x509
|
|
|
|
|
|
|
|
toolexeclibgocryptox509_DATA = \
|
|
|
|
crypto/x509/pkix.gox
|
|
|
|
|
2012-01-25 22:54:22 +01:00
|
|
|
toolexeclibgodatabasedir = $(toolexeclibgodir)/database
|
|
|
|
|
|
|
|
toolexeclibgodatabase_DATA = \
|
|
|
|
database/sql.gox
|
|
|
|
|
|
|
|
toolexeclibgodatabasesqldir = $(toolexeclibgodatabasedir)/sql
|
|
|
|
|
|
|
|
toolexeclibgodatabasesql_DATA = \
|
|
|
|
database/sql/driver.gox
|
|
|
|
|
2010-12-07 15:18:35 +01:00
|
|
|
toolexeclibgodebugdir = $(toolexeclibgodir)/debug
|
2010-12-03 05:34:57 +01:00
|
|
|
|
2010-12-07 15:18:35 +01:00
|
|
|
toolexeclibgodebug_DATA = \
|
2010-12-03 05:34:57 +01:00
|
|
|
debug/dwarf.gox \
|
|
|
|
debug/elf.gox \
|
|
|
|
debug/gosym.gox \
|
|
|
|
debug/macho.gox \
|
2014-06-07 00:37:27 +02:00
|
|
|
debug/pe.gox \
|
|
|
|
debug/plan9obj.gox
|
2010-12-03 05:34:57 +01:00
|
|
|
|
2010-12-07 15:18:35 +01:00
|
|
|
toolexeclibgoencodingdir = $(toolexeclibgodir)/encoding
|
2010-12-03 05:34:57 +01:00
|
|
|
|
2010-12-07 15:18:35 +01:00
|
|
|
toolexeclibgoencoding_DATA = \
|
2010-12-03 05:34:57 +01:00
|
|
|
encoding/ascii85.gox \
|
2011-12-07 02:11:29 +01:00
|
|
|
encoding/asn1.gox \
|
2011-01-21 19:19:03 +01:00
|
|
|
encoding/base32.gox \
|
2010-12-03 05:34:57 +01:00
|
|
|
encoding/base64.gox \
|
|
|
|
encoding/binary.gox \
|
2011-12-07 02:11:29 +01:00
|
|
|
encoding/csv.gox \
|
|
|
|
encoding/gob.gox \
|
2010-12-03 05:34:57 +01:00
|
|
|
encoding/hex.gox \
|
2011-12-07 02:11:29 +01:00
|
|
|
encoding/json.gox \
|
|
|
|
encoding/pem.gox \
|
|
|
|
encoding/xml.gox
|
2010-12-03 05:34:57 +01:00
|
|
|
|
2010-12-07 15:18:35 +01:00
|
|
|
toolexeclibgoexpdir = $(toolexeclibgodir)/exp
|
2010-12-03 05:34:57 +01:00
|
|
|
|
2010-12-07 15:18:35 +01:00
|
|
|
toolexeclibgoexp_DATA = \
|
2012-01-25 21:56:26 +01:00
|
|
|
exp/proxy.gox \
|
2013-07-16 08:54:42 +02:00
|
|
|
exp/terminal.gox
|
2012-10-23 06:31:11 +02:00
|
|
|
|
2010-12-07 15:18:35 +01:00
|
|
|
toolexeclibgogodir = $(toolexeclibgodir)/go
|
2010-12-03 05:34:57 +01:00
|
|
|
|
2010-12-07 15:18:35 +01:00
|
|
|
toolexeclibgogo_DATA = \
|
2010-12-03 05:34:57 +01:00
|
|
|
go/ast.gox \
|
2011-09-16 17:47:21 +02:00
|
|
|
go/build.gox \
|
2015-10-31 01:59:47 +01:00
|
|
|
go/constant.gox \
|
2010-12-03 05:34:57 +01:00
|
|
|
go/doc.gox \
|
2012-12-13 00:13:29 +01:00
|
|
|
go/format.gox \
|
2015-10-31 01:59:47 +01:00
|
|
|
go/importer.gox \
|
2010-12-03 05:34:57 +01:00
|
|
|
go/parser.gox \
|
|
|
|
go/printer.gox \
|
|
|
|
go/scanner.gox \
|
2015-10-31 01:59:47 +01:00
|
|
|
go/token.gox \
|
|
|
|
go/types.gox
|
2010-12-03 05:34:57 +01:00
|
|
|
|
2010-12-07 15:18:35 +01:00
|
|
|
toolexeclibgohashdir = $(toolexeclibgodir)/hash
|
2010-12-03 05:34:57 +01:00
|
|
|
|
2010-12-07 15:18:35 +01:00
|
|
|
toolexeclibgohash_DATA = \
|
2010-12-03 05:34:57 +01:00
|
|
|
hash/adler32.gox \
|
|
|
|
hash/crc32.gox \
|
2011-03-25 00:46:17 +01:00
|
|
|
hash/crc64.gox \
|
|
|
|
hash/fnv.gox
|
2010-12-03 05:34:57 +01:00
|
|
|
|
2011-12-07 02:11:29 +01:00
|
|
|
toolexeclibgohtmldir = $(toolexeclibgodir)/html
|
2010-12-03 05:34:57 +01:00
|
|
|
|
2011-12-07 02:11:29 +01:00
|
|
|
toolexeclibgohtml_DATA = \
|
|
|
|
html/template.gox
|
2010-12-03 05:34:57 +01:00
|
|
|
|
2010-12-07 15:18:35 +01:00
|
|
|
toolexeclibgoimagedir = $(toolexeclibgodir)/image
|
2010-12-03 05:34:57 +01:00
|
|
|
|
2010-12-07 15:18:35 +01:00
|
|
|
toolexeclibgoimage_DATA = \
|
2011-10-27 01:57:58 +02:00
|
|
|
image/color.gox \
|
2011-09-16 17:47:21 +02:00
|
|
|
image/draw.gox \
|
2011-05-20 02:18:15 +02:00
|
|
|
image/gif.gox \
|
2010-12-03 05:34:57 +01:00
|
|
|
image/jpeg.gox \
|
2012-02-09 09:19:58 +01:00
|
|
|
image/png.gox
|
2010-12-03 05:34:57 +01:00
|
|
|
|
2013-11-06 20:49:01 +01:00
|
|
|
toolexeclibgoimagecolordir = $(toolexeclibgoimagedir)/color
|
|
|
|
|
|
|
|
toolexeclibgoimagecolor_DATA = \
|
|
|
|
image/color/palette.gox
|
|
|
|
|
2010-12-07 15:18:35 +01:00
|
|
|
toolexeclibgoindexdir = $(toolexeclibgodir)/index
|
2010-12-03 05:34:57 +01:00
|
|
|
|
2010-12-07 15:18:35 +01:00
|
|
|
toolexeclibgoindex_DATA = \
|
2010-12-03 05:34:57 +01:00
|
|
|
index/suffixarray.gox
|
|
|
|
|
2010-12-07 15:18:35 +01:00
|
|
|
toolexeclibgoiodir = $(toolexeclibgodir)/io
|
2010-12-03 05:34:57 +01:00
|
|
|
|
2010-12-07 15:18:35 +01:00
|
|
|
toolexeclibgoio_DATA = \
|
2010-12-03 05:34:57 +01:00
|
|
|
io/ioutil.gox
|
|
|
|
|
2011-12-07 02:11:29 +01:00
|
|
|
toolexeclibgologdir = $(toolexeclibgodir)/log
|
|
|
|
|
|
|
|
toolexeclibgolog_DATA = \
|
|
|
|
log/syslog.gox
|
|
|
|
|
|
|
|
toolexeclibgomathdir = $(toolexeclibgodir)/math
|
|
|
|
|
|
|
|
toolexeclibgomath_DATA = \
|
|
|
|
math/big.gox \
|
|
|
|
math/cmplx.gox \
|
|
|
|
math/rand.gox
|
|
|
|
|
2010-12-07 15:18:35 +01:00
|
|
|
toolexeclibgomimedir = $(toolexeclibgodir)/mime
|
2010-12-03 05:34:57 +01:00
|
|
|
|
2010-12-07 15:18:35 +01:00
|
|
|
toolexeclibgomime_DATA = \
|
2015-10-31 01:59:47 +01:00
|
|
|
mime/multipart.gox \
|
|
|
|
mime/quotedprintable.gox
|
2010-12-03 05:34:57 +01:00
|
|
|
|
2010-12-07 15:18:35 +01:00
|
|
|
toolexeclibgonetdir = $(toolexeclibgodir)/net
|
2010-12-03 05:34:57 +01:00
|
|
|
|
2010-12-07 15:18:35 +01:00
|
|
|
toolexeclibgonet_DATA = \
|
2011-12-07 02:11:29 +01:00
|
|
|
net/http.gox \
|
|
|
|
net/mail.gox \
|
|
|
|
net/rpc.gox \
|
|
|
|
net/smtp.gox \
|
|
|
|
net/textproto.gox \
|
|
|
|
net/url.gox
|
|
|
|
|
|
|
|
toolexeclibgonethttpdir = $(toolexeclibgonetdir)/http
|
|
|
|
|
|
|
|
toolexeclibgonethttp_DATA = \
|
|
|
|
net/http/cgi.gox \
|
2013-07-16 08:54:42 +02:00
|
|
|
net/http/cookiejar.gox \
|
2011-12-07 02:11:29 +01:00
|
|
|
net/http/fcgi.gox \
|
|
|
|
net/http/httptest.gox \
|
2016-07-22 20:15:38 +02:00
|
|
|
net/http/httptrace.gox \
|
2011-12-07 02:11:29 +01:00
|
|
|
net/http/httputil.gox \
|
|
|
|
net/http/pprof.gox
|
|
|
|
|
|
|
|
toolexeclibgonetrpcdir = $(toolexeclibgonetdir)/rpc
|
|
|
|
|
|
|
|
toolexeclibgonetrpc_DATA = \
|
|
|
|
net/rpc/jsonrpc.gox
|
2010-12-03 05:34:57 +01:00
|
|
|
|
2010-12-07 15:18:35 +01:00
|
|
|
toolexeclibgoosdir = $(toolexeclibgodir)/os
|
2010-12-03 05:34:57 +01:00
|
|
|
|
2010-12-07 15:18:35 +01:00
|
|
|
toolexeclibgoos_DATA = \
|
2011-12-07 02:11:29 +01:00
|
|
|
os/exec.gox \
|
2012-03-02 17:38:43 +01:00
|
|
|
os/signal.gox \
|
2012-02-09 09:19:58 +01:00
|
|
|
os/user.gox
|
2010-12-03 05:34:57 +01:00
|
|
|
|
2011-03-25 00:46:17 +01:00
|
|
|
toolexeclibgopathdir = $(toolexeclibgodir)/path
|
|
|
|
|
|
|
|
toolexeclibgopath_DATA = \
|
|
|
|
path/filepath.gox
|
|
|
|
|
2011-10-27 01:57:58 +02:00
|
|
|
toolexeclibgoregexpdir = $(toolexeclibgodir)/regexp
|
|
|
|
|
|
|
|
toolexeclibgoregexp_DATA = \
|
|
|
|
regexp/syntax.gox
|
|
|
|
|
2010-12-07 15:18:35 +01:00
|
|
|
toolexeclibgoruntimedir = $(toolexeclibgodir)/runtime
|
2010-12-03 05:34:57 +01:00
|
|
|
|
2010-12-07 15:18:35 +01:00
|
|
|
toolexeclibgoruntime_DATA = \
|
2011-01-21 19:19:03 +01:00
|
|
|
runtime/debug.gox \
|
2010-12-03 05:34:57 +01:00
|
|
|
runtime/pprof.gox
|
|
|
|
|
2011-03-17 00:05:44 +01:00
|
|
|
toolexeclibgosyncdir = $(toolexeclibgodir)/sync
|
|
|
|
|
|
|
|
toolexeclibgosync_DATA = \
|
|
|
|
sync/atomic.gox
|
|
|
|
|
2010-12-07 15:18:35 +01:00
|
|
|
toolexeclibgotestingdir = $(toolexeclibgodir)/testing
|
2010-12-03 05:34:57 +01:00
|
|
|
|
2010-12-07 15:18:35 +01:00
|
|
|
toolexeclibgotesting_DATA = \
|
2010-12-03 05:34:57 +01:00
|
|
|
testing/iotest.gox \
|
2012-03-02 17:38:43 +01:00
|
|
|
testing/quick.gox
|
2010-12-03 05:34:57 +01:00
|
|
|
|
2011-12-07 02:11:29 +01:00
|
|
|
toolexeclibgotextdir = $(toolexeclibgodir)/text
|
|
|
|
|
|
|
|
toolexeclibgotext_DATA = \
|
|
|
|
text/scanner.gox \
|
|
|
|
text/tabwriter.gox \
|
|
|
|
text/template.gox
|
|
|
|
|
|
|
|
toolexeclibgotexttemplatedir = $(toolexeclibgotextdir)/template
|
|
|
|
|
|
|
|
toolexeclibgotexttemplate_DATA = \
|
|
|
|
text/template/parse.gox
|
|
|
|
|
|
|
|
toolexeclibgounicodedir = $(toolexeclibgodir)/unicode
|
|
|
|
|
|
|
|
toolexeclibgounicode_DATA = \
|
|
|
|
unicode/utf16.gox \
|
|
|
|
unicode/utf8.gox
|
|
|
|
|
2010-12-03 05:34:57 +01:00
|
|
|
if HAVE_SYS_MMAN_H
|
|
|
|
runtime_mem_file = runtime/mem.c
|
|
|
|
else
|
|
|
|
runtime_mem_file = runtime/mem_posix_memalign.c
|
|
|
|
endif
|
|
|
|
|
|
|
|
if LIBGO_IS_RTEMS
|
|
|
|
rtems_task_variable_add_file = runtime/rtems-task-variable-add.c
|
|
|
|
else
|
|
|
|
rtems_task_variable_add_file =
|
|
|
|
endif
|
|
|
|
|
2011-11-22 21:24:44 +01:00
|
|
|
if LIBGO_IS_LINUX
|
2016-09-30 15:45:08 +02:00
|
|
|
runtime_thread_files = runtime/thread-linux.c
|
2011-11-22 21:24:44 +01:00
|
|
|
else
|
2016-09-30 15:45:08 +02:00
|
|
|
runtime_thread_files = runtime/thread-sema.c
|
2011-11-22 21:24:44 +01:00
|
|
|
endif
|
|
|
|
|
2012-08-07 06:42:49 +02:00
|
|
|
if LIBGO_IS_LINUX
|
|
|
|
runtime_getncpu_file = runtime/getncpu-linux.c
|
|
|
|
else
|
|
|
|
if LIBGO_IS_DARWIN
|
|
|
|
runtime_getncpu_file = runtime/getncpu-bsd.c
|
|
|
|
else
|
|
|
|
if LIBGO_IS_IRIX
|
|
|
|
runtime_getncpu_file = runtime/getncpu-irix.c
|
|
|
|
else
|
|
|
|
if LIBGO_IS_SOLARIS
|
|
|
|
runtime_getncpu_file = runtime/getncpu-solaris.c
|
|
|
|
else
|
|
|
|
if LIBGO_IS_FREEBSD
|
|
|
|
runtime_getncpu_file = runtime/getncpu-bsd.c
|
|
|
|
else
|
|
|
|
if LIBGO_IS_NETBSD
|
|
|
|
runtime_getncpu_file = runtime/getncpu-bsd.c
|
|
|
|
else
|
|
|
|
runtime_getncpu_file = runtime/getncpu-none.c
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2010-12-03 05:34:57 +01:00
|
|
|
runtime_files = \
|
|
|
|
runtime/go-assert.c \
|
|
|
|
runtime/go-breakpoint.c \
|
|
|
|
runtime/go-caller.c \
|
2012-03-02 17:38:43 +01:00
|
|
|
runtime/go-callers.c \
|
2013-10-10 00:31:15 +02:00
|
|
|
runtime/go-cdiv.c \
|
2011-01-11 19:59:30 +01:00
|
|
|
runtime/go-cgo.c \
|
2010-12-03 05:34:57 +01:00
|
|
|
runtime/go-construct-map.c \
|
|
|
|
runtime/go-defer.c \
|
|
|
|
runtime/go-deferred-recover.c \
|
2014-07-19 23:36:26 +02:00
|
|
|
runtime/go-ffi.c \
|
2012-11-29 19:11:17 +01:00
|
|
|
runtime/go-fieldtrack.c \
|
2012-02-08 23:35:30 +01:00
|
|
|
runtime/go-matherr.c \
|
compiler, runtime: replace hashmap code with Go 1.7 hashmap
This change removes the gccgo-specific hashmap code and replaces it with
the hashmap code from the Go 1.7 runtime. The Go 1.7 hashmap code is
more efficient, does a better job on details like when to update a key,
and provides some support against denial-of-service attacks.
The compiler is changed to call the new hashmap functions instead of the
old ones.
The compiler now tracks which types are reflexive and which require
updating when used as a map key, and records the information in map type
descriptors.
Map_index_expression is simplified. The special case for a map index on
the right hand side of a tuple expression has been unnecessary for some
time, and is removed. The support for specially marking a map index as
an lvalue is removed, in favor of lowering an assignment to a map index
into a function call. The long-obsolete support for a map index of a
pointer to a map is removed.
The __go_new_map_big function (known to the compiler as
Runtime::MAKEMAPBIG) is no longer needed, as the new runtime.makemap
function takes an int64 hint argument.
The old map descriptor type and supporting expression is removed.
The compiler was still supporting the long-obsolete syntax `m[k] = 0,
false` to delete a value from a map. That is now removed, requiring a
change to one of the gccgo-specific tests.
The builtin len function applied to a map or channel p is now compiled
as `p == nil ? 0 : *(*int)(p)`. The __go_chan_len function (known to
the compiler as Runtime::CHAN_LEN) is removed.
Support for a shared zero value for maps to large value types is
introduced, along the lines of the gc compiler. The zero value is
handled as a common variable.
The hash function is changed to take a seed argument, changing the
runtime hash functions and the compiler-generated hash functions.
Unlike the gc compiler, both the hash and equal functions continue to
take the type length.
Types that can not be compared now store nil for the hash and equal
functions, rather than pointing to functions that throw. Interface hash
and comparison functions now check explicitly for nil. This matches the
gc compiler and permits a simple implementation for ismapkey.
The compiler is changed to permit marking struct and array types as
incomparable, meaning that they have no hash or equal function. We use
this for thunk types, removing the existing special code to avoid
generating hash/equal functions for them.
The C runtime code adds memclr, memequal, and memmove functions.
The hashmap code uses go:linkname comments to make the functions
visible, as otherwise the compiler would discard them.
The hashmap code comments out the unused reference to the address of the
first parameter in the race code, as otherwise the compiler thinks that
the parameter escapes and copies it onto the heap. This is probably not
needed when we enable escape analysis.
Several runtime map tests that ere previously skipped for gccgo are now
run.
The Go runtime picks up type kind information and stubs. The type kind
information causes the generated runtime header file to define some
constants, including `empty`, and the C code is adjusted accordingly.
A Go-callable version of runtime.throw, that takes a Go string, is
added to be called from the hashmap code.
Reviewed-on: https://go-review.googlesource.com/29447
* go.go-torture/execute/map-1.go: Replace old map deletion syntax
with call to builtin delete function.
From-SVN: r240334
2016-09-21 22:58:51 +02:00
|
|
|
runtime/go-memclr.c \
|
2012-11-06 19:12:45 +01:00
|
|
|
runtime/go-memcmp.c \
|
compiler, runtime: replace hashmap code with Go 1.7 hashmap
This change removes the gccgo-specific hashmap code and replaces it with
the hashmap code from the Go 1.7 runtime. The Go 1.7 hashmap code is
more efficient, does a better job on details like when to update a key,
and provides some support against denial-of-service attacks.
The compiler is changed to call the new hashmap functions instead of the
old ones.
The compiler now tracks which types are reflexive and which require
updating when used as a map key, and records the information in map type
descriptors.
Map_index_expression is simplified. The special case for a map index on
the right hand side of a tuple expression has been unnecessary for some
time, and is removed. The support for specially marking a map index as
an lvalue is removed, in favor of lowering an assignment to a map index
into a function call. The long-obsolete support for a map index of a
pointer to a map is removed.
The __go_new_map_big function (known to the compiler as
Runtime::MAKEMAPBIG) is no longer needed, as the new runtime.makemap
function takes an int64 hint argument.
The old map descriptor type and supporting expression is removed.
The compiler was still supporting the long-obsolete syntax `m[k] = 0,
false` to delete a value from a map. That is now removed, requiring a
change to one of the gccgo-specific tests.
The builtin len function applied to a map or channel p is now compiled
as `p == nil ? 0 : *(*int)(p)`. The __go_chan_len function (known to
the compiler as Runtime::CHAN_LEN) is removed.
Support for a shared zero value for maps to large value types is
introduced, along the lines of the gc compiler. The zero value is
handled as a common variable.
The hash function is changed to take a seed argument, changing the
runtime hash functions and the compiler-generated hash functions.
Unlike the gc compiler, both the hash and equal functions continue to
take the type length.
Types that can not be compared now store nil for the hash and equal
functions, rather than pointing to functions that throw. Interface hash
and comparison functions now check explicitly for nil. This matches the
gc compiler and permits a simple implementation for ismapkey.
The compiler is changed to permit marking struct and array types as
incomparable, meaning that they have no hash or equal function. We use
this for thunk types, removing the existing special code to avoid
generating hash/equal functions for them.
The C runtime code adds memclr, memequal, and memmove functions.
The hashmap code uses go:linkname comments to make the functions
visible, as otherwise the compiler would discard them.
The hashmap code comments out the unused reference to the address of the
first parameter in the race code, as otherwise the compiler thinks that
the parameter escapes and copies it onto the heap. This is probably not
needed when we enable escape analysis.
Several runtime map tests that ere previously skipped for gccgo are now
run.
The Go runtime picks up type kind information and stubs. The type kind
information causes the generated runtime header file to define some
constants, including `empty`, and the C code is adjusted accordingly.
A Go-callable version of runtime.throw, that takes a Go string, is
added to be called from the hashmap code.
Reviewed-on: https://go-review.googlesource.com/29447
* go.go-torture/execute/map-1.go: Replace old map deletion syntax
with call to builtin delete function.
From-SVN: r240334
2016-09-21 22:58:51 +02:00
|
|
|
runtime/go-memequal.c \
|
|
|
|
runtime/go-memmove.c \
|
2010-12-03 05:34:57 +01:00
|
|
|
runtime/go-nanotime.c \
|
2011-12-13 20:16:27 +01:00
|
|
|
runtime/go-now.c \
|
2010-12-03 05:34:57 +01:00
|
|
|
runtime/go-new.c \
|
2012-01-26 21:24:01 +01:00
|
|
|
runtime/go-nosys.c \
|
2010-12-03 05:34:57 +01:00
|
|
|
runtime/go-panic.c \
|
|
|
|
runtime/go-recover.c \
|
|
|
|
runtime/go-reflect-call.c \
|
|
|
|
runtime/go-runtime-error.c \
|
2011-05-20 02:18:15 +02:00
|
|
|
runtime/go-setenv.c \
|
2010-12-03 05:34:57 +01:00
|
|
|
runtime/go-signal.c \
|
|
|
|
runtime/go-strslice.c \
|
2012-01-06 22:47:49 +01:00
|
|
|
runtime/go-type-complex.c \
|
|
|
|
runtime/go-type-float.c \
|
2010-12-03 05:34:57 +01:00
|
|
|
runtime/go-type-identity.c \
|
|
|
|
runtime/go-type-string.c \
|
|
|
|
runtime/go-typedesc-equal.c \
|
|
|
|
runtime/go-unsafe-new.c \
|
|
|
|
runtime/go-unsafe-newarray.c \
|
|
|
|
runtime/go-unsafe-pointer.c \
|
2015-01-15 01:27:56 +01:00
|
|
|
runtime/go-unsetenv.c \
|
2010-12-03 05:34:57 +01:00
|
|
|
runtime/go-unwind.c \
|
2013-11-24 03:38:28 +01:00
|
|
|
runtime/go-varargs.c \
|
2012-12-22 02:15:33 +01:00
|
|
|
runtime/env_posix.c \
|
2014-07-19 10:53:52 +02:00
|
|
|
runtime/heapdump.c \
|
2010-12-03 05:34:57 +01:00
|
|
|
runtime/mcache.c \
|
|
|
|
runtime/mcentral.c \
|
|
|
|
$(runtime_mem_file) \
|
|
|
|
runtime/mfixalloc.c \
|
|
|
|
runtime/mgc0.c \
|
|
|
|
runtime/mheap.c \
|
|
|
|
runtime/msize.c \
|
2012-10-23 06:31:11 +02:00
|
|
|
runtime/panic.c \
|
|
|
|
runtime/parfor.c \
|
2012-05-24 22:44:34 +02:00
|
|
|
runtime/print.c \
|
2010-12-03 05:34:57 +01:00
|
|
|
runtime/proc.c \
|
2016-10-30 17:45:34 +01:00
|
|
|
runtime/runtime_c.c \
|
2010-12-03 05:34:57 +01:00
|
|
|
runtime/thread.c \
|
2016-09-30 15:45:08 +02:00
|
|
|
$(runtime_thread_files) \
|
2011-10-27 01:57:58 +02:00
|
|
|
runtime/yield.c \
|
2010-12-03 05:34:57 +01:00
|
|
|
$(rtems_task_variable_add_file) \
|
|
|
|
malloc.c \
|
2012-08-07 06:42:49 +02:00
|
|
|
$(runtime_getncpu_file)
|
2010-12-03 05:34:57 +01:00
|
|
|
|
|
|
|
goc2c.$(OBJEXT): runtime/goc2c.c
|
|
|
|
$(CC_FOR_BUILD) -c $(CFLAGS_FOR_BUILD) $<
|
|
|
|
|
|
|
|
goc2c: goc2c.$(OBJEXT)
|
|
|
|
$(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) -o $@ $<
|
|
|
|
|
|
|
|
malloc.c: $(srcdir)/runtime/malloc.goc goc2c
|
2012-10-31 21:49:53 +01:00
|
|
|
./goc2c $< > $@.tmp
|
2010-12-03 05:34:57 +01:00
|
|
|
mv -f $@.tmp $@
|
|
|
|
|
|
|
|
%.c: $(srcdir)/runtime/%.goc goc2c
|
2012-10-31 21:49:53 +01:00
|
|
|
./goc2c $< > $@.tmp
|
2010-12-03 05:34:57 +01:00
|
|
|
mv -f $@.tmp $@
|
|
|
|
|
|
|
|
version.go: s-version; @true
|
|
|
|
s-version: Makefile
|
|
|
|
rm -f version.go.tmp
|
2016-09-11 15:23:27 +02:00
|
|
|
echo "package sys" > version.go.tmp
|
|
|
|
echo 'const DefaultGoroot = "$(prefix)"' >> version.go.tmp
|
|
|
|
echo 'const TheVersion = "'`cat $(srcdir)/VERSION | sed 1q`' '`$(GOC) --version | sed 1q`'"' >> version.go.tmp
|
|
|
|
echo 'const GOARCH = "'$(GOARCH)'"' >> version.go.tmp
|
|
|
|
echo 'const GOOS = "'$(GOOS)'"' >> version.go.tmp
|
|
|
|
echo 'const GccgoToolDir = "$(libexecsubdir)"' >> version.go.tmp
|
|
|
|
echo >> version.go.tmp
|
|
|
|
echo "type ArchFamilyType int" >> version.go.tmp
|
|
|
|
echo >> version.go.tmp
|
|
|
|
echo "const (" >> version.go.tmp
|
|
|
|
echo " UNKNOWN ArchFamilyType = iota" >> version.go.tmp
|
|
|
|
for a in $(ALLGOARCHFAMILY); do \
|
|
|
|
echo " $${a}" >> version.go.tmp; \
|
|
|
|
done
|
|
|
|
echo ")" >> version.go.tmp
|
|
|
|
echo >> version.go.tmp
|
|
|
|
for a in $(ALLGOARCH); do \
|
|
|
|
f=`echo $${a} | sed -e 's/\(.\).*/\1/' -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`; \
|
|
|
|
n="$${f}`echo $${a} | sed -e 's/.//'`"; \
|
|
|
|
if test "$${a}" = "$(GOARCH)"; then \
|
|
|
|
echo "const Goarch$${n} = 1" >> version.go.tmp; \
|
|
|
|
else \
|
|
|
|
echo "const Goarch$${n} = 0" >> version.go.tmp; \
|
|
|
|
fi; \
|
|
|
|
done
|
|
|
|
echo >> version.go.tmp
|
|
|
|
echo "const (" >> version.go.tmp
|
|
|
|
echo " ArchFamily = $(GOARCH_FAMILY)" >> version.go.tmp
|
|
|
|
echo " BigEndian = $(GOARCH_BIGENDIAN)" >> version.go.tmp
|
|
|
|
echo " CacheLineSize = $(GOARCH_CACHELINESIZE)" >> version.go.tmp
|
|
|
|
echo " PhysPageSize = $(GOARCH_PHYSPAGESIZE)" >> version.go.tmp
|
|
|
|
echo " PCQuantum = $(GOARCH_PCQUANTUM)" >> version.go.tmp
|
|
|
|
echo " Int64Align = $(GOARCH_INT64ALIGN)" >> version.go.tmp
|
|
|
|
echo " HugePageSize = $(GOARCH_HUGEPAGESIZE)" >> version.go.tmp
|
|
|
|
echo " MinFrameSize = $(GOARCH_MINFRAMESIZE)" >> version.go.tmp
|
|
|
|
echo ")" >> version.go.tmp
|
|
|
|
echo >> version.go.tmp
|
|
|
|
for a in $(ALLGOOS); do \
|
|
|
|
f=`echo $${a} | sed -e 's/\(.\).*/\1/' -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`; \
|
|
|
|
n="$${f}`echo $${a} | sed -e 's/.//'`"; \
|
|
|
|
if test "$${a}" = "$(GOOS)"; then \
|
|
|
|
echo "const Goos$${n} = 1" >> version.go.tmp; \
|
|
|
|
else \
|
|
|
|
echo "const Goos$${n} = 0" >> version.go.tmp; \
|
|
|
|
fi; \
|
|
|
|
done
|
|
|
|
echo >> version.go.tmp
|
|
|
|
echo "type Uintreg uintptr" >> version.go.tmp
|
2014-12-01 02:06:29 +01:00
|
|
|
$(SHELL) $(srcdir)/mvifdiff.sh version.go.tmp version.go
|
2010-12-03 05:34:57 +01:00
|
|
|
$(STAMP) $@
|
|
|
|
|
2016-08-30 23:07:47 +02:00
|
|
|
runtime_sysinfo.go: s-runtime_sysinfo; @true
|
2016-09-30 15:45:08 +02:00
|
|
|
s-runtime_sysinfo: $(srcdir)/mkrsysinfo.sh gen-sysinfo.go
|
|
|
|
$(SHELL) $(srcdir)/mkrsysinfo.sh
|
2016-08-30 23:07:47 +02:00
|
|
|
$(SHELL) $(srcdir)/mvifdiff.sh tmp-runtime_sysinfo.go runtime_sysinfo.go
|
|
|
|
$(STAMP) $@
|
|
|
|
|
2016-11-10 23:53:23 +01:00
|
|
|
sigtab.go: s-sigtab; @true
|
|
|
|
s-sigtab: $(srcdir)/mksigtab.sh gen-sysinfo.go
|
|
|
|
GOOS=$(GOOS) $(SHELL) $(srcdir)/mksigtab.sh > tmp-sigtab.go
|
|
|
|
$(SHELL) $(srcdir)/mvifdiff.sh tmp-sigtab.go sigtab.go
|
|
|
|
$(STAMP) $@
|
|
|
|
|
2016-10-30 17:45:34 +01:00
|
|
|
runtime.inc: s-runtime-inc; @true
|
|
|
|
s-runtime-inc: runtime.lo Makefile
|
|
|
|
rm -f runtime.inc.tmp2
|
2016-11-01 14:50:03 +01:00
|
|
|
grep -v "#define _" runtime.inc.tmp | grep -v "#define c[01] " > runtime.inc.tmp2
|
|
|
|
for pattern in '_[GP][a-z]' _Max _Lock _Sig _Trace _MHeap _Num; do \
|
2016-10-30 17:45:34 +01:00
|
|
|
grep "#define $$pattern" runtime.inc.tmp >> runtime.inc.tmp2; \
|
|
|
|
done
|
|
|
|
$(SHELL) $(srcdir)/mvifdiff.sh runtime.inc.tmp2 runtime.inc
|
|
|
|
$(STAMP) $@
|
|
|
|
|
2015-03-24 20:50:31 +01:00
|
|
|
noinst_DATA = zstdpkglist.go
|
|
|
|
|
|
|
|
# Generate the list of go std packages that were included in libgo
|
|
|
|
zstdpkglist.go: s-zstdpkglist; @true
|
|
|
|
s-zstdpkglist: Makefile
|
|
|
|
rm -f zstdpkglist.go.tmp
|
|
|
|
echo 'package main' > zstdpkglist.go.tmp
|
|
|
|
echo "" >> zstdpkglist.go.tmp
|
|
|
|
echo 'var stdpkg = map[string]bool{' >> zstdpkglist.go.tmp
|
2016-11-01 14:50:03 +01:00
|
|
|
echo $(libgo_go_objs) 'unsafe.lo' 'runtime/cgo.lo' | sed 's/\.lo /\": true,\n/g' | grep -v _c | sed 's/\.lo/\": true,/' | sed 's/^/\t\"/' | sort -u >> zstdpkglist.go.tmp
|
2015-03-24 20:50:31 +01:00
|
|
|
echo '}' >> zstdpkglist.go.tmp
|
|
|
|
$(SHELL) $(srcdir)/mvifdiff.sh zstdpkglist.go.tmp zstdpkglist.go
|
|
|
|
$(STAMP) $@
|
|
|
|
|
2012-10-23 06:31:11 +02:00
|
|
|
if LIBGO_IS_LINUX
|
2016-08-06 02:36:33 +02:00
|
|
|
syscall_epoll_file = epoll.go
|
2016-07-22 20:15:38 +02:00
|
|
|
else
|
2016-08-06 02:36:33 +02:00
|
|
|
syscall_epoll_file =
|
2015-01-15 01:27:56 +01:00
|
|
|
endif
|
2015-10-31 01:59:47 +01:00
|
|
|
|
2011-10-23 21:04:37 +02:00
|
|
|
libcalls.go: s-libcalls; @true
|
2016-08-06 02:36:33 +02:00
|
|
|
s-libcalls: libcalls-list go/syscall/mksyscall.awk $(srcdir)/go/syscall/*.go
|
2011-10-23 21:04:37 +02:00
|
|
|
rm -f libcalls.go.tmp
|
2016-08-06 02:36:33 +02:00
|
|
|
$(AWK) -f $(srcdir)/go/syscall/mksyscall.awk `cat libcalls-list` > libcalls.go.tmp
|
2014-12-01 02:06:29 +01:00
|
|
|
$(SHELL) $(srcdir)/mvifdiff.sh libcalls.go.tmp libcalls.go
|
2011-10-23 21:04:37 +02:00
|
|
|
$(STAMP) $@
|
|
|
|
|
2013-02-20 21:04:36 +01:00
|
|
|
libcalls-list: s-libcalls-list; @true
|
2016-08-06 02:36:33 +02:00
|
|
|
s-libcalls-list: Makefile $(srcdir)/go/syscall/*.go
|
2013-02-20 21:04:36 +01:00
|
|
|
rm -f libcalls-list.tmp
|
2016-08-06 02:36:33 +02:00
|
|
|
$(SHELL) $(srcdir)/match.sh --goarch=$(GOARCH) --goos=$(GOOS) --srcdir=$(srcdir)/go/syscall $(matchargs_syscall) > libcalls-list.tmp
|
2014-12-01 02:06:29 +01:00
|
|
|
$(SHELL) $(srcdir)/mvifdiff.sh libcalls-list.tmp libcalls-list
|
2013-02-20 21:04:36 +01:00
|
|
|
$(STAMP) $@
|
|
|
|
|
2011-01-12 03:03:46 +01:00
|
|
|
syscall_arch.go: s-syscall_arch; @true
|
|
|
|
s-syscall_arch: Makefile
|
|
|
|
rm -f syscall_arch.go.tmp
|
|
|
|
echo "package syscall" > syscall_arch.go.tmp
|
|
|
|
echo 'const ARCH = "'$(GOARCH)'"' >> syscall_arch.go.tmp
|
2011-01-13 06:17:52 +01:00
|
|
|
echo 'const OS = "'$(GOOS)'"' >> syscall_arch.go.tmp
|
2014-12-01 02:06:29 +01:00
|
|
|
$(SHELL) $(srcdir)/mvifdiff.sh syscall_arch.go.tmp syscall_arch.go
|
2011-01-12 03:03:46 +01:00
|
|
|
$(STAMP) $@
|
|
|
|
|
2016-09-27 23:32:50 +02:00
|
|
|
SYSINFO_FLAGS = \
|
|
|
|
$(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
|
|
|
$(CPPFLAGS) $(OSCFLAGS) -O
|
|
|
|
|
|
|
|
gen-sysinfo.go: s-gen-sysinfo; @true
|
|
|
|
s-gen-sysinfo: $(srcdir)/sysinfo.c config.h
|
|
|
|
$(CC) $(SYSINFO_FLAGS) -fdump-go-spec=tmp-gen-sysinfo.go -std=gnu99 -S -o sysinfo.s $(srcdir)/sysinfo.c
|
|
|
|
rm -f sysinfo.s
|
|
|
|
$(SHELL) $(srcdir)/mvifdiff.sh tmp-gen-sysinfo.go gen-sysinfo.go
|
|
|
|
$(STAMP) $@
|
|
|
|
|
|
|
|
errno.i: s-errno; @true
|
|
|
|
s-errno:
|
|
|
|
echo '#include <errno.h>' | $(CC) $(SYSINFO_FLAGS) -x c - -E -dM > tmp-errno.i
|
|
|
|
$(SHELL) $(srcdir)/mvifdiff.sh tmp-errno.i errno.i
|
|
|
|
$(STAMP) $@
|
|
|
|
|
2011-10-23 21:04:37 +02:00
|
|
|
sysinfo.go: s-sysinfo; @true
|
2016-09-27 23:32:50 +02:00
|
|
|
s-sysinfo: $(srcdir)/mksysinfo.sh gen-sysinfo.go errno.i
|
|
|
|
$(SHELL) $(srcdir)/mksysinfo.sh
|
2014-12-01 02:06:29 +01:00
|
|
|
$(SHELL) $(srcdir)/mvifdiff.sh tmp-sysinfo.go sysinfo.go
|
2011-10-23 21:04:37 +02:00
|
|
|
$(STAMP) $@
|
2010-12-03 05:34:57 +01:00
|
|
|
|
2011-11-01 05:12:01 +01:00
|
|
|
# The epoll struct has an embedded union and is packed on x86_64,
|
|
|
|
# which is too complicated for mksysinfo.sh. We find the offset of
|
|
|
|
# the only field we care about in configure.ac, and generate the
|
|
|
|
# struct here.
|
|
|
|
epoll.go: s-epoll; @true
|
|
|
|
s-epoll: Makefile
|
|
|
|
rm -f epoll.go.tmp
|
|
|
|
echo 'package syscall' > epoll.go.tmp
|
|
|
|
echo 'type EpollEvent struct {' >> epoll.go.tmp
|
|
|
|
echo ' Events uint32' >> epoll.go.tmp
|
|
|
|
case "$(SIZEOF_STRUCT_EPOLL_EVENT),$(STRUCT_EPOLL_EVENT_FD_OFFSET)" in \
|
|
|
|
0,0) echo 1>&2 "*** struct epoll_event data.fd offset unknown"; \
|
|
|
|
exit 1; ;; \
|
|
|
|
8,4) echo ' Fd int32' >> epoll.go.tmp; ;; \
|
|
|
|
12,4) echo ' Fd int32' >> epoll.go.tmp; \
|
|
|
|
echo ' Pad [4]byte' >> epoll.go.tmp; ;; \
|
|
|
|
12,8) echo ' Pad [4]byte' >> epoll.go.tmp; \
|
|
|
|
echo ' Fd int32' >> epoll.go.tmp; ;; \
|
|
|
|
16,8) echo ' Pad [4]byte' >> epoll.go.tmp; \
|
|
|
|
echo ' Fd int32' >> epoll.go.tmp; \
|
|
|
|
echo ' Pad2 [4]byte' >> epoll.go.tmp; ;; \
|
|
|
|
*) echo 1>&2 "*** struct epoll_event unsupported"; \
|
|
|
|
exit 1; ;; \
|
|
|
|
esac
|
|
|
|
echo '}' >> epoll.go.tmp
|
2014-12-01 02:06:29 +01:00
|
|
|
$(SHELL) $(srcdir)/mvifdiff.sh epoll.go.tmp epoll.go
|
2011-11-01 05:12:01 +01:00
|
|
|
$(STAMP) $@
|
|
|
|
|
2016-10-12 16:28:05 +02:00
|
|
|
if LIBGO_IS_LINUX
|
|
|
|
syscall_lib_clone_lo = syscall/clone_linux.lo
|
|
|
|
else
|
|
|
|
syscall_lib_clone_lo =
|
|
|
|
endif
|
|
|
|
|
2016-10-30 17:45:34 +01:00
|
|
|
PACKAGES = \
|
|
|
|
archive/tar \
|
|
|
|
archive/zip \
|
|
|
|
bufio \
|
|
|
|
bytes \
|
|
|
|
compress/bzip2 \
|
|
|
|
compress/flate \
|
|
|
|
compress/gzip \
|
|
|
|
compress/lzw \
|
|
|
|
compress/zlib \
|
|
|
|
container/heap \
|
|
|
|
container/list \
|
|
|
|
container/ring \
|
|
|
|
context \
|
|
|
|
crypto \
|
|
|
|
crypto/aes \
|
|
|
|
crypto/cipher \
|
|
|
|
crypto/des \
|
|
|
|
crypto/dsa \
|
|
|
|
crypto/ecdsa \
|
|
|
|
crypto/elliptic \
|
|
|
|
crypto/hmac \
|
|
|
|
crypto/md5 \
|
|
|
|
crypto/rand \
|
|
|
|
crypto/rc4 \
|
|
|
|
crypto/rsa \
|
|
|
|
crypto/sha1 \
|
|
|
|
crypto/sha256 \
|
|
|
|
crypto/sha512 \
|
|
|
|
crypto/subtle \
|
|
|
|
crypto/tls \
|
|
|
|
crypto/x509 \
|
|
|
|
crypto/x509/pkix \
|
|
|
|
database/sql \
|
|
|
|
database/sql/driver \
|
|
|
|
debug/dwarf \
|
|
|
|
debug/elf \
|
|
|
|
debug/gosym \
|
|
|
|
debug/macho \
|
|
|
|
debug/pe \
|
|
|
|
debug/plan9obj \
|
|
|
|
encoding \
|
|
|
|
encoding/ascii85 \
|
|
|
|
encoding/asn1 \
|
|
|
|
encoding/base32 \
|
|
|
|
encoding/base64 \
|
|
|
|
encoding/binary \
|
|
|
|
encoding/csv \
|
|
|
|
encoding/gob \
|
|
|
|
encoding/hex \
|
|
|
|
encoding/json \
|
|
|
|
encoding/pem \
|
|
|
|
encoding/xml \
|
|
|
|
errors \
|
|
|
|
exp/proxy \
|
|
|
|
exp/terminal \
|
|
|
|
expvar \
|
|
|
|
flag \
|
|
|
|
fmt \
|
|
|
|
go/ast \
|
|
|
|
go/build \
|
|
|
|
go/constant \
|
|
|
|
go/doc \
|
|
|
|
go/format \
|
|
|
|
go/importer \
|
|
|
|
go/internal/gccgoimporter \
|
|
|
|
go/internal/gcimporter \
|
|
|
|
go/parser \
|
|
|
|
go/printer \
|
|
|
|
go/scanner \
|
|
|
|
go/token \
|
|
|
|
go/types \
|
|
|
|
golang_org/x/net/http2/hpack \
|
|
|
|
golang_org/x/net/lex/httplex \
|
|
|
|
hash \
|
|
|
|
hash/adler32 \
|
|
|
|
hash/crc32 \
|
|
|
|
hash/crc64 \
|
|
|
|
hash/fnv \
|
|
|
|
html \
|
|
|
|
html/template \
|
|
|
|
image \
|
|
|
|
image/color \
|
|
|
|
image/color/palette \
|
|
|
|
image/draw \
|
|
|
|
image/gif \
|
|
|
|
image/internal/imageutil \
|
|
|
|
image/jpeg \
|
|
|
|
image/png \
|
|
|
|
index/suffixarray \
|
|
|
|
internal/nettrace \
|
|
|
|
internal/race \
|
|
|
|
internal/singleflight \
|
|
|
|
internal/syscall/unix \
|
|
|
|
internal/testenv \
|
|
|
|
internal/trace \
|
|
|
|
io \
|
|
|
|
io/ioutil \
|
|
|
|
log \
|
|
|
|
log/syslog \
|
|
|
|
math \
|
|
|
|
math/big \
|
|
|
|
math/cmplx \
|
|
|
|
math/rand \
|
|
|
|
mime \
|
|
|
|
mime/multipart \
|
|
|
|
mime/quotedprintable \
|
|
|
|
net \
|
|
|
|
net/http \
|
|
|
|
net/http/cgi \
|
|
|
|
net/http/cookiejar \
|
|
|
|
net/http/fcgi \
|
|
|
|
net/http/httptest \
|
|
|
|
net/http/httptrace \
|
|
|
|
net/http/httputil \
|
|
|
|
net/http/internal \
|
|
|
|
net/http/pprof \
|
|
|
|
net/internal/socktest \
|
|
|
|
net/mail \
|
|
|
|
net/rpc \
|
|
|
|
net/rpc/jsonrpc \
|
|
|
|
net/smtp \
|
|
|
|
net/textproto \
|
|
|
|
net/url \
|
|
|
|
os \
|
|
|
|
os/exec \
|
|
|
|
os/signal \
|
|
|
|
os/user \
|
|
|
|
path \
|
|
|
|
path/filepath \
|
|
|
|
reflect \
|
|
|
|
regexp \
|
|
|
|
regexp/syntax \
|
|
|
|
runtime \
|
|
|
|
runtime/debug \
|
|
|
|
runtime/internal/atomic \
|
|
|
|
runtime/internal/sys \
|
|
|
|
runtime/pprof \
|
|
|
|
sort \
|
|
|
|
strconv \
|
|
|
|
strings \
|
|
|
|
sync \
|
|
|
|
sync/atomic \
|
|
|
|
syscall \
|
|
|
|
testing \
|
|
|
|
testing/iotest \
|
|
|
|
testing/quick \
|
|
|
|
text/scanner \
|
|
|
|
text/tabwriter \
|
|
|
|
text/template \
|
|
|
|
text/template/parse \
|
|
|
|
time \
|
|
|
|
unicode \
|
|
|
|
unicode/utf16 \
|
|
|
|
unicode/utf8
|
|
|
|
|
2010-12-03 05:34:57 +01:00
|
|
|
libgo_go_objs = \
|
2016-10-30 17:45:34 +01:00
|
|
|
$(addsuffix .lo,$(PACKAGES)) \
|
2011-03-11 02:00:15 +01:00
|
|
|
bytes/index.lo \
|
2014-07-19 23:36:26 +02:00
|
|
|
reflect/makefunc_ffi_c.lo \
|
2013-11-06 20:49:01 +01:00
|
|
|
strings/index.lo \
|
2016-10-12 16:28:05 +02:00
|
|
|
$(syscall_lib_clone_lo) \
|
2012-05-15 00:08:42 +02:00
|
|
|
syscall/errno.lo \
|
|
|
|
syscall/signame.lo \
|
|
|
|
syscall/wait.lo \
|
2016-07-22 20:15:38 +02:00
|
|
|
$(golang_org_x_net_route_lo) \
|
2011-12-07 02:11:29 +01:00
|
|
|
log/syslog/syslog_c.lo \
|
2011-03-11 02:00:15 +01:00
|
|
|
$(os_lib_inotify_lo) \
|
2016-09-10 14:21:59 +02:00
|
|
|
runtime/internal/atomic_c.lo \
|
2016-10-30 17:45:34 +01:00
|
|
|
sync/atomic_c.lo
|
2010-12-03 05:34:57 +01:00
|
|
|
|
2014-11-14 19:02:50 +01:00
|
|
|
libgo_ldflags = \
|
2012-10-23 07:01:24 +02:00
|
|
|
-version-info $(libtool_VERSION) $(PTHREAD_CFLAGS) $(AM_LDFLAGS)
|
2011-04-01 07:11:23 +02:00
|
|
|
|
2014-11-14 19:02:50 +01:00
|
|
|
libgo_libadd = \
|
2012-09-28 16:48:30 +02:00
|
|
|
$(libgo_go_objs) ../libbacktrace/libbacktrace.la \
|
2014-05-29 22:22:27 +02:00
|
|
|
$(LIBATOMIC) $(LIBFFI) $(PTHREAD_LIBS) $(MATH_LIBS) $(NET_LIBS)
|
2010-12-03 05:34:57 +01:00
|
|
|
|
2014-11-14 19:02:50 +01:00
|
|
|
libgo_la_SOURCES = $(runtime_files)
|
|
|
|
libgo_la_LDFLAGS = $(libgo_ldflags)
|
|
|
|
libgo_la_LIBADD = $(libgo_libadd)
|
|
|
|
|
|
|
|
libgo_llgo_la_SOURCES = $(runtime_files)
|
|
|
|
libgo_llgo_la_LDFLAGS = $(libgo_ldflags)
|
|
|
|
libgo_llgo_la_LIBADD = $(libgo_libadd)
|
|
|
|
|
2010-12-03 05:34:57 +01:00
|
|
|
libgobegin_a_SOURCES = \
|
|
|
|
runtime/go-main.c
|
|
|
|
|
2014-11-14 19:02:50 +01:00
|
|
|
libgobegin_llgo_a_SOURCES = \
|
|
|
|
runtime/go-main.c
|
|
|
|
|
2015-04-25 00:08:32 +02:00
|
|
|
# Use -fPIC for libgobegin so that it can be put in a PIE.
|
|
|
|
libgobegin_a_CFLAGS = $(AM_CFLAGS) -fPIC
|
|
|
|
libgobegin_llgo_a_CFLAGS = $(AM_CFLAGS) -fPIC
|
|
|
|
|
2015-04-29 23:31:53 +02:00
|
|
|
libgolibbegin_a_SOURCES = \
|
|
|
|
runtime/go-libmain.c
|
|
|
|
|
|
|
|
libgolibbegin_a_CFLAGS = $(AM_CFLAGS) -fPIC
|
|
|
|
|
2016-08-30 23:07:47 +02:00
|
|
|
# Make sure runtime.inc is built before compiling any .c file.
|
|
|
|
$(libgo_la_OBJECTS): runtime.inc
|
|
|
|
$(libgo_llgo_la_OBJECTS): runtime.inc
|
|
|
|
$(libgobegin_a_OBJECTS): runtime.inc
|
|
|
|
$(libgobegin_llgo_a_OBJECTS): runtime.inc
|
|
|
|
$(libgolibbegin_a_OBJECTS): runtime.inc
|
|
|
|
|
2010-12-03 05:34:57 +01:00
|
|
|
LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/../libtool-ldflags $(LDFLAGS))
|
|
|
|
|
|
|
|
GOCFLAGS = $(CFLAGS)
|
2015-09-15 23:15:37 +02:00
|
|
|
AM_GOCFLAGS = $(STRINGOPS_FLAG) $(GO_SPLIT_STACK)
|
2010-12-03 05:34:57 +01:00
|
|
|
GOCOMPILE = $(GOC) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_GOCFLAGS) $(GOCFLAGS)
|
|
|
|
|
|
|
|
LTGOCOMPILE = $(LIBTOOL) --tag GO --mode=compile $(GOC) $(INCLUDES) \
|
|
|
|
$(AM_GOCFLAGS) $(GOCFLAGS)
|
|
|
|
|
|
|
|
GOLINK = $(LIBTOOL) --tag GO --mode-link $(GOC) \
|
2011-01-12 07:34:08 +01:00
|
|
|
$(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_GOCFLAGS) $(LTLDFLAGS) -o $@
|
2010-12-03 05:34:57 +01:00
|
|
|
|
2011-12-03 01:16:12 +01:00
|
|
|
# Build the dependencies for a Go package.
|
|
|
|
BUILDDEPS = \
|
|
|
|
$(MKDIR_P) $(@D); \
|
2016-10-30 17:45:34 +01:00
|
|
|
dir=`echo $@ | sed -e 's/.lo.dep$$//'`; \
|
|
|
|
files=`$(SHELL) $(srcdir)/match.sh --goarch=$(GOARCH) --goos=$(GOOS) --srcdir=$(srcdir)/go/$$dir --extrafiles="$(extra_go_files_$(subst /,_,$(subst .lo.dep,,$@)))" $(matchargs_$(subst /,_,$(subst .lo.dep,,$@)))`; \
|
2016-08-06 02:36:33 +02:00
|
|
|
$(SHELL) $(srcdir)/godeps.sh `echo $@ | sed -e 's/.dep$$//'` $$files > $@.tmp; \
|
2016-08-08 23:23:57 +02:00
|
|
|
if ! cmp $@.tmp $@ >/dev/null 2>/dev/null; then \
|
|
|
|
rm -f `echo $@ | sed -e 's/\.dep$$//'`; \
|
|
|
|
fi; \
|
2011-12-03 01:16:12 +01:00
|
|
|
mv -f $@.tmp $@
|
|
|
|
|
2011-03-11 02:00:15 +01:00
|
|
|
# Build the .go files for a package, generating a .lo file.
|
2011-02-01 00:43:49 +01:00
|
|
|
BUILDPACKAGE = \
|
2011-03-11 02:00:15 +01:00
|
|
|
$(MKDIR_P) $(@D); \
|
2016-08-06 02:36:33 +02:00
|
|
|
files=`echo $^ | sed -e 's/[^ ]*\.gox//g' -e 's/[^ ]*\.dep//'`; \
|
2016-10-30 17:45:34 +01:00
|
|
|
$(LTGOCOMPILE) -I . -c -fgo-pkgpath=`echo $@ | sed -e 's/.lo$$//'` $($(subst -,_,$(subst .,_,$(subst /,_,$@)))_GOCFLAGS) -o $@ $$files
|
2010-12-03 05:34:57 +01:00
|
|
|
|
2016-10-30 17:45:34 +01:00
|
|
|
# How to build a .gox file from a .lo file.
|
|
|
|
BUILDGOX = \
|
|
|
|
f=`echo $< | sed -e 's/.lo$$/.o/'`; \
|
2016-11-01 14:54:21 +01:00
|
|
|
$(OBJCOPY) -j .go_export $$f $@.tmp; \
|
|
|
|
$(SHELL) $(srcdir)/mvifdiff.sh $@.tmp `echo $@ | sed -e 's/s-gox/gox/'`
|
2015-04-07 20:09:28 +02:00
|
|
|
|
2011-03-21 23:01:53 +01:00
|
|
|
GOTESTFLAGS =
|
2014-07-02 01:19:24 +02:00
|
|
|
GOBENCH =
|
2011-03-21 23:01:53 +01:00
|
|
|
|
2010-12-03 05:34:57 +01:00
|
|
|
# Check a package.
|
|
|
|
CHECK = \
|
2012-12-18 23:07:38 +01:00
|
|
|
GC="$(GOC) $(GOCFLAGS) $($(subst /,_,$@)_GOCFLAGS) -L `${PWD_COMMAND}` -L `${PWD_COMMAND}`/.libs"; \
|
2010-12-03 05:34:57 +01:00
|
|
|
export GC; \
|
2013-02-11 20:03:04 +01:00
|
|
|
GOLIBS="$(MATH_LIBS) $(NET_LIBS) $(LIBS)"; \
|
2011-09-27 00:33:31 +02:00
|
|
|
export GOLIBS; \
|
2010-12-03 05:34:57 +01:00
|
|
|
RUNTESTFLAGS="$(RUNTESTFLAGS)"; \
|
|
|
|
export RUNTESTFLAGS; \
|
|
|
|
MAKE="$(MAKE)"; \
|
|
|
|
export MAKE; \
|
2011-04-22 20:38:24 +02:00
|
|
|
libgccdir=`${GOC} -print-libgcc-file-name | sed -e 's|/[^/]*$$||'`; \
|
2012-12-18 23:07:38 +01:00
|
|
|
LD_LIBRARY_PATH="`${PWD_COMMAND}`/.libs:$${libgccdir}:${LD_LIBRARY_PATH}"; \
|
2011-04-22 20:38:24 +02:00
|
|
|
LD_LIBRARY_PATH=`echo $${LD_LIBRARY_PATH} | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; \
|
|
|
|
export LD_LIBRARY_PATH; \
|
2012-06-14 06:47:45 +02:00
|
|
|
$(MKDIR_P) $(@D); \
|
2011-04-02 02:29:49 +02:00
|
|
|
rm -f $@-testsum $@-testlog; \
|
2016-08-06 02:36:33 +02:00
|
|
|
files=`$(SHELL) $(srcdir)/match.sh --goarch=$(GOARCH) --goos=$(GOOS) --srcdir=$(srcdir)/go/$(@D) --extrafiles="$(extra_go_files_$(subst /,_,$(@D)))" $(matchargs_$(subst /,_,$(@D)))`; \
|
2013-02-05 23:22:17 +01:00
|
|
|
if test "$(USE_DEJAGNU)" = "yes"; then \
|
2016-08-06 02:36:33 +02:00
|
|
|
$(SHELL) $(srcdir)/testsuite/gotest --goarch=$(GOARCH) --goos=$(GOOS) --dejagnu=yes --basedir=$(srcdir) --srcdir=$(srcdir)/go/$(@D) --pkgpath="$(@D)" --pkgfiles="$$files" --testname="$(@D)" $(GOTESTFLAGS); \
|
2014-07-02 01:19:24 +02:00
|
|
|
elif test "$(GOBENCH)" != ""; then \
|
2016-08-06 02:36:33 +02:00
|
|
|
$(SHELL) $(srcdir)/testsuite/gotest --goarch=$(GOARCH) --goos=$(GOOS) --basedir=$(srcdir) --srcdir=$(srcdir)/go/$(@D) --pkgpath="$(@D)" --pkgfiles="$$files" --bench="$(GOBENCH)" $(GOTESTFLAGS); \
|
2011-01-12 00:37:05 +01:00
|
|
|
else \
|
2016-08-06 02:36:33 +02:00
|
|
|
if $(SHELL) $(srcdir)/testsuite/gotest --goarch=$(GOARCH) --goos=$(GOOS) --basedir=$(srcdir) --srcdir=$(srcdir)/go/$(@D) --pkgpath="$(@D)" --pkgfiles="$$files" $(GOTESTFLAGS) >>$@-testlog 2>&1; then \
|
2011-03-31 18:11:56 +02:00
|
|
|
echo "PASS: $(@D)" >> $@-testlog; \
|
2011-04-02 02:29:49 +02:00
|
|
|
echo "PASS: $(@D)"; \
|
|
|
|
echo "PASS: $(@D)" > $@-testsum; \
|
2011-01-12 22:56:10 +01:00
|
|
|
else \
|
2011-03-31 18:11:56 +02:00
|
|
|
echo "FAIL: $(@D)" >> $@-testlog; \
|
|
|
|
cat $@-testlog; \
|
2011-04-02 02:29:49 +02:00
|
|
|
echo "FAIL: $(@D)" > $@-testsum; \
|
2011-01-12 22:56:10 +01:00
|
|
|
exit 1; \
|
|
|
|
fi; \
|
2011-01-12 00:37:05 +01:00
|
|
|
fi
|
2010-12-03 05:34:57 +01:00
|
|
|
|
|
|
|
# Build all packages before checking any.
|
2014-11-14 19:02:50 +01:00
|
|
|
CHECK_DEPS = \
|
2010-12-03 05:34:57 +01:00
|
|
|
$(toolexeclibgo_DATA) \
|
2011-03-31 18:11:56 +02:00
|
|
|
$(toolexeclibgoarchive_DATA) \
|
|
|
|
$(toolexeclibgocompress_DATA) \
|
|
|
|
$(toolexeclibgocontainer_DATA) \
|
|
|
|
$(toolexeclibgocrypto_DATA) \
|
|
|
|
$(toolexeclibgodebug_DATA) \
|
|
|
|
$(toolexeclibgoencoding_DATA) \
|
|
|
|
$(toolexeclibgoexp_DATA) \
|
|
|
|
$(toolexeclibgogo_DATA) \
|
|
|
|
$(toolexeclibgohash_DATA) \
|
|
|
|
$(toolexeclibgoimage_DATA) \
|
|
|
|
$(toolexeclibgoindex_DATA) \
|
|
|
|
$(toolexeclibgoio_DATA) \
|
2011-12-07 02:11:29 +01:00
|
|
|
$(toolexeclibgolog_DATA) \
|
|
|
|
$(toolexeclibgomath_DATA) \
|
2011-03-31 18:11:56 +02:00
|
|
|
$(toolexeclibgomime_DATA) \
|
|
|
|
$(toolexeclibgonet_DATA) \
|
2011-12-07 02:11:29 +01:00
|
|
|
$(toolexeclibgonethttp_DATA) \
|
2011-03-31 18:11:56 +02:00
|
|
|
$(toolexeclibgoos_DATA) \
|
|
|
|
$(toolexeclibgopath_DATA) \
|
|
|
|
$(toolexeclibgorpc_DATA) \
|
|
|
|
$(toolexeclibgoruntime_DATA) \
|
|
|
|
$(toolexeclibgosync_DATA) \
|
2011-12-07 02:11:29 +01:00
|
|
|
$(toolexeclibgotesting_DATA) \
|
|
|
|
$(toolexeclibgotext_DATA) \
|
|
|
|
$(toolexeclibgotexttemplate_DATA) \
|
|
|
|
$(toolexeclibgounicode_DATA)
|
2010-12-03 05:34:57 +01:00
|
|
|
|
2014-11-14 19:02:50 +01:00
|
|
|
if GOC_IS_LLGO
|
|
|
|
CHECK_DEPS += libgo-llgo.la libgobegin-llgo.a
|
|
|
|
else
|
|
|
|
CHECK_DEPS += libgo.la libgobegin.a
|
|
|
|
endif
|
|
|
|
|
2016-10-30 17:45:34 +01:00
|
|
|
# PACKAGE_template defines the rules for each package.
|
|
|
|
# For example, for the package bufio, it produces:
|
|
|
|
#
|
|
|
|
# @go_include@ bufio.lo.dep
|
|
|
|
# bufio.lo.dep: $(srcdir)/go/bufio/*.go
|
|
|
|
# $(BUILDDEPS)
|
|
|
|
# bufio.lo:
|
|
|
|
# $(BUILDPACKAGE)
|
|
|
|
# bufio/check: $(CHECK_DEPS)
|
|
|
|
# @$(CHECK)
|
|
|
|
# .PHONY: bufio/check
|
|
|
|
#
|
|
|
|
# This is invoked with $(1) set to a package, which is a directory name,
|
|
|
|
# such as "bufio" or "archive/tar".
|
|
|
|
define PACKAGE_template
|
|
|
|
@go_include@ $(1).lo.dep
|
|
|
|
$(1).lo.dep: $(srcdir)/go/$(1)/*.go
|
|
|
|
$$(BUILDDEPS)
|
|
|
|
$(1).lo:
|
|
|
|
$$(BUILDPACKAGE)
|
|
|
|
$(1)/check: $$(CHECK_DEPS)
|
|
|
|
@$$(CHECK)
|
|
|
|
.PHONY: $(1)/check
|
2016-11-01 14:54:21 +01:00
|
|
|
$(1).gox: $(1).s-gox; @true
|
|
|
|
$(1).s-gox: $(1).lo
|
2016-10-30 17:45:34 +01:00
|
|
|
$$(BUILDGOX)
|
2016-11-01 14:54:21 +01:00
|
|
|
$$(STAMP) $$@
|
2016-10-30 17:45:34 +01:00
|
|
|
endef
|
|
|
|
|
|
|
|
# This line expands PACKAGE_template once for each package name listed
|
|
|
|
# in $(PACKAGES).
|
|
|
|
$(foreach package,$(PACKAGES),$(eval $(call PACKAGE_template,$(package))))
|
|
|
|
|
|
|
|
# Pass -ffp-contract=off, or 386-specific options, when building the
|
|
|
|
# math package. MATH_FLAG is defined in configure.ac.
|
|
|
|
math_lo_GOCFLAGS = $(MATH_FLAG)
|
|
|
|
|
|
|
|
# Add the generated file runtime_sysinfo.go to the runtime package.
|
2016-11-10 23:53:23 +01:00
|
|
|
extra_go_files_runtime = runtime_sysinfo.go sigtab.go
|
2016-10-30 17:45:34 +01:00
|
|
|
runtime.lo.dep: $(extra_go_files_runtime)
|
2016-08-06 02:36:33 +02:00
|
|
|
|
2016-10-30 17:45:34 +01:00
|
|
|
# Add generated files to the syscall package.
|
|
|
|
extra_go_files_syscall = \
|
|
|
|
libcalls.go \
|
|
|
|
sysinfo.go \
|
|
|
|
syscall_arch.go \
|
|
|
|
$(syscall_epoll_file)
|
|
|
|
syscall.lo.dep: $(extra_go_files_syscall)
|
|
|
|
|
|
|
|
# Pass -fgo-compiling-runtime when compiling the runtime package.
|
|
|
|
runtime_lo_GOCFLAGS = -fgo-c-header=runtime.inc.tmp -fgo-compiling-runtime
|
2016-09-28 20:02:40 +02:00
|
|
|
runtime_check_GOCFLAGS = -fgo-compiling-runtime
|
2016-10-30 17:45:34 +01:00
|
|
|
runtime_internal_atomic_lo_GOCFLAGS = -fgo-compiling-runtime
|
|
|
|
runtime_internal_atomic_lo_check_GOCFLAGS = -fgo-compiling-runtime
|
|
|
|
runtime_internal_sys_lo_GOCFLAGS = -fgo-compiling-runtime
|
|
|
|
runtime_internal_sys_lo_check_GOCFLAGS = -fgo-compiling-runtime
|
2016-07-22 20:15:38 +02:00
|
|
|
|
2016-11-18 01:15:38 +01:00
|
|
|
# If libffi is supported (the normal case) use the ffi build tag for
|
|
|
|
# the runtime package.
|
|
|
|
if USE_LIBFFI
|
|
|
|
matchargs_runtime = --tag=libffi
|
|
|
|
else
|
|
|
|
matchargs_runtime =
|
|
|
|
endif
|
|
|
|
|
2016-10-30 17:45:34 +01:00
|
|
|
# At least for now, we need -static-libgo for this test, because
|
|
|
|
# otherwise we can't get the line numbers.
|
|
|
|
# Also use -fno-inline to get better results from the memory profiler.
|
|
|
|
runtime_pprof_check_GOCFLAGS = -static-libgo -fno-inline
|
2016-08-06 02:36:33 +02:00
|
|
|
|
2016-10-30 17:45:34 +01:00
|
|
|
extra_go_files_runtime_internal_sys = version.go
|
|
|
|
runtime/internal/sys.lo.dep: $(extra_go_files_runtime_internal_sys)
|
2016-08-06 02:36:33 +02:00
|
|
|
|
2016-10-30 17:45:34 +01:00
|
|
|
# FIXME: The following C files may as well move to the runtime
|
|
|
|
# directory and be treated like other C files.
|
2016-08-06 02:36:33 +02:00
|
|
|
|
2016-10-30 17:45:34 +01:00
|
|
|
# Use C code to speed up {bytes,strings}.IndexByte and friends.
|
|
|
|
bytes/index.lo: go/bytes/indexbyte.c runtime.inc
|
|
|
|
@$(MKDIR_P) bytes
|
|
|
|
$(LTCOMPILE) -c -o $@ $(srcdir)/go/bytes/indexbyte.c
|
|
|
|
strings/index.lo: go/strings/indexbyte.c runtime.inc
|
|
|
|
@$(MKDIR_P) strings
|
|
|
|
$(LTCOMPILE) -c -o $@ $(srcdir)/go/strings/indexbyte.c
|
2016-08-06 02:36:33 +02:00
|
|
|
|
2016-10-30 17:45:34 +01:00
|
|
|
# Use a C function with a fixed number of arguments to call a C
|
|
|
|
# varargs function.
|
|
|
|
log/syslog/syslog_c.lo: go/log/syslog/syslog_c.c runtime.inc
|
2012-04-23 19:02:54 +02:00
|
|
|
@$(MKDIR_P) log/syslog
|
2011-12-07 02:11:29 +01:00
|
|
|
$(LTCOMPILE) -c -o $@ $(srcdir)/go/log/syslog/syslog_c.c
|
2010-12-03 05:34:57 +01:00
|
|
|
|
2016-10-30 17:45:34 +01:00
|
|
|
# The interface to libffi from the reflect package is written in C.
|
|
|
|
reflect/makefunc_ffi_c.lo: go/reflect/makefunc_ffi_c.c runtime.inc
|
|
|
|
@$(MKDIR_P) reflect
|
|
|
|
$(LTCOMPILE) -c -o $@ $(srcdir)/go/reflect/makefunc_ffi_c.c
|
2016-09-11 15:23:27 +02:00
|
|
|
|
2016-10-30 17:45:34 +01:00
|
|
|
# The atomic functions are written in C.
|
|
|
|
runtime/internal/atomic_c.lo: go/runtime/internal/atomic/atomic.c runtime.inc
|
|
|
|
@$(MKDIR_P) runtime/internal
|
|
|
|
$(LTCOMPILE) -c -o $@ $(srcdir)/go/runtime/internal/atomic/atomic.c
|
|
|
|
sync/atomic_c.lo: go/sync/atomic/atomic.c runtime.inc
|
|
|
|
@$(MKDIR_P) sync
|
2011-03-17 00:05:44 +01:00
|
|
|
$(LTCOMPILE) -c -o $@ $(srcdir)/go/sync/atomic/atomic.c
|
2016-10-30 17:45:34 +01:00
|
|
|
|
|
|
|
# A few syscall functions are written in C.
|
2016-10-12 16:28:05 +02:00
|
|
|
syscall/clone_linux.lo: go/syscall/clone_linux.c runtime.inc
|
|
|
|
@$(MKDIR_P) syscall
|
2016-10-30 17:45:34 +01:00
|
|
|
$(LTCOMPILE) -c -o $@ $(srcdir)/go/syscall/clone_linux.c
|
2016-08-30 23:07:47 +02:00
|
|
|
syscall/errno.lo: go/syscall/errno.c runtime.inc
|
2012-05-15 00:08:42 +02:00
|
|
|
@$(MKDIR_P) syscall
|
2016-10-30 17:45:34 +01:00
|
|
|
$(LTCOMPILE) -c -o $@ $(srcdir)/go/syscall/errno.c
|
2016-08-30 23:07:47 +02:00
|
|
|
syscall/signame.lo: go/syscall/signame.c runtime.inc
|
2012-05-15 00:08:42 +02:00
|
|
|
@$(MKDIR_P) syscall
|
2016-10-30 17:45:34 +01:00
|
|
|
$(LTCOMPILE) -c -o $@ $(srcdir)/go/syscall/signame.c
|
2016-08-30 23:07:47 +02:00
|
|
|
syscall/wait.lo: go/syscall/wait.c runtime.inc
|
2012-05-15 00:08:42 +02:00
|
|
|
@$(MKDIR_P) syscall
|
2016-10-30 17:45:34 +01:00
|
|
|
$(LTCOMPILE) -c -o $@ $(srcdir)/go/syscall/wait.c
|
2010-12-03 05:34:57 +01:00
|
|
|
|
2016-10-30 17:45:34 +01:00
|
|
|
# Solaris 12 changed the type of fields in struct stat.
|
|
|
|
# Use a build tag, based on a configure check, to cope.
|
|
|
|
if LIBGO_IS_SOLARIS
|
|
|
|
if HAVE_STAT_TIMESPEC
|
|
|
|
matchargs_os = --tag=solaristag
|
|
|
|
else
|
|
|
|
matchargs_os =
|
|
|
|
endif
|
|
|
|
else
|
|
|
|
matchargs_os =
|
|
|
|
endif
|
2016-07-22 20:15:38 +02:00
|
|
|
|
|
|
|
if LIBGO_IS_BSD
|
|
|
|
|
2016-10-30 17:45:34 +01:00
|
|
|
# Build golang_org/x/net/route only on BSD systems.
|
|
|
|
|
|
|
|
$(eval $(call PACKAGE_template,golang_org/x/net/route)
|
|
|
|
|
|
|
|
golang_org_x_net_route_lo = \
|
|
|
|
golang_org/x/net/route/route.lo
|
|
|
|
golang_org_x_net_route_check = \
|
|
|
|
golang_org/x/net/route/check
|
|
|
|
|
|
|
|
endif
|
2011-12-07 02:11:29 +01:00
|
|
|
|
2010-12-03 05:34:57 +01:00
|
|
|
TEST_PACKAGES = \
|
|
|
|
bufio/check \
|
|
|
|
bytes/check \
|
2016-07-22 20:15:38 +02:00
|
|
|
context/check \
|
2011-12-03 03:17:34 +01:00
|
|
|
errors/check \
|
2010-12-03 05:34:57 +01:00
|
|
|
expvar/check \
|
|
|
|
flag/check \
|
|
|
|
fmt/check \
|
|
|
|
html/check \
|
2011-09-16 17:47:21 +02:00
|
|
|
image/check \
|
2010-12-03 05:34:57 +01:00
|
|
|
io/check \
|
|
|
|
log/check \
|
|
|
|
math/check \
|
|
|
|
mime/check \
|
2011-04-02 02:29:49 +02:00
|
|
|
net/check \
|
2010-12-03 05:34:57 +01:00
|
|
|
os/check \
|
|
|
|
path/check \
|
|
|
|
reflect/check \
|
|
|
|
regexp/check \
|
|
|
|
runtime/check \
|
|
|
|
sort/check \
|
|
|
|
strconv/check \
|
|
|
|
strings/check \
|
|
|
|
sync/check \
|
2012-10-23 06:31:11 +02:00
|
|
|
syscall/check \
|
2010-12-03 05:34:57 +01:00
|
|
|
time/check \
|
|
|
|
unicode/check \
|
|
|
|
archive/tar/check \
|
|
|
|
archive/zip/check \
|
2011-03-17 00:05:44 +01:00
|
|
|
compress/bzip2/check \
|
2010-12-03 05:34:57 +01:00
|
|
|
compress/flate/check \
|
|
|
|
compress/gzip/check \
|
2011-03-17 00:05:44 +01:00
|
|
|
compress/lzw/check \
|
2010-12-03 05:34:57 +01:00
|
|
|
compress/zlib/check \
|
|
|
|
container/heap/check \
|
|
|
|
container/list/check \
|
|
|
|
container/ring/check \
|
|
|
|
crypto/aes/check \
|
2011-01-21 19:19:03 +01:00
|
|
|
crypto/cipher/check \
|
2011-04-07 19:09:10 +02:00
|
|
|
crypto/des/check \
|
2011-03-17 00:05:44 +01:00
|
|
|
crypto/dsa/check \
|
2011-03-25 00:46:17 +01:00
|
|
|
crypto/ecdsa/check \
|
2011-01-21 19:19:03 +01:00
|
|
|
crypto/elliptic/check \
|
2010-12-03 05:34:57 +01:00
|
|
|
crypto/hmac/check \
|
|
|
|
crypto/md5/check \
|
|
|
|
crypto/rand/check \
|
|
|
|
crypto/rc4/check \
|
|
|
|
crypto/rsa/check \
|
|
|
|
crypto/sha1/check \
|
|
|
|
crypto/sha256/check \
|
|
|
|
crypto/sha512/check \
|
|
|
|
crypto/subtle/check \
|
|
|
|
crypto/tls/check \
|
|
|
|
crypto/x509/check \
|
2012-01-25 22:54:22 +01:00
|
|
|
database/sql/check \
|
|
|
|
database/sql/driver/check \
|
2010-12-03 05:34:57 +01:00
|
|
|
debug/dwarf/check \
|
|
|
|
debug/elf/check \
|
|
|
|
debug/macho/check \
|
|
|
|
debug/pe/check \
|
2014-06-07 00:37:27 +02:00
|
|
|
debug/plan9obj/check \
|
2010-12-03 05:34:57 +01:00
|
|
|
encoding/ascii85/check \
|
2011-12-07 02:11:29 +01:00
|
|
|
encoding/asn1/check \
|
2011-01-21 19:19:03 +01:00
|
|
|
encoding/base32/check \
|
2010-12-03 05:34:57 +01:00
|
|
|
encoding/base64/check \
|
|
|
|
encoding/binary/check \
|
2011-12-07 02:11:29 +01:00
|
|
|
encoding/csv/check \
|
|
|
|
encoding/gob/check \
|
2010-12-03 05:34:57 +01:00
|
|
|
encoding/hex/check \
|
2011-12-07 02:11:29 +01:00
|
|
|
encoding/json/check \
|
2010-12-03 05:34:57 +01:00
|
|
|
encoding/pem/check \
|
2011-12-07 02:11:29 +01:00
|
|
|
encoding/xml/check \
|
2012-01-25 21:56:26 +01:00
|
|
|
exp/proxy/check \
|
2011-10-27 01:57:58 +02:00
|
|
|
exp/terminal/check \
|
2011-12-07 02:11:29 +01:00
|
|
|
html/template/check \
|
2011-05-20 02:18:15 +02:00
|
|
|
go/ast/check \
|
2015-10-31 01:59:47 +01:00
|
|
|
go/build/check \
|
|
|
|
go/constant/check \
|
2011-12-13 20:16:27 +01:00
|
|
|
go/doc/check \
|
2012-12-13 00:13:29 +01:00
|
|
|
go/format/check \
|
2015-10-31 01:59:47 +01:00
|
|
|
go/internal/gcimporter/check \
|
|
|
|
go/internal/gccgoimporter/check \
|
2010-12-03 05:34:57 +01:00
|
|
|
go/parser/check \
|
|
|
|
go/printer/check \
|
|
|
|
go/scanner/check \
|
2011-01-21 19:19:03 +01:00
|
|
|
go/token/check \
|
2015-10-31 01:59:47 +01:00
|
|
|
go/types/check \
|
2016-07-22 20:15:38 +02:00
|
|
|
golang_org/x/net/http2/hpack/check \
|
|
|
|
golang_org/x/net/lex/httplex/check \
|
|
|
|
$(golang_org_x_net_route_check) \
|
2010-12-03 05:34:57 +01:00
|
|
|
hash/adler32/check \
|
|
|
|
hash/crc32/check \
|
|
|
|
hash/crc64/check \
|
2011-03-25 00:46:17 +01:00
|
|
|
hash/fnv/check \
|
2012-01-13 06:11:45 +01:00
|
|
|
image/color/check \
|
2011-09-16 17:47:21 +02:00
|
|
|
image/draw/check \
|
2011-05-20 02:18:15 +02:00
|
|
|
image/jpeg/check \
|
2010-12-03 05:34:57 +01:00
|
|
|
image/png/check \
|
|
|
|
index/suffixarray/check \
|
2015-10-31 01:59:47 +01:00
|
|
|
internal/singleflight/check \
|
|
|
|
internal/trace/check \
|
2010-12-03 05:34:57 +01:00
|
|
|
io/ioutil/check \
|
2011-12-07 02:11:29 +01:00
|
|
|
log/syslog/check \
|
|
|
|
math/big/check \
|
|
|
|
math/cmplx/check \
|
|
|
|
math/rand/check \
|
2010-12-03 05:34:57 +01:00
|
|
|
mime/multipart/check \
|
2015-10-31 01:59:47 +01:00
|
|
|
mime/quotedprintable/check \
|
2011-12-07 02:11:29 +01:00
|
|
|
net/http/check \
|
|
|
|
net/http/cgi/check \
|
2013-07-16 08:54:42 +02:00
|
|
|
net/http/cookiejar/check \
|
2011-12-07 02:11:29 +01:00
|
|
|
net/http/fcgi/check \
|
2012-03-02 17:38:43 +01:00
|
|
|
net/http/httptest/check \
|
2016-07-22 20:15:38 +02:00
|
|
|
net/http/httptrace/check \
|
2011-12-07 02:11:29 +01:00
|
|
|
net/http/httputil/check \
|
2015-01-15 01:27:56 +01:00
|
|
|
net/http/internal/check \
|
2015-10-31 01:59:47 +01:00
|
|
|
net/internal/socktest/check \
|
2011-12-07 02:11:29 +01:00
|
|
|
net/mail/check \
|
|
|
|
net/rpc/check \
|
|
|
|
net/smtp/check \
|
2010-12-03 05:34:57 +01:00
|
|
|
net/textproto/check \
|
2011-12-07 02:11:29 +01:00
|
|
|
net/url/check \
|
|
|
|
net/rpc/jsonrpc/check \
|
|
|
|
os/exec/check \
|
2012-03-02 17:38:43 +01:00
|
|
|
os/signal/check \
|
2011-05-20 02:18:15 +02:00
|
|
|
os/user/check \
|
2011-03-25 00:46:17 +01:00
|
|
|
path/filepath/check \
|
2011-10-27 01:57:58 +02:00
|
|
|
regexp/syntax/check \
|
2016-10-17 18:54:25 +02:00
|
|
|
runtime/debug/check \
|
2012-07-26 03:57:04 +02:00
|
|
|
runtime/pprof/check \
|
2016-09-10 14:21:59 +02:00
|
|
|
runtime/internal/atomic/check \
|
2016-09-11 15:23:27 +02:00
|
|
|
runtime/internal/sys/check \
|
2011-03-17 00:05:44 +01:00
|
|
|
sync/atomic/check \
|
2011-12-07 02:11:29 +01:00
|
|
|
text/scanner/check \
|
|
|
|
text/tabwriter/check \
|
|
|
|
text/template/check \
|
|
|
|
text/template/parse/check \
|
2010-12-03 05:34:57 +01:00
|
|
|
testing/quick/check \
|
2011-12-07 02:11:29 +01:00
|
|
|
unicode/utf16/check \
|
|
|
|
unicode/utf8/check
|
2010-12-03 05:34:57 +01:00
|
|
|
|
2011-04-22 20:38:24 +02:00
|
|
|
check: check-tail
|
|
|
|
check-recursive: check-head
|
|
|
|
|
|
|
|
check-head:
|
|
|
|
@echo "Test Run By $${USER} on `date`" > libgo.head
|
|
|
|
@echo "Native configuration is $(host_triplet)" >> libgo.head
|
|
|
|
@echo >> libgo.head
|
|
|
|
@echo " === libgo tests ===" >> libgo.head
|
|
|
|
@echo >> libgo.head
|
|
|
|
|
|
|
|
check-tail: check-recursive check-multi
|
2013-02-10 00:19:33 +01:00
|
|
|
@if test "$(USE_DEJAGNU)" = "yes"; then \
|
|
|
|
exit 0; \
|
|
|
|
fi; \
|
|
|
|
lib=`${PWD_COMMAND} | sed -e 's,^.*/\([^/][^/]*\)$$,\1,'`; \
|
2011-04-22 20:38:24 +02:00
|
|
|
for dir in . $(MULTIDIRS); do \
|
|
|
|
mv ../$${dir}/$${lib}/libgo.sum ../$${dir}/$${lib}/libgo.sum.sep; \
|
|
|
|
mv ../$${dir}/$${lib}/libgo.log ../$${dir}/$${lib}/libgo.log.sep; \
|
|
|
|
done; \
|
|
|
|
mv libgo.head libgo.sum; \
|
|
|
|
cp libgo.sum libgo.log; \
|
|
|
|
echo "Schedule of variations:" >> libgo.sum; \
|
|
|
|
for dir in . $(MULTIDIRS); do \
|
|
|
|
multidir=../$${dir}/$${lib}; \
|
|
|
|
multivar=`cat $${multidir}/libgo.var`; \
|
|
|
|
echo " $${multivar}" >> libgo.sum; \
|
|
|
|
done; \
|
|
|
|
echo >> libgo.sum; \
|
|
|
|
pass=0; fail=0; untested=0; \
|
|
|
|
for dir in . $(MULTIDIRS); do \
|
|
|
|
multidir=../$${dir}/$${lib}; \
|
|
|
|
multivar=`cat $${multidir}/libgo.var`; \
|
|
|
|
echo "Running target $${multivar}" >> libgo.sum; \
|
|
|
|
echo "Running $(srcdir)/libgo.exp ..." >> libgo.sum; \
|
|
|
|
cat $${multidir}/libgo.sum.sep >> libgo.sum; \
|
|
|
|
cat $${multidir}/libgo.log.sep >> libgo.log; \
|
|
|
|
if test -n "${MULTIDIRS}"; then \
|
|
|
|
echo " === libgo Summary for $${multivar} ===" >> libgo.sum; \
|
|
|
|
echo >> libgo.sum; \
|
|
|
|
fi; \
|
|
|
|
p=`grep -c PASS $${multidir}/libgo.sum.sep`; \
|
|
|
|
pass=`expr $$pass + $$p`; \
|
|
|
|
if test "$$p" -ne "0" && test -n "${MULTIDIRS}"; then \
|
|
|
|
echo "# of expected passes $$p" >> libgo.sum; \
|
|
|
|
fi; \
|
|
|
|
p=`grep -c FAIL $${multidir}/libgo.sum.sep`; \
|
|
|
|
fail=`expr $$fail + $$p`; \
|
|
|
|
if test "$$p" -ne "0" && test -n "${MULTIDIRS}"; then \
|
|
|
|
echo "# of unexpected failures $$p" >> libgo.sum; \
|
|
|
|
fi; \
|
|
|
|
p=`grep -c UNTESTED $${multidir}/libgo.sum.sep`; \
|
|
|
|
untested=`expr $$untested + $$p`; \
|
|
|
|
if test "$$p" -ne "0" && test -n "${MULTIDIRS}"; then \
|
|
|
|
echo "# of untested testcases $$p" >> libgo.sum; \
|
|
|
|
fi; \
|
|
|
|
done; \
|
|
|
|
echo >> libgo.sum; \
|
|
|
|
echo " === libgo Summary ===" >> libgo.sum; \
|
|
|
|
echo >> libgo.sum; \
|
|
|
|
if test "$$pass" -ne "0"; then \
|
|
|
|
echo "# of expected passes $$pass" >> libgo.sum; \
|
|
|
|
fi; \
|
|
|
|
if test "$$fail" -ne "0"; then \
|
|
|
|
echo "# of unexpected failures $$fail" >> libgo.sum; \
|
|
|
|
fi; \
|
|
|
|
if test "$$untested" -ne "0"; then \
|
|
|
|
echo "# of untested testcases $$untested" >> libgo.sum; \
|
|
|
|
fi; \
|
|
|
|
echo `echo $(GOC) | sed -e 's/ .*//'` `$(GOC) -v 2>&1 | grep " version" | sed -n -e 's/.* \(version.*$$\)/\1/p'` >> libgo.sum; \
|
|
|
|
echo >> libgo.log; \
|
|
|
|
echo "runtest completed at `date`" >> libgo.log; \
|
|
|
|
if test "$$fail" -ne "0"; then \
|
|
|
|
status=1; \
|
|
|
|
else \
|
|
|
|
status=0; \
|
|
|
|
fi; \
|
|
|
|
exit $$status
|
|
|
|
|
2011-03-31 18:11:56 +02:00
|
|
|
check-am:
|
2011-04-02 02:29:49 +02:00
|
|
|
@rm -f libgo.sum libgo.log libgo.tail
|
2011-04-22 20:38:24 +02:00
|
|
|
@multivar="unix"; \
|
|
|
|
[ -z "$(MULTIFLAGS)" ] || multivar="$${multivar}/$(MULTIFLAGS)"; \
|
|
|
|
echo "$${multivar}" > libgo.var
|
2011-04-02 02:29:49 +02:00
|
|
|
@for f in $(TEST_PACKAGES); do \
|
|
|
|
rm -f $$f-testsum $$f-testlog; \
|
|
|
|
done
|
2011-04-22 20:38:24 +02:00
|
|
|
-@$(MAKE) -k $(TEST_PACKAGES)
|
|
|
|
@for f in $(TEST_PACKAGES); do \
|
2011-04-02 02:29:49 +02:00
|
|
|
if test -f $$f-testsum; then \
|
|
|
|
cat $$f-testsum >> libgo.sum; \
|
|
|
|
fi; \
|
|
|
|
if test -f $$f-testlog; then \
|
|
|
|
cat $$f-testlog >> libgo.log; \
|
|
|
|
fi; \
|
2011-04-22 20:38:24 +02:00
|
|
|
done
|
|
|
|
|
|
|
|
check-multi:
|
|
|
|
$(MULTIDO) $(AM_MAKEFLAGS) DO=check-am multi-do # $(MAKE)
|
2011-03-31 18:11:56 +02:00
|
|
|
|
2014-07-02 01:19:24 +02:00
|
|
|
bench:
|
|
|
|
-@$(MAKE) -k $(TEST_PACKAGES) GOBENCH=.
|
|
|
|
|
2011-04-22 20:38:24 +02:00
|
|
|
MOSTLYCLEAN_FILES = libgo.head libgo.sum.sep libgo.log.sep
|
2010-12-03 05:34:57 +01:00
|
|
|
|
|
|
|
mostlyclean-local:
|
|
|
|
find . -name '*.lo' -print | xargs $(LIBTOOL) --mode=clean rm -f
|
|
|
|
find . -name '*.$(OBJEXT)' -print | xargs rm -f
|
2011-04-02 02:29:49 +02:00
|
|
|
find . -name '*-testsum' -print | xargs rm -f
|
2011-03-31 18:11:56 +02:00
|
|
|
find . -name '*-testlog' -print | xargs rm -f
|
|
|
|
|
|
|
|
CLEANFILES = *.go *.gox goc2c *.c s-version libgo.sum libgo.log
|
2010-12-03 05:34:57 +01:00
|
|
|
|
|
|
|
clean-local:
|
|
|
|
find . -name '*.la' -print | xargs $(LIBTOOL) --mode=clean rm -f
|
|
|
|
find . -name '*.a' -print | xargs rm -f
|