OSDN Git Service

libgo: Support multilib testing.
[pf3gnuchains/gcc-fork.git] / libgo / Makefile.in
index 10f86f1..1d6f62c 100644 (file)
@@ -140,31 +140,30 @@ am__DEPENDENCIES_2 = asn1/asn1.lo big/big.lo bufio/bufio.lo \
        archive/zip.lo compress/bzip2.lo compress/flate.lo \
        compress/gzip.lo compress/lzw.lo compress/zlib.lo \
        container/heap.lo container/list.lo container/ring.lo \
-       container/vector.lo crypto/aes.lo crypto/block.lo \
-       crypto/blowfish.lo crypto/cast5.lo crypto/cipher.lo \
-       crypto/dsa.lo crypto/ecdsa.lo crypto/elliptic.lo \
-       crypto/hmac.lo crypto/md4.lo crypto/md5.lo crypto/ocsp.lo \
-       crypto/openpgp.lo crypto/rand.lo crypto/rc4.lo \
-       crypto/ripemd160.lo crypto/rsa.lo crypto/sha1.lo \
-       crypto/sha256.lo crypto/sha512.lo crypto/subtle.lo \
-       crypto/tls.lo crypto/twofish.lo crypto/x509.lo crypto/xtea.lo \
-       crypto/openpgp/armor.lo crypto/openpgp/error.lo \
-       crypto/openpgp/packet.lo crypto/openpgp/s2k.lo debug/dwarf.lo \
-       debug/elf.lo debug/gosym.lo debug/macho.lo debug/pe.lo \
-       debug/proc.lo encoding/ascii85.lo encoding/base32.lo \
-       encoding/base64.lo encoding/binary.lo encoding/git85.lo \
-       encoding/hex.lo encoding/line.lo encoding/pem.lo \
-       exp/datafmt.lo exp/draw.lo exp/eval.lo go/ast.lo go/doc.lo \
-       go/parser.lo go/printer.lo go/scanner.lo go/token.lo \
-       go/typechecker.lo hash/adler32.lo hash/crc32.lo hash/crc64.lo \
-       hash/fnv.lo http/cgi.lo http/httptest.lo http/pprof.lo \
-       image/jpeg.lo image/png.lo index/suffixarray.lo io/ioutil.lo \
-       mime/multipart.lo net/dict.lo net/textproto.lo \
-       $(am__DEPENDENCIES_1) os/signal.lo path/filepath.lo \
-       rpc/jsonrpc.lo runtime/debug.lo runtime/pprof.lo \
-       sync/atomic.lo sync/atomic_c.lo syscalls/syscall.lo \
-       syscalls/errno.lo testing/testing.lo testing/iotest.lo \
-       testing/quick.lo testing/script.lo
+       container/vector.lo crypto/aes.lo crypto/blowfish.lo \
+       crypto/cast5.lo crypto/cipher.lo crypto/des.lo crypto/dsa.lo \
+       crypto/ecdsa.lo crypto/elliptic.lo crypto/hmac.lo \
+       crypto/md4.lo crypto/md5.lo crypto/ocsp.lo crypto/openpgp.lo \
+       crypto/rand.lo crypto/rc4.lo crypto/ripemd160.lo crypto/rsa.lo \
+       crypto/sha1.lo crypto/sha256.lo crypto/sha512.lo \
+       crypto/subtle.lo crypto/tls.lo crypto/twofish.lo \
+       crypto/x509.lo crypto/xtea.lo crypto/openpgp/armor.lo \
+       crypto/openpgp/error.lo crypto/openpgp/packet.lo \
+       crypto/openpgp/s2k.lo debug/dwarf.lo debug/elf.lo \
+       debug/gosym.lo debug/macho.lo debug/pe.lo debug/proc.lo \
+       encoding/ascii85.lo encoding/base32.lo encoding/base64.lo \
+       encoding/binary.lo encoding/git85.lo encoding/hex.lo \
+       encoding/line.lo encoding/pem.lo exp/datafmt.lo exp/draw.lo \
+       exp/eval.lo go/ast.lo go/doc.lo go/parser.lo go/printer.lo \
+       go/scanner.lo go/token.lo go/typechecker.lo hash/adler32.lo \
+       hash/crc32.lo hash/crc64.lo hash/fnv.lo http/cgi.lo \
+       http/httptest.lo http/pprof.lo image/jpeg.lo image/png.lo \
+       index/suffixarray.lo io/ioutil.lo mime/multipart.lo \
+       net/dict.lo net/textproto.lo $(am__DEPENDENCIES_1) \
+       os/signal.lo path/filepath.lo rpc/jsonrpc.lo runtime/debug.lo \
+       runtime/pprof.lo sync/atomic.lo sync/atomic_c.lo \
+       syscalls/syscall.lo syscalls/errno.lo testing/testing.lo \
+       testing/iotest.lo testing/quick.lo testing/script.lo
 libgo_la_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1) \
        $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
        $(am__DEPENDENCIES_1)
@@ -624,10 +623,10 @@ toolexeclibgocontainer_DATA = \
 toolexeclibgocryptodir = $(toolexeclibgodir)/crypto
 toolexeclibgocrypto_DATA = \
        crypto/aes.gox \
-       crypto/block.gox \
        crypto/blowfish.gox \
        crypto/cast5.gox \
        crypto/cipher.gox \
+       crypto/des.gox \
        crypto/dsa.gox \
        crypto/ecdsa.gox \
        crypto/elliptic.gox \
@@ -1087,9 +1086,12 @@ go_os_files = \
        go/os/env.go \
        go/os/env_unix.go \
        go/os/error.go \
+       go/os/error_posix.go \
        go/os/exec.go \
+       go/os/exec_posix.go \
        go/os/exec_unix.go \
        go/os/file.go \
+       go/os/file_posix.go \
        go/os/file_unix.go \
        go/os/getwd.go \
        go/os/path.go \
@@ -1279,17 +1281,6 @@ go_crypto_aes_files = \
        go/crypto/aes/cipher.go \
        go/crypto/aes/const.go
 
-go_crypto_block_files = \
-       go/crypto/block/cbc.go \
-       go/crypto/block/cfb.go \
-       go/crypto/block/cmac.go \
-       go/crypto/block/cipher.go \
-       go/crypto/block/ctr.go \
-       go/crypto/block/eax.go \
-       go/crypto/block/ecb.go \
-       go/crypto/block/ofb.go \
-       go/crypto/block/xor.go
-
 go_crypto_blowfish_files = \
        go/crypto/blowfish/block.go \
        go/crypto/blowfish/const.go \
@@ -1307,6 +1298,11 @@ go_crypto_cipher_files = \
        go/crypto/cipher/ocfb.go \
        go/crypto/cipher/ofb.go
 
+go_crypto_des_files = \
+       go/crypto/des/block.go \
+       go/crypto/des/cipher.go \
+       go/crypto/des/const.go
+
 go_crypto_dsa_files = \
        go/crypto/dsa/dsa.go
 
@@ -1766,10 +1762,10 @@ libgo_go_objs = \
        container/ring.lo \
        container/vector.lo \
        crypto/aes.lo \
-       crypto/block.lo \
        crypto/blowfish.lo \
        crypto/cast5.lo \
        crypto/cipher.lo \
+       crypto/des.lo \
        crypto/dsa.lo \
        crypto/ecdsa.lo \
        crypto/elliptic.lo \
@@ -1877,12 +1873,16 @@ GOTESTFLAGS =
 
 # Check a package.
 CHECK = \
-       GC="$(GOC) -L `${PWD_COMMAND}` -L `${PWD_COMMAND}`/.libs -Wl,-R,`${PWD_COMMAND}`/.libs"; \
+       GC="$(GOC) -L `${PWD_COMMAND}` -L `${PWD_COMMAND}`/.libs"; \
        export GC; \
        RUNTESTFLAGS="$(RUNTESTFLAGS)"; \
        export RUNTESTFLAGS; \
        MAKE="$(MAKE)"; \
        export MAKE; \
+       libgccdir=`${GOC} -print-libgcc-file-name | sed -e 's|/[^/]*$$||'`; \
+       LD_LIBRARY_PATH="`${PWD_COMMAND}`/.libs:$${libgccdir}:${LD_LIBRARY_PATH}"; \
+       LD_LIBRARY_PATH=`echo $${LD_LIBRARY_PATH} | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; \
+       export LD_LIBRARY_PATH; \
        rm -f $@-testsum $@-testlog; \
        prefix=`if test "$(@D)" = "regexp"; then echo regexp-test; else dirname $(@D); fi`; \
        test "$${prefix}" != "." || prefix="$(@D)"; \
@@ -2008,10 +2008,10 @@ TEST_PACKAGES = \
        container/ring/check \
        container/vector/check \
        crypto/aes/check \
-       crypto/block/check \
        crypto/blowfish/check \
        crypto/cast5/check \
        crypto/cipher/check \
+       crypto/des/check \
        crypto/dsa/check \
        crypto/ecdsa/check \
        crypto/elliptic/check \
@@ -2073,7 +2073,7 @@ TEST_PACKAGES = \
        testing/quick/check \
        testing/script/check
 
-MOSTLYCLEAN_FILES = libgo.tail
+MOSTLYCLEAN_FILES = libgo.head libgo.sum.sep libgo.log.sep
 CLEANFILES = *.go *.gox goc2c *.c s-version libgo.sum libgo.log
 all: config.h
        $(MAKE) $(AM_MAKEFLAGS) all-recursive
@@ -4436,13 +4436,6 @@ crypto/aes/check: $(CHECK_DEPS)
        @$(CHECK)
 .PHONY: crypto/aes/check
 
-crypto/block.lo: $(go_crypto_block_files) fmt.gox io.gox os.gox strconv.gox
-       $(BUILDPACKAGE)
-crypto/block/check: $(CHECK_DEPS)
-       @$(MKDIR_P) crypto/block
-       @$(CHECK)
-.PHONY: crypto/block/check
-
 crypto/blowfish.lo: $(go_crypto_blowfish_files) os.gox strconv.gox
        $(BUILDPACKAGE)
 crypto/blowfish/check: $(CHECK_DEPS)
@@ -4464,6 +4457,13 @@ crypto/cipher/check: $(CHECK_DEPS)
        @$(CHECK)
 .PHONY: crypto/cipher/check
 
+crypto/des.lo: $(go_crypto_des_files) encoding/binary.gox os.gox strconv.gox
+       $(BUILDPACKAGE)
+crypto/des/check: $(CHECK_DEPS)
+       @$(MKDIR_P) crypto/des
+       @$(CHECK)
+.PHONY: crypto/des/check
+
 crypto/dsa.lo: $(go_crypto_dsa_files) big.gox io.gox os.gox
        $(BUILDPACKAGE)
 crypto/dsa/check: $(CHECK_DEPS)
@@ -4549,7 +4549,8 @@ crypto/ripemd160/check: $(CHECK_DEPS)
 .PHONY: crypto/ripemd160/check
 
 crypto/rsa.lo: $(go_crypto_rsa_files) big.gox crypto.gox crypto/sha1.gox \
-               crypto/subtle.gox encoding/hex.gox hash.gox io.gox os.gox
+               crypto/subtle.gox encoding/hex.gox hash.gox io.gox os.gox \
+               sync.gox
        $(BUILDPACKAGE)
 crypto/rsa/check: $(CHECK_DEPS)
        @$(MKDIR_P) crypto/rsa
@@ -4885,8 +4886,8 @@ http/cgi/check: $(CHECK_DEPS)
        @$(CHECK)
 .PHONY: http/cgi/check
 
-http/httptest.lo: $(go_http_httptest_files) bytes.gox fmt.gox http.gox \
-               net.gox os.gox
+http/httptest.lo: $(go_http_httptest_files) bytes.gox crypto/rand.gox \
+               crypto/tls.gox fmt.gox http.gox net.gox os.gox time.gox
        $(BUILDPACKAGE)
 http/httptest/check: $(CHECK_DEPS)
        @$(MKDIR_P) http/httptest
@@ -5172,14 +5173,14 @@ container/vector.gox: container/vector.lo
 
 crypto/aes.gox: crypto/aes.lo
        $(BUILDGOX)
-crypto/block.gox: crypto/block.lo
-       $(BUILDGOX)
 crypto/blowfish.gox: crypto/blowfish.lo
        $(BUILDGOX)
 crypto/cast5.gox: crypto/cast5.lo
        $(BUILDGOX)
 crypto/cipher.gox: crypto/cipher.lo
        $(BUILDGOX)
+crypto/des.gox: crypto/des.lo
+       $(BUILDGOX)
 crypto/dsa.gox: crypto/dsa.lo
        $(BUILDGOX)
 crypto/ecdsa.gox: crypto/ecdsa.lo      
@@ -5343,53 +5344,101 @@ testing/quick.gox: testing/quick.lo
 testing/script.gox: testing/script.lo
        $(BUILDGOX)
 
+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
+       @lib=`${PWD_COMMAND} | sed -e 's,^.*/\([^/][^/]*\)$$,\1,'`; \
+       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
+
 check-am:
        @rm -f libgo.sum libgo.log libgo.tail
-       @echo "Test Run By $${USER} on `date`" > libgo.sum
-       @echo "Native configuration is $(host_triplet)" >> libgo.sum
-       @echo >> libgo.sum
-       @echo "         === libgo tests ===" >> libgo.sum
-       @echo >> libgo.sum
-       @echo "Schedule of variations:" >> libgo.sum
-       @echo "    unix" >> libgo.sum
-       @echo >> libgo.sum
-       @echo "Running target unix" >> libgo.sum
-       @echo "Running $(srcdir)/libgo.exp ..." >> libgo.sum
-       @cp libgo.sum libgo.log
-       @echo > libgo.tail
-       @echo "         === libgo summary ===" >> libgo.tail
-       @echo >> libgo.tail
+       @multivar="unix"; \
+       [ -z "$(MULTIFLAGS)" ] || multivar="$${multivar}/$(MULTIFLAGS)"; \
+       echo "$${multivar}" > libgo.var
        @for f in $(TEST_PACKAGES); do \
           rm -f $$f-testsum $$f-testlog; \
         done
-       @$(MAKE) -k $(TEST_PACKAGES); \
-       status=$$?; \
-       for f in $(TEST_PACKAGES); do \
+       -@$(MAKE) -k $(TEST_PACKAGES)
+       @for f in $(TEST_PACKAGES); do \
          if test -f $$f-testsum; then \
            cat $$f-testsum >> libgo.sum; \
          fi; \
          if test -f $$f-testlog; then \
            cat $$f-testlog >> libgo.log; \
          fi; \
-       done; \
-       p=`grep -c PASS libgo.sum`; \
-       if test "$$p" != "0"; then \
-         echo "# of expected passes            $$p" >> libgo.tail; \
-       fi; \
-       p=`grep -c FAIL libgo.sum`; \
-       if test "$$p" != "0"; then \
-         echo "# of unexpected failures        $$p" >> libgo.tail; \
-       fi; \
-       p=`grep -c UNTESTED libgo.sum`; \
-       if test "$$p" != "0"; then \
-         echo "# of untested testcases         $$p" >> libgo.tail; \
-       fi; \
-       cat libgo.tail >> libgo.sum; \
-       cat libgo.tail >> libgo.log; \
-       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; \
-       exit $$status
+       done
+
+check-multi:
+       $(MULTIDO) $(AM_MAKEFLAGS) DO=check-am multi-do # $(MAKE)
 
 mostlyclean-local:
        find . -name '*.lo' -print | xargs $(LIBTOOL) --mode=clean rm -f