]> Cypherpunks repositories - gostls13.git/commitdiff
go: makes it build for the case $GOROOT has whitespaces
authorSergio Luis O. B. Correia <sergio@larces.uece.br>
Tue, 24 Nov 2009 01:32:51 +0000 (17:32 -0800)
committerRuss Cox <rsc@golang.org>
Tue, 24 Nov 2009 01:32:51 +0000 (17:32 -0800)
the bash scripts and makefiles for building go didn't take into account
the fact $GOROOT / $GOBIN could both be directories containing whitespaces,
and was not possible to build it in such a situation.

this commit adjusts the various makefiles/scripts to make it aware of that
possibility, and now it builds successfully when using a path with whitespaces
as well.

Fixes #115.

R=rsc, dsymonds1
https://golang.org/cl/157067

135 files changed:
doc/progs/run
misc/cgo/gmp/Makefile
misc/cgo/stdio/Makefile
src/Make.cmd
src/Make.conf
src/Make.pkg
src/clean.bash
src/cmd/5a/Makefile
src/cmd/5c/Makefile
src/cmd/5g/Makefile
src/cmd/5l/Makefile
src/cmd/6a/Makefile
src/cmd/6c/Makefile
src/cmd/6g/Makefile
src/cmd/6l/Makefile
src/cmd/8a/Makefile
src/cmd/8c/Makefile
src/cmd/8g/Makefile
src/cmd/8l/Makefile
src/cmd/cgo/Makefile
src/cmd/cov/Makefile
src/cmd/ebnflint/Makefile
src/cmd/gc/mkbuiltin
src/cmd/godefs/Makefile
src/cmd/godoc/Makefile
src/cmd/gofmt/Makefile
src/cmd/gofmt/test.sh
src/cmd/gopack/Makefile
src/cmd/gotest/Makefile
src/cmd/gotest/gotest
src/cmd/goyacc/Makefile
src/cmd/hgpatch/Makefile
src/cmd/make.bash
src/cmd/nm/Makefile
src/cmd/prof/Makefile
src/lib9/Makefile
src/libbio/Makefile
src/libcgo/Makefile
src/libmach/Makefile
src/make-arm.bash
src/make.bash
src/pkg/Makefile
src/pkg/archive/tar/Makefile
src/pkg/asn1/Makefile
src/pkg/big/Makefile
src/pkg/bignum/Makefile
src/pkg/bufio/Makefile
src/pkg/bytes/Makefile
src/pkg/compress/flate/Makefile
src/pkg/compress/gzip/Makefile
src/pkg/compress/zlib/Makefile
src/pkg/container/heap/Makefile
src/pkg/container/list/Makefile
src/pkg/container/ring/Makefile
src/pkg/container/vector/Makefile
src/pkg/crypto/aes/Makefile
src/pkg/crypto/block/Makefile
src/pkg/crypto/hmac/Makefile
src/pkg/crypto/md5/Makefile
src/pkg/crypto/rc4/Makefile
src/pkg/crypto/rsa/Makefile
src/pkg/crypto/sha1/Makefile
src/pkg/crypto/subtle/Makefile
src/pkg/crypto/tls/Makefile
src/pkg/crypto/x509/Makefile
src/pkg/debug/dwarf/Makefile
src/pkg/debug/elf/Makefile
src/pkg/debug/gosym/Makefile
src/pkg/debug/macho/Makefile
src/pkg/debug/proc/Makefile
src/pkg/ebnf/Makefile
src/pkg/encoding/ascii85/Makefile
src/pkg/encoding/base64/Makefile
src/pkg/encoding/binary/Makefile
src/pkg/encoding/git85/Makefile
src/pkg/encoding/hex/Makefile
src/pkg/encoding/pem/Makefile
src/pkg/exec/Makefile
src/pkg/exp/datafmt/Makefile
src/pkg/exp/draw/Makefile
src/pkg/exp/eval/Makefile
src/pkg/exp/eval/test.bash
src/pkg/exp/exception/Makefile
src/pkg/exp/iterable/Makefile
src/pkg/exp/nacl/av/Makefile
src/pkg/exp/nacl/srpc/Makefile
src/pkg/exp/ogle/Makefile
src/pkg/expvar/Makefile
src/pkg/flag/Makefile
src/pkg/fmt/Makefile
src/pkg/go/ast/Makefile
src/pkg/go/doc/Makefile
src/pkg/go/parser/Makefile
src/pkg/go/printer/Makefile
src/pkg/go/scanner/Makefile
src/pkg/go/token/Makefile
src/pkg/gob/Makefile
src/pkg/hash/Makefile
src/pkg/hash/adler32/Makefile
src/pkg/hash/crc32/Makefile
src/pkg/http/Makefile
src/pkg/image/Makefile
src/pkg/image/png/Makefile
src/pkg/io/Makefile
src/pkg/json/Makefile
src/pkg/log/Makefile
src/pkg/malloc/Makefile
src/pkg/math/Makefile
src/pkg/net/Makefile
src/pkg/once/Makefile
src/pkg/os/Makefile
src/pkg/patch/Makefile
src/pkg/path/Makefile
src/pkg/rand/Makefile
src/pkg/reflect/Makefile
src/pkg/regexp/Makefile
src/pkg/rpc/Makefile
src/pkg/runtime/Makefile
src/pkg/sort/Makefile
src/pkg/strconv/Makefile
src/pkg/strings/Makefile
src/pkg/sync/Makefile
src/pkg/syscall/Makefile
src/pkg/tabwriter/Makefile
src/pkg/template/Makefile
src/pkg/testing/Makefile
src/pkg/testing/iotest/Makefile
src/pkg/testing/quick/Makefile
src/pkg/testing/script/Makefile
src/pkg/time/Makefile
src/pkg/unicode/Makefile
src/pkg/utf8/Makefile
src/pkg/xml/Makefile
src/sudo.bash
test/bench/timing.sh

index 46de912507c310c67b6fc56b67315c67a5fa1716..71999ece92c732f975f9ea9cc210b452df4a85e3 100755 (executable)
@@ -3,7 +3,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-. $GOROOT/src/Make.$GOARCH
+. "$GOROOT"/src/Make.$GOARCH
 
 if [ -z "$O" ]; then
        echo 'missing $O - maybe no Make.$GOARCH?' 1>&2
index c92458c9080537bd41f58e6d954e0e77cb03d589..ad5db33c2f42a72c6c39a12e78d020cd58725933 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include $(GOROOT)/src/Make.$(GOARCH)
+include ../../../src/Make.$(GOARCH)
 
 TARG=gmp
 
@@ -22,7 +22,7 @@ CGO_LDFLAGS=-lgmp
 
 CLEANFILES+=pi fib
 
-include $(GOROOT)/src/Make.pkg
+include ../../../src/Make.pkg
 
 # Simple test programs
 
index 83b1ed9e50d93d02abe353357d8baf2ab97d85a2..7ff8c3007eff1653bbea83e9af0ec341fabdf7ef 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include $(GOROOT)/src/Make.$(GOARCH)
+include ../../../src/Make.$(GOARCH)
 
 TARG=stdio
 CGOFILES=\
@@ -10,7 +10,7 @@ CGOFILES=\
 
 CLEANFILES+=hello fib chain run.out
 
-include $(GOROOT)/src/Make.pkg
+include ../../../src/Make.pkg
 
 %: install %.go
        $(GC) $*.go
index 656ea5531e46a62b34638b1e6c08e3c8bfd4b779..7cf0a5b532333f05e0afb1596b9a9adfdf097c66 100644 (file)
@@ -7,6 +7,11 @@ ifndef GOBIN
 GOBIN=$(HOME)/bin
 endif
 
+# ugly hack to deal with whitespaces in $GOBIN
+nullstring :=
+space := $(nullstring) # a space at the end
+QUOTED_GOBIN=$(subst $(space),\ ,$(GOBIN))
+
 all: $(TARG)
 
 $(TARG): _go_.$O $(OFILES)
@@ -15,13 +20,13 @@ $(TARG): _go_.$O $(OFILES)
 _go_.$O: $(GOFILES)
        $(GC) -o $@ $(GOFILES)
 
-install: $(GOBIN)/$(TARG)
+install: $(QUOTED_GOBIN)/$(TARG)
 
-$(GOBIN)/$(TARG): $(TARG)
-       cp $(TARG) $@
+$(QUOTED_GOBIN)/$(TARG): $(TARG)
+       cp -f $(TARG) $(QUOTED_GOBIN)
 
 clean:
        rm -f *.[$(OS)] $(TARG) $(CLEANFILES)
 
 nuke:
-       rm -f *.[$(OS)] $(TARG) $(CLEANFILES) $(GOBIN)/$(TARG)
+       rm -f *.[$(OS)] $(TARG) $(CLEANFILES) $(QUOTED_GOBIN)/$(TARG)
index 02268ce2d48615fb909569d4b3b56692615d298d..21eee46784d10f9686b152e0410069f570604080 100644 (file)
@@ -4,14 +4,14 @@
 
 CC=quietgcc
 LD=quietgcc
-CFLAGS=-ggdb -I$(GOROOT)/include -O2 -fno-inline
+CFLAGS=-ggdb -I"$(GOROOT)"/include -O2 -fno-inline
 O=o
 YFLAGS=-d
 # GNU Make syntax:
 ifndef GOBIN
-GOBIN=$(HOME)/bin
+GOBIN="$(HOME)/bin"
 endif
 PWD=$(shell pwd)
 
 %.$O: %.c
-       $(CC) $(CFLAGS) -c $(PWD)/$*.c
+       $(CC) $(CFLAGS) -c "$(PWD)"/$*.c
index 29d028d541594b18732d7476aeefb5c25ec733da..26d6e20ee78aab143c170aa583a0945f5579b9ae 100644 (file)
@@ -12,7 +12,13 @@ TARG_words=$(subst /, ,$(TARG))
 elem=$(word $(words $(TARG_words)),$(TARG_words))
 
 dir=$(patsubst %/$(elem),%,./$(TARG))
-pkgdir=$(GOROOT)/pkg/$(GOOS)_$(GOARCH)
+
+# ugly hack to deal with whitespaces in $GOROOT
+nullstring :=
+space := $(nullstring) # a space at the end
+QUOTED_GOROOT=$(subst $(space),\ ,$(GOROOT))
+
+pkgdir=$(QUOTED_GOROOT)/pkg/$(GOOS)_$(GOARCH)
 
 INSTALLFILES=$(pkgdir)/$(TARG).a
 
@@ -43,8 +49,8 @@ testpackage-clean:
 install: $(INSTALLFILES)
 
 $(pkgdir)/$(TARG).a: package
-       @test -d $(GOROOT)/pkg && mkdir -p $(pkgdir)/$(dir)
-       cp _obj/$(TARG).a $@
+       @test -d $(QUOTED_GOROOT)/pkg && mkdir -p $(pkgdir)/$(dir)
+       cp _obj/$(TARG).a "$@"
 
 _go_.$O: $(GOFILES) $(PREREQ)
        $(GC) -o $@ $(GOFILES)
@@ -96,7 +102,7 @@ dir:
 
 # Compile x.cgo3.c with 6c; needs access to the runtime headers.
 RUNTIME_CFLAGS_amd64=-D_64BIT
-RUNTIME_CFLAGS=-I$(GOROOT)/src/pkg/runtime $(RUNTIME_CFLAGS_$(GOARCH))
+RUNTIME_CFLAGS=-I"$(GOROOT)/src/pkg/runtime" $(RUNTIME_CFLAGS_$(GOARCH))
 %.cgo3.$O: %.cgo3.c
        $(CC) $(CFLAGS) $(RUNTIME_CFLAGS) $*.cgo3.c
 
@@ -116,8 +122,8 @@ $(elem)_%.so: %.cgo4.o
        gcc $(_CGO_CFLAGS_$(GOARCH)) -o $@ $*.cgo4.o $(CGO_LDFLAGS)  $(_CGO_LDFLAGS_$(GOOS))
 
 $(pkgdir)/$(dir)/$(elem)_%.so: $(elem)_%.so
-       @test -d $(GOROOT)/pkg && mkdir -p $(pkgdir)/$(dir)
-       cp $(elem)_$*.so $@
+       @test -d $(QUOTED_GOROOT/pkg && mkdir -p $(pkgdir)/$(dir)
+       cp $(elem)_$*.so "$@"
 
 # Generic build rules.
 # These come last so that the rules above can override them
index 411321b55dc231c4b2d59e988343a536b230953f..f6fc6d1f5ecae305f0d0660ccaa602f6a99187f7 100755 (executable)
@@ -3,8 +3,8 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-rm -rf $GOROOT/pkg/${GOOS}_$GOARCH
-rm -f $GOROOT/lib/*.a
+rm -rf "$GOROOT"/pkg/${GOOS}_$GOARCH
+rm -f "$GOROOT"/lib/*.a
 for i in lib9 libbio libcgo libmach cmd pkg \
        ../misc/cgo/gmp ../misc/cgo/stdio \
        ../test/bench
index 87c9d68cda732a3f2318ece4d9212e550187a5ca..f01b017dacea9e0e9c03ad162726ec6dd5243922 100644 (file)
@@ -21,7 +21,7 @@ YFILES=\
        a.y\
 
 $(TARG): $(OFILES)
-       $(LD) -o $(TARG) -L$(GOROOT)/lib $(OFILES) -lbio -l9
+       $(LD) -o $(TARG) -L"$(GOROOT)"/lib $(OFILES) -lbio -l9
 
 $(OFILES): $(HFILES)
 
@@ -37,4 +37,4 @@ clean:
        rm -f *.$O $(TARG) *.5 enam.c 5.out a.out y.tab.h y.tab.c
 
 install: $(TARG)
-       cp $(TARG) $(GOBIN)/$(TARG)
+       cp $(TARG) "$(GOBIN)"/$(TARG)
index be9f4c52a99ecb255a5c315e955d3fdeae43c404..b534206f35767846f0f76bf0031c49d3135c76ec 100644 (file)
@@ -29,7 +29,7 @@ LIB=\
        ../cc/cc.a$O
 
 $(TARG): $(OFILES) $(LIB)
-       $(LD) -o $(TARG) -L$(GOROOT)/lib $(OFILES) $(LIB) -lbio -l9
+       $(LD) -o $(TARG) -L"$(GOROOT)"/lib $(OFILES) $(LIB) -lbio -l9
 
 $(OFILES): $(HFILES)
 
@@ -37,7 +37,7 @@ clean:
        rm -f *.$O $(TARG) *.5 enam.c 5.out a.out
 
 install: $(TARG)
-       cp $(TARG) $(GOBIN)/$(TARG)
+       cp $(TARG) "$(GOBIN)"/$(TARG)
 
 %.$O: ../cc/%.c
        $(CC) $(CFLAGS) -c -I. -o $@ ../cc/$*.c
index 05915a75e54e51f94eea45fd2330b9b5bd66bc3e..123af19cda6151d36571b9ed1beaf8b05353c445 100644 (file)
@@ -27,7 +27,7 @@ LIB=\
        ../gc/gc.a$O
 
 $(TARG): $(OFILES) $(LIB)
-       $(LD) -o $(TARG) -L$(GOROOT)/lib $(OFILES) $(LIB) -lbio -l9 -lm
+       $(LD) -o $(TARG) -L"$(GOROOT)"/lib $(OFILES) $(LIB) -lbio -l9 -lm
 
 $(OFILES): $(HFILES)
 
@@ -35,4 +35,4 @@ clean:
        rm -f *.o $(TARG) *.5 enam.c 5.out a.out
 
 install: $(TARG)
-       cp $(TARG) $(GOBIN)/$(TARG)
+       cp $(TARG) "$(GOBIN)"/$(TARG)
index b042115043178b580119f80913a1610c7afa1d21..be866b87a4e5590c4f5ae1a4cf6d18627a54d672 100644 (file)
@@ -25,7 +25,7 @@ HFILES=\
        ../5l/5.out.h\
 
 $(TARG): $(OFILES)
-       $(LD) -o $(TARG) -L$(GOROOT)/lib $(OFILES) -lbio -l9
+       $(LD) -o $(TARG) -L"$(GOROOT)"/lib $(OFILES) -lbio -l9
 
 $(OFILES): $(HFILES)
 
@@ -36,7 +36,7 @@ clean:
        rm -f *.o $(TARG) *.5 enam.c 5.out a.out
 
 install: $(TARG)
-       cp $(TARG) $(GOBIN)/$(TARG)
+       cp $(TARG) "$(GOBIN)"/$(TARG)
 
 %.$O: ../ld/%.c
        $(CC) $(CFLAGS) -c -I. ../ld/$*.c
index 0050921b57712ca261c41841d65a387bd0acf2f1..21d824708e6aaa007c45c7d221913d672e8ecb5c 100644 (file)
@@ -21,7 +21,7 @@ YFILES=\
        a.y\
 
 $(TARG): $(OFILES)
-       $(LD) -o $(TARG) -L$(GOROOT)/lib $(OFILES) -lbio -l9
+       $(LD) -o $(TARG) -L"$(GOROOT)"/lib $(OFILES) -lbio -l9
 
 $(OFILES): $(HFILES)
 
@@ -37,4 +37,4 @@ clean:
        rm -f *.$O $(TARG) *.6 enam.c 6.out a.out y.tab.h y.tab.c
 
 install: $(TARG)
-       cp $(TARG) $(GOBIN)/$(TARG)
+       cp $(TARG) "$(GOBIN)"/$(TARG)
index 1cae39e1be559dd4412df38edc59fd277a6f9bbb..1bf1da9d30ba4beef7fe551e711c5cd00afefd6c 100644 (file)
@@ -30,7 +30,7 @@ LIB=\
        ../cc/cc.a$O
 
 $(TARG): $(OFILES) $(LIB)
-       $(LD) -o $(TARG) -L$(GOROOT)/lib $(OFILES) $(LIB) -lbio -l9
+       $(LD) -o $(TARG) -L"$(GOROOT)"/lib $(OFILES) $(LIB) -lbio -l9
 
 $(OFILES): $(HFILES)
 
@@ -38,7 +38,7 @@ clean:
        rm -f *.$O $(TARG) *.6 enam.c 6.out a.out
 
 install: $(TARG)
-       cp $(TARG) $(GOBIN)/$(TARG)
+       cp $(TARG) "$(GOBIN)"/$(TARG)
 
 %.$O: ../cc/%.c
        $(CC) $(CFLAGS) -c -I. -o $@ ../cc/$*.c
index 6538c55289bd4640274c1bdf07881d5240223e38..a6d3eb76235d80b2def47a6c266233fcacc8859d 100644 (file)
@@ -28,7 +28,7 @@ LIB=\
        ../gc/gc.a$O
 
 $(TARG): $(OFILES) $(LIB)
-       $(LD) -o $(TARG) -L$(GOROOT)/lib $(OFILES) $(LIB) -lbio -l9 -lm
+       $(LD) -o $(TARG) -L"$(GOROOT)"/lib $(OFILES) $(LIB) -lbio -l9 -lm
 
 $(OFILES): $(HFILES)
 
@@ -36,4 +36,4 @@ clean:
        rm -f $(TARG) enam.c 6.out a.out *.$O *.6
 
 install: $(TARG)
-       cp $(TARG) $(GOBIN)/$(TARG)
+       cp $(TARG) "$(GOBIN)"/$(TARG)
index 3260c15a7a481d7f23847de4491c4096787a1d35..72bde4465e906ce82cad9ce1b7d1f41dcb5bfbe8 100644 (file)
@@ -28,7 +28,7 @@ HFILES=\
        ../ld/macho.h\
 
 $(TARG): $(OFILES)
-       $(LD) -o $(TARG) -L$(GOROOT)/lib $(OFILES) -lbio -l9
+       $(LD) -o $(TARG) -L"$(GOROOT)"/lib $(OFILES) -lbio -l9
 
 $(OFILES): $(HFILES)
 
@@ -39,7 +39,7 @@ clean:
        rm -f *.$O $(TARG) *.6 enam.c 6.out a.out
 
 install: $(TARG)
-       cp $(TARG) $(GOBIN)/$(TARG)
+       cp $(TARG) "$(GOBIN)"/$(TARG)
 
 %.$O: ../ld/%.c
        $(CC) $(CFLAGS) -c -I. ../ld/$*.c
index cb5897e0848e0390426a525c92df2ae9257ddb74..beb5755446b6c7f40d38533eca9e07eefd850246 100644 (file)
@@ -21,7 +21,7 @@ YFILES=\
        a.y\
 
 $(TARG): $(OFILES)
-       $(LD) -o $(TARG) -L$(GOROOT)/lib $(OFILES) -lbio -l9
+       $(LD) -o $(TARG) -L"$(GOROOT)"/lib $(OFILES) -lbio -l9
 
 $(OFILES): $(HFILES)
 
@@ -37,4 +37,4 @@ clean:
        rm -f *.$O $(TARG) *.6 enam.c 6.out a.out y.tab.h y.tab.c
 
 install: $(TARG)
-       cp $(TARG) $(GOBIN)/$(TARG)
+       cp $(TARG) "$(GOBIN)"/$(TARG)
index 0f3973910bbda27fdf062cb450b1626106629f6c..85ea3013b7c4b87efec0663237db39a1946308ce 100644 (file)
@@ -32,7 +32,7 @@ LIB=\
        ../cc/cc.a$O
 
 $(TARG): $(OFILES) $(LIB)
-       $(LD) -o $(TARG) -L$(GOROOT)/lib $(OFILES) $(LIB) -lm -lbio -l9
+       $(LD) -o $(TARG) -L"$(GOROOT)"/lib $(OFILES) $(LIB) -lm -lbio -l9
 
 $(OFILES): $(HFILES)
 
@@ -40,7 +40,7 @@ clean:
        rm -f *.$O $(TARG) *.8 8.out a.out
 
 install: $(TARG)
-       cp $(TARG) $(GOBIN)/$(TARG)
+       cp $(TARG) "$(GOBIN)"/$(TARG)
 
 %.$O: ../cc/%.c
        $(CC) $(CFLAGS) -c -I. -o $@ ../cc/$*.c
index b2b9d91d603a9bfee01c7f21355786ffdf6c74c7..ea1f178d2887237327a820005a1b8bdd8e36f3ea 100644 (file)
@@ -29,7 +29,7 @@ LIB=\
        ../gc/gc.a$O
 
 $(TARG): $(OFILES) $(LIB)
-       $(LD) -o $(TARG) -L$(GOROOT)/lib $(OFILES) $(LIB) -lbio -l9 -lm
+       $(LD) -o $(TARG) -L"$(GOROOT)"/lib $(OFILES) $(LIB) -lbio -l9 -lm
 
 $(OFILES): $(HFILES)
 
@@ -37,4 +37,4 @@ clean:
        rm -f *.$O $(TARG) *.8 enam.c 8.out a.out
 
 install: $(TARG)
-       cp $(TARG) $(GOBIN)/$(TARG)
+       cp $(TARG) "$(GOBIN)"/$(TARG)
index 088174877fbb33f4abc96503eace5d38660af696..52bd021c3035c007e518d400d16307fa13b06bae 100644 (file)
@@ -28,7 +28,7 @@ HFILES=\
 
 
 $(TARG): $(OFILES)
-       $(LD) -o $(TARG) -L$(GOROOT)/lib $(OFILES) -lbio -l9
+       $(LD) -o $(TARG) -L"$(GOROOT)"/lib $(OFILES) -lbio -l9
 
 $(OFILES): $(HFILES)
 
@@ -39,7 +39,7 @@ clean:
        rm -f *.$O $(TARG) *.8 enam.c 8.out a.out
 
 install: $(TARG)
-       cp $(TARG) $(GOBIN)/$(TARG)
+       cp $(TARG) "$(GOBIN)"/$(TARG)
 
 %.$O: ../ld/%.c
        $(CC) $(CFLAGS) -c -I. ../ld/$*.c
index 2c62cbdf518287a55df7ec39735e520eed6d1b0c..34ca3dd46e436dfdc9c94ce8893cbd40197acb3a 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include $(GOROOT)/src/Make.$(GOARCH)
+include ../../Make.$(GOARCH)
 
 TARG=cgo
 GOFILES=\
@@ -12,4 +12,4 @@ GOFILES=\
        out.go\
        util.go\
 
-include $(GOROOT)/src/Make.cmd
+include ../../Make.cmd
index 293ff399a590f2ff89a002b39bdaf6b7ef123b99..58cb2302c76b9e086662e3d344e73907adc70cc7 100644 (file)
@@ -17,7 +17,7 @@ HFILES=\
        tree.h\
 
 $(TARG): $(OFILES)
-       $(LD) -o $(TARG) -L$(GOROOT)/lib $(OFILES) -lmach -lbio -l9
+       $(LD) -o $(TARG) -L"$(GOROOT)"/lib $(OFILES) -lmach -lbio -l9
 
 clean:
        rm -f *.$O $(TARG)
@@ -31,6 +31,6 @@ install-darwin: $(TARG)
        @true
 
 install-default: $(TARG)
-       cp $(TARG) $(GOBIN)/$(TARG)
+       cp $(TARG) "$(GOBIN)"/$(TARG)
 
 $(OFILES): $(HFILES)
index 6e42ba8d2fed57d4b58a3118b8c6640bd5c56608..9c482446a781b3cd64732059b99ca4fb6bd1469e 100644 (file)
@@ -2,14 +2,14 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include $(GOROOT)/src/Make.$(GOARCH)
+include ../../Make.$(GOARCH)
 
 TARG=ebnflint
 GOFILES=\
        ebnflint.go\
 
-include $(GOROOT)/src/Make.cmd
+include ../../Make.cmd
 
 test: $(TARG)
-       $(TARG) -start="SourceFile" $(GOROOT)/doc/go_spec.html
+       $(TARG) -start="SourceFile" "$(GOROOT)"/doc/go_spec.html
 
index 7fa71705326f486f2a0b18c2c08d251172d3c891..7fe11caf71071e364291f7e5c4b28bd1ec02b126 100755 (executable)
@@ -5,7 +5,7 @@
 
 set -e
 
-. $GOROOT/src/Make.$GOARCH
+. "$GOROOT"/src/Make.$GOARCH
 if [ -z "$GC" ]; then
        echo 'missing $GC - maybe no Make.$GOARCH?' 1>&2
        exit 1
index d3215c87d6f1c5f47500ce3ba44992dae6d48e8f..49244f1521356517afab542f2b31366ec7006ff2 100644 (file)
@@ -13,12 +13,12 @@ OFILES=\
 HFILES=a.h
 
 $(TARG): $(OFILES)
-       $(LD) -o $(TARG) -L$(GOROOT)/lib $(OFILES) -lbio -l9
+       $(LD) -o $(TARG) -L"$(GOROOT)"/lib $(OFILES) -lbio -l9
 
 clean:
        rm -f *.$O $(TARG)
 
 install: $(TARG)
-       cp $(TARG) $(GOBIN)/$(TARG)
+       cp $(TARG) "$(GOBIN)"/$(TARG)
 
 $(OFILES): $(HFILES)
index f24b50966fc825aa885a381ebe6175847078898a..dcd4e5b4e0241c8edc6ab4f9a0cd12ec8d790c87 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include $(GOROOT)/src/Make.$(GOARCH)
+include ../../Make.$(GOARCH)
 
 TARG=godoc
 GOFILES=\
@@ -12,4 +12,4 @@ GOFILES=\
        snippet.go\
        spec.go\
 
-include $(GOROOT)/src/Make.cmd
+include ../../Make.cmd
index dbc134f88ec51901f4805eb5e53d9b5c8d2553d4..2294fd1dbf5a2298b48b5aaa2a23a1048c2f2dbf 100644 (file)
@@ -2,18 +2,18 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include $(GOROOT)/src/Make.$(GOARCH)
+include ../../Make.$(GOARCH)
 
 TARG=gofmt
 GOFILES=\
        gofmt.go\
        rewrite.go\
 
-include $(GOROOT)/src/Make.cmd
+include ../../Make.cmd
 
 test: $(TARG)
        ./test.sh
 
 smoketest: $(TARG)
-       ./test.sh $(GOROOT)/src/pkg/go/parser/parser.go
+       ./test.sh "$(GOROOT)"/src/pkg/go/parser/parser.go
 
index 8af8900e6edbbab2bc21b7905cae25fc856655d4..8912923f7e44d6e0320db4e8b754d14a3abc852f 100755 (executable)
@@ -3,7 +3,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-. $GOROOT/src/Make.$GOARCH
+. "$GOROOT"/src/Make.$GOARCH
 if [ -z "$O" ]; then
        echo 'missing $O - maybe no Make.$GOARCH?' 1>&2
        exit 1
@@ -28,14 +28,14 @@ count() {
 # apply to one file
 apply1() {
        #echo $1 $2
-       case `basename $F` in
+       case `basename "$F"` in
        # the following files are skipped because they are test cases
        # for syntax errors and thus won't parse in the first place:
        func3.go | const2.go | \
        bug014.go | bug050.go |  bug068.go |  bug083.go | bug088.go | \
        bug106.go | bug121.go | bug125.go | bug133.go | bug160.go | \
        bug163.go | bug166.go | bug169.go | bug217.go ) ;;
-       * ) $1 $2; count $F;;
+       * ) "$1" "$2"; count "$F";;
        esac
 }
 
@@ -43,15 +43,15 @@ apply1() {
 # apply to local files
 applydot() {
        for F in `find . -name "*.go" | grep -v "._"`; do
-               apply1 $1 $F
+               apply1 "$1" $F
        done
 }
 
 
 # apply to all .go files we can find
 apply() {
-       for F in `find $GOROOT -name "*.go" | grep -v "._"`; do
-               apply1 $1 $F
+       for F in `find "$GOROOT" -name "*.go" | grep -v "._"`; do
+               apply1 "$1" $F
        done
 }
 
@@ -63,7 +63,7 @@ cleanup() {
 
 silent() {
        cleanup
-       $CMD $1 > /dev/null 2> $TMP1
+       $CMD "$1" > /dev/null 2> $TMP1
        if [ $? != 0 ]; then
                cat $TMP1
                echo "Error (silent mode test): test.sh $1"
@@ -74,7 +74,7 @@ silent() {
 
 idempotent() {
        cleanup
-       $CMD $1 > $TMP1
+       $CMD "$1" > $TMP1
        if [ $? != 0 ]; then
                echo "Error (step 1 of idempotency test): test.sh $1"
                exit 1
@@ -103,7 +103,7 @@ idempotent() {
 
 valid() {
        cleanup
-       $CMD $1 > $TMP1
+       $CMD "$1" > $TMP1
        if [ $? != 0 ]; then
                echo "Error (step 1 of validity test): test.sh $1"
                exit 1
@@ -120,11 +120,11 @@ valid() {
 runtest() {
        #echo "Testing silent mode"
        cleanup
-       $1 silent $2
+       "$1" silent "$2"
 
        #echo "Testing idempotency"
        cleanup
-       $1 idempotent $2
+       "$1" idempotent "$2"
 }
 
 
@@ -137,15 +137,15 @@ runtests() {
                cleanup
                applydot valid
        else
-               for F in $*; do
-                       runtest apply1 $F
+               for F in "$*"; do
+                       runtest apply1 "$F"
                done
        fi
 }
 
 
 # run over all .go files
-runtests $*
+runtests "$*"
 cleanup
 
 # done
index d95c9dd9d65196a4c0a736ab4af48b57a5856f91..c3c136f422892180f6b16d631494a101c078ecd1 100644 (file)
@@ -9,10 +9,10 @@ OFILES=\
        ar.$O\
 
 $(TARG): $(OFILES)
-       $(LD) -o $(TARG) -L$(GOROOT)/lib $(OFILES) -lmach -lbio -l9
+       $(LD) -o $(TARG) -L"$(GOROOT)"/lib $(OFILES) -lmach -lbio -l9
 
 clean:
        rm -f *.$O $(TARG)
 
 install: $(TARG)
-       cp $(TARG) $(GOBIN)/$(TARG)
+       cp $(TARG) "$(GOBIN)"/$(TARG)
index 8a1f023867742dc0976e32cda5be39a30673568f..b20b1daffd8535f8f1272792d3ec0cfad64eb24c 100644 (file)
@@ -10,5 +10,5 @@ clean:
        @true
 
 install: $(TARG)
-       ! test -f $(GOBIN)/$(TARG) || chmod u+w $(GOBIN)/$(TARG)
-       cp $(TARG) $(GOBIN)/$(TARG)
+       ! test -f "$(GOBIN)"/$(TARG) || chmod u+w "$(GOBIN)"/$(TARG)
+       cp $(TARG) "$(GOBIN)"/$(TARG)
index 5f87b4791d4a03520776204ff57ec36cba514c1f..75fd192171e9bb48cd8f1d758eb8b533a1860707 100755 (executable)
@@ -21,7 +21,7 @@ if [ ! -f [Mm]akefile ]; then
        exit 2
 fi
 
-. $GOROOT/src/Make.$GOARCH
+. "$GOROOT"/src/Make.$GOARCH
 if [ -z "$O" ]; then
        echo 'missing $O - maybe no Make.$GOARCH?' 1>&2
        exit 2
index 80365b86ee7290028a7990ba588893b9dee363d2..77ac918bc98a4e04b2efe15ba3d6c83937456a85 100644 (file)
@@ -2,13 +2,13 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include $(GOROOT)/src/Make.$(GOARCH)
+include ../../Make.$(GOARCH)
 
 TARG=goyacc
 GOFILES=\
        goyacc.go\
 
-include $(GOROOT)/src/Make.cmd
+include ../../Make.cmd
 
 units: goyacc units.y
        ./goyacc units.y
index 85f0722c8da21d471b747c47984ad3df187b9b03..f7d64bc123b7258f4d825b1d74a0a629af36a987 100644 (file)
@@ -2,10 +2,10 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include $(GOROOT)/src/Make.$(GOARCH)
+include ../../Make.$(GOARCH)
 
 TARG=hgpatch
 GOFILES=\
        main.go\
 
-include $(GOROOT)/src/Make.cmd
+include ../../Make.cmd
index db31b7b5aca3b617369ae9df668bef5021cb2ab3..8e1546b53f6cb747824d281f3524e2d9a2d8a9f9 100755 (executable)
@@ -7,7 +7,7 @@ set -e
 
 bash clean.bash
 
-. $GOROOT/src/Make.$GOARCH
+. "$GOROOT"/src/Make.$GOARCH
 if [ -z "$O" ]; then
        echo 'missing $O - maybe no Make.$GOARCH?' 1>&2
        exit 1
index b2134e6b5de2c8db11aecb32cc393190c79d4139..bb15451222a812a275c7ce61786f0fe46fe251a5 100644 (file)
@@ -13,12 +13,12 @@ OFILES=\
        nm.$O\
 
 $(TARG): $(OFILES)
-       $(LD) -o $(TARG) -L$(GOROOT)/lib $(OFILES) -lmach -lbio -l9
+       $(LD) -o $(TARG) -L"$(GOROOT)"/lib $(OFILES) -lmach -lbio -l9
 
 clean:
        rm -f *.$O $(TARG)
 
 install: $(TARG)
-       cp $(TARG) $(GOBIN)/$(TARG)
+       cp $(TARG) "$(GOBIN)"/$(TARG)
 
 $(OFILES): $(HFILES)
index f9012577ee19c17fc2a47f94d4106aa776b15c18..b29ba4595aedd63dc8ba72f01e19d00e800d3abc 100644 (file)
@@ -17,7 +17,7 @@ OFILES=\
 #      fns.h\
 
 $(TARG): $(OFILES)
-       $(LD) -o $(TARG) -L$(GOROOT)/lib $(OFILES) -lmach -lbio -l9
+       $(LD) -o $(TARG) -L"$(GOROOT)"/lib $(OFILES) -lmach -lbio -l9
 
 clean:
        rm -f *.$O $(TARG)
@@ -31,6 +31,6 @@ install-darwin: $(TARG)
        @true
 
 install-default: $(TARG)
-       cp $(TARG) $(GOBIN)/$(TARG)
+       cp $(TARG) "$(GOBIN)"/$(TARG)
 
 $(OFILES): $(HFILES)
index 12b72f01edde1d0f0df13e1eae3e5e3891dfdf8d..6f0739d2cec3ec1654ae6a1de020b2dfad497af9 100644 (file)
@@ -92,11 +92,11 @@ OFILES=\
        $(UTFOFILES)\
 
 HFILES=\
-       $(GOROOT)/include/u.h\
-       $(GOROOT)/include/libc.h\
+       "$(GOROOT)"/include/u.h\
+       "$(GOROOT)"/include/libc.h\
 
 install: $(LIB)
-       cp $(LIB) $(GOROOT)/lib
+       cp $(LIB) "$(GOROOT)/lib"
 
 $(LIB): $(OFILES)
        ar rsc $(LIB) $(OFILES)
@@ -111,7 +111,7 @@ clean:
        rm -f *.$O *.6 6.out $(LIB)
 
 nuke: clean
-       rm -f $(GOROOT)/lib/$(LIB)
+       rm -f "$(GOROOT)"/lib/$(LIB)
 
 #XLIB=$PLAN9/lib/$LIB
 
index bcd78347f1be2c1658dabbc953446b1035e50aed..32fdedd91494c8fdf0083df72d033878d56910c3 100644 (file)
@@ -45,10 +45,10 @@ OFILES=\
        bwrite.$O\
 
 HFILES=\
-       $(GOROOT)/include/bio.h\
+       ../../include/bio.h
 
 install: $(LIB)
-       cp $(LIB) $(GOROOT)/lib
+       cp $(LIB) ../../lib
 
 $(LIB): $(OFILES)
        ar rsc $(LIB) $(OFILES)
@@ -62,4 +62,4 @@ clean:
        rm -f $(OFILES) *.6 6.out $(LIB)
 
 nuke: clean
-       rm -f $(GOROOT)/lib/$(LIB)
+       rm -f ../../lib/$(LIB)
index 254e4622d584c16242e094495253eb2b76d8a4c8..b5ac6e33f1aec355183863f68b72704b8bd7aea1 100644 (file)
@@ -2,9 +2,14 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
+# ugly hack to deal with whitespaces in $GOROOT
+nullstring :=
+space := $(nullstring) # a space at the end
+QUOTED_GOROOT=$(subst $(space),\ ,$(GOROOT))
+
 all: libcgo.so
 
-install: $(GOROOT)/pkg/$(GOOS)_$(GOARCH)/libcgo.so
+install: $(QUOTED_GOROOT)/pkg/$(GOOS)_$(GOARCH)/libcgo.so
 
 OFILES=\
        $(GOOS)_$(GOARCH).o\
@@ -27,8 +32,8 @@ LDFLAGS_freebsd=-pthread -shared -lm
 libcgo.so: $(OFILES)
        gcc $(CFLAGS_$(GOARCH)) -o libcgo.so $(OFILES) $(LDFLAGS_$(GOOS))
 
-$(GOROOT)/pkg/$(GOOS)_$(GOARCH)/libcgo.so: libcgo.so
-       cp libcgo.so $@
+$(QUOTED_GOROOT)/pkg/$(GOOS)_$(GOARCH)/libcgo.so: libcgo.so
+       cp libcgo.so $(QUOTED_GOROOT)/pkg/$(GOOS)_$(GOARCH)
 
 clean:
        rm -f *.o *.so
index cde2cdf66c909af1a6955a26d6c8b462df983251..f1be126d2762b48a56fa56a4825703d74d3a3ce6 100644 (file)
@@ -49,10 +49,10 @@ OFILES=\
        8obj.$O\
        $(shell uname | tr A-Z a-z).$O\
 
-HFILES=$(GOROOT)/include/mach.h elf.h macho.h obj.h
+HFILES=../../include/mach.h elf.h macho.h obj.h
 
 install: $(LIB)
-       cp $(LIB) $(GOROOT)/lib
+       cp $(LIB) ../../lib
 
 $(LIB): $(OFILES)
        ar rsc $(LIB) $(OFILES)
@@ -63,5 +63,5 @@ clean:
        rm -f *.$O $(LIB)
 
 nuke: clean
-       rm -f $(GOROOT)/lib/$(LIB)
+       rm -f "$(GOROOT)"/lib/$(LIB)
 
index 7594541561ff7b99a40853458ef8c32432ecbd10..b007418db6bb5b47884c0d605c88bfef03a6cd9f 100755 (executable)
@@ -7,7 +7,7 @@ set -e
 GOBIN="${GOBIN:-$HOME/bin}"
 export MAKEFLAGS=-j4
 
-if ! test -f $GOROOT/include/u.h
+if ! test -f "$GOROOT"/include/u.h
 then
        echo '$GOROOT is not set correctly or not exported' 1>&2
        exit 1
index 249a9cee2583bf9605f769eabd09f1a9d02d9011..c9a812b76389fe6eb673883e454236d3184534ab 100755 (executable)
@@ -7,13 +7,13 @@ set -e
 GOBIN="${GOBIN:-$HOME/bin}"
 export MAKEFLAGS=-j4
 
-if ! test -f $GOROOT/include/u.h
+if ! test -f "$GOROOT"/include/u.h
 then
        echo '$GOROOT is not set correctly or not exported' 1>&2
        exit 1
 fi
 
-if ! test -d $GOBIN
+if ! test -d "$GOBIN"
 then
        echo '$GOBIN is not a directory or does not exist' 1>&2
        echo 'create it or set $GOBIN differently' 1>&2
@@ -36,18 +36,18 @@ darwin | linux | nacl | freebsd)
        exit 1
 esac
 
-rm -f $GOBIN/quietgcc
+rm -f "$GOBIN"/quietgcc
 CC=${CC:-gcc}
-sed -e "s|@CC@|$CC|" < quietgcc.bash > $GOBIN/quietgcc
-chmod +x $GOBIN/quietgcc
+sed -e "s|@CC@|$CC|" < quietgcc.bash > "$GOBIN"/quietgcc
+chmod +x "$GOBIN"/quietgcc
 
-rm -f $GOBIN/gomake
+rm -f "$GOBIN"/gomake
 MAKE=make
 if ! make --version 2>/dev/null | grep 'GNU Make' >/dev/null; then
        MAKE=gmake
 fi
-(echo '#!/bin/sh'; echo 'exec '$MAKE' "$@"') >$GOBIN/gomake
-chmod +x $GOBIN/gomake
+(echo '#!/bin/sh'; echo 'exec '$MAKE' "$@"') >"$GOBIN"/gomake
+chmod +x "$GOBIN"/gomake
 
 if ! (cd lib9 && which quietgcc) >/dev/null 2>&1; then
        echo "installed quietgcc as $GOBIN/quietgcc but 'which quietgcc' fails" 1>&2
index 32a261b3f75b7dbae47533d4369f64fe4c947f32..c9e070e62aada9612d01d69cf5a1164f8d10c4cb 100644 (file)
@@ -139,7 +139,7 @@ install: install.dirs
 test:  test.dirs
 
 nuke: nuke.dirs
-       rm -rf $(GOROOT)/pkg/*
+       rm -rf "$(GOROOT)"/pkg/*
 
 deps:
        ./deps.bash
index debe06284ec774ceaaa27ee19f5c7f7f355833e3..6a29de8f7594e2f541dfd65420ecb8506b278190 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include $(GOROOT)/src/Make.$(GOARCH)
+include ../../../Make.$(GOARCH)
 
 TARG=archive/tar
 GOFILES=\
@@ -10,4 +10,4 @@ GOFILES=\
        reader.go\
        writer.go\
 
-include $(GOROOT)/src/Make.pkg
+include ../../../Make.pkg
index 32848743adc6ba00300005fe77a5f51db73c7ad9..40b76b8497bf76b982c5ac87edcdeeb18088fc02 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include $(GOROOT)/src/Make.$(GOARCH)
+include ../../Make.$(GOARCH)
 
 TARG=asn1
 GOFILES=\
@@ -10,4 +10,4 @@ GOFILES=\
        common.go\
        marshal.go\
 
-include $(GOROOT)/src/Make.pkg
+include ../../Make.pkg
index 595a60797008d4fa2aca86747a5abb68fb97944e..520c2b852aa13068bd85918ad64082b953c50c3a 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include $(GOROOT)/src/Make.$(GOARCH)
+include ../../Make.$(GOARCH)
 
 TARG=big
 GOFILES=\
@@ -13,4 +13,4 @@ GOFILES=\
 OFILES=\
        arith_$(GOARCH).$O\
 
-include $(GOROOT)/src/Make.pkg
+include ../../Make.pkg
index bcb8752aaeb9f4c90d10117b499b5a95c190418d..c3dd595316647c3e24f50b9f80ba1657e3e97b02 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include $(GOROOT)/src/Make.$(GOARCH)
+include ../../Make.$(GOARCH)
 
 TARG=bignum
 GOFILES=\
@@ -11,4 +11,4 @@ GOFILES=\
        integer.go\
        rational.go\
 
-include $(GOROOT)/src/Make.pkg
+include ../../Make.pkg
index af41e888b6a68727a13374cd7085814cbedb3f88..1f5fc349bd614450e580ff43f2beecd24e9617dd 100644 (file)
@@ -2,10 +2,10 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include $(GOROOT)/src/Make.$(GOARCH)
+include ../../Make.$(GOARCH)
 
 TARG=bufio
 GOFILES=\
        bufio.go\
 
-include $(GOROOT)/src/Make.pkg
+include ../../Make.pkg
index 6d7d113e69fb96fa571fc460eadfe625fde932af..f9e18ac6b86c54e04b7732b18f887726eebbaf3b 100644 (file)
@@ -2,11 +2,11 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include $(GOROOT)/src/Make.$(GOARCH)
+include ../../Make.$(GOARCH)
 
 TARG=bytes
 GOFILES=\
        buffer.go\
        bytes.go\
 
-include $(GOROOT)/src/Make.pkg
+include ../../Make.pkg
index c71610cf9bc4b4ee4eed1cd4ea82cfb144b58337..6f9ee74d4d0cbb70a3b81147e92ca30740bc2de0 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include $(GOROOT)/src/Make.$(GOARCH)
+include ../../../Make.$(GOARCH)
 
 TARG=compress/flate
 GOFILES=\
@@ -14,4 +14,4 @@ GOFILES=\
        token.go\
        util.go\
 
-include $(GOROOT)/src/Make.pkg
+include ../../../Make.pkg
index 717a2d608a1463921ae84d97301b9163a2578211..ca26333f392e9ac99546b573c41024840b536245 100644 (file)
@@ -2,10 +2,10 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include $(GOROOT)/src/Make.$(GOARCH)
+include ../../../Make.$(GOARCH)
 
 TARG=compress/gzip
 GOFILES=\
        gunzip.go\
 
-include $(GOROOT)/src/Make.pkg
+include ../../../Make.pkg
index 94175a14707c835ab5450e9740b160c875616396..4cfda4f1b84ed1bc9217a34250c88eda4037a327 100644 (file)
@@ -2,11 +2,11 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include $(GOROOT)/src/Make.$(GOARCH)
+include ../../../Make.$(GOARCH)
 
 TARG=compress/zlib
 GOFILES=\
        reader.go\
        writer.go\
 
-include $(GOROOT)/src/Make.pkg
+include ../../../Make.pkg
index 2625d19ca4fa83379cdf45c2672ecc024904543d..244ebae063dbd59e99974f3839b7863fa430df3a 100644 (file)
@@ -2,10 +2,10 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include $(GOROOT)/src/Make.$(GOARCH)
+include ../../../Make.$(GOARCH)
 
 TARG=container/heap
 GOFILES=\
        heap.go\
 
-include $(GOROOT)/src/Make.pkg
+include ../../../Make.pkg
index 3ed4d1f6c8ac51211dbb88355aa14125ca7e0c20..2d5b357152a1e026920d48042f6308d60330df8f 100644 (file)
@@ -2,10 +2,10 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include $(GOROOT)/src/Make.$(GOARCH)
+include ../../../Make.$(GOARCH)
 
 TARG=container/list
 GOFILES=\
        list.go\
 
-include $(GOROOT)/src/Make.pkg
+include ../../../Make.pkg
index 70046cb54ea0a1db847756e3d2e1d192c890ad88..4755bab079869f20b22be1d5a303afea4bba9dc7 100644 (file)
@@ -2,10 +2,10 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include $(GOROOT)/src/Make.$(GOARCH)
+include ../../../Make.$(GOARCH)
 
 TARG=container/ring
 GOFILES=\
        ring.go\
 
-include $(GOROOT)/src/Make.pkg
+include ../../../Make.pkg
index 1237f2c3b57e1e03631b8a23e175fc45760590b5..8ccc34789b2b0ccb462b64a18c4830f54574e3e3 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include $(GOROOT)/src/Make.$(GOARCH)
+include ../../../Make.$(GOARCH)
 
 TARG=container/vector
 GOFILES=\
@@ -10,4 +10,4 @@ GOFILES=\
        stringvector.go\
        vector.go\
 
-include $(GOROOT)/src/Make.pkg
+include ../../../Make.pkg
index f7352cb91a1a45a1eb1385de4706574e277d7aa3..07d759b4b6487f74855403605f20d94134c84d67 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include $(GOROOT)/src/Make.$(GOARCH)
+include ../../../Make.$(GOARCH)
 
 TARG=crypto/aes
 GOFILES=\
@@ -10,4 +10,4 @@ GOFILES=\
        cipher.go\
        const.go\
 
-include $(GOROOT)/src/Make.pkg
+include ../../../Make.pkg
index a277d0dd94d785fd0f724c012654a672139be211..25c3483aebbd6a0ff78da3987a39ffaab767d307 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include $(GOROOT)/src/Make.$(GOARCH)
+include ../../../Make.$(GOARCH)
 
 TARG=crypto/block
 GOFILES=\
@@ -16,4 +16,4 @@ GOFILES=\
        ofb.go\
        xor.go\
 
-include $(GOROOT)/src/Make.pkg
+include ../../../Make.pkg
index 9da53a47457e0b15f892378063001d82f0f0b75c..d1a6bfc2bca23f1f9cda15bf8e300e39bdffc790 100644 (file)
@@ -2,10 +2,10 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include $(GOROOT)/src/Make.$(GOARCH)
+include ../../../Make.$(GOARCH)
 
 TARG=crypto/hmac
 GOFILES=\
        hmac.go\
 
-include $(GOROOT)/src/Make.pkg
+include ../../../Make.pkg
index 53fcf874a11d31dc03254e6d5d7ff25e1762a3a0..7f37f6a33a2ca62f38411b06f98a7b361f7b6e26 100644 (file)
@@ -2,11 +2,11 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include $(GOROOT)/src/Make.$(GOARCH)
+include ../../../Make.$(GOARCH)
 
 TARG=crypto/md5
 GOFILES=\
        md5.go\
        md5block.go\
 
-include $(GOROOT)/src/Make.pkg
+include ../../../Make.pkg
index 5c7e67fa0c02c88d4d9b345e5b5420531bad4644..7827b0817849059a5be780febff78bbc0f935de7 100644 (file)
@@ -2,10 +2,10 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include $(GOROOT)/src/Make.$(GOARCH)
+include ../../../Make.$(GOARCH)
 
 TARG=crypto/rc4
 GOFILES=\
        rc4.go\
 
-include $(GOROOT)/src/Make.pkg
+include ../../../Make.pkg
index ef0bd7c496b0ee80fe05b59ec3ce3776e5314b39..e4d81bc520b0d632bda4eb1774a60c4a14548689 100644 (file)
@@ -2,11 +2,11 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include $(GOROOT)/src/Make.$(GOARCH)
+include ../../../Make.$(GOARCH)
 
 TARG=crypto/rsa
 GOFILES=\
        rsa.go\
        pkcs1v15.go\
 
-include $(GOROOT)/src/Make.pkg
+include ../../../Make.pkg
index 940e2ff15f527bbceb7893e2cfb7e8ac21b4c943..f3422dd84f67e534adfe8bce9fa5215d1f5f0ad3 100644 (file)
@@ -2,11 +2,11 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include $(GOROOT)/src/Make.$(GOARCH)
+include ../../../Make.$(GOARCH)
 
 TARG=crypto/sha1
 GOFILES=\
        sha1.go\
        sha1block.go\
 
-include $(GOROOT)/src/Make.pkg
+include ../../../Make.pkg
index 4d245c6839aa49b176c0440a89c29f1d21f59470..fa5f7ef42c79992fa9ab94a320371e1b5367ebc0 100644 (file)
@@ -2,10 +2,10 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include $(GOROOT)/src/Make.$(GOARCH)
+include ../../../Make.$(GOARCH)
 
 TARG=crypto/subtle
 GOFILES=\
        constant_time.go\
 
-include $(GOROOT)/src/Make.pkg
+include ../../../Make.pkg
index 0c2d339988a6d4e23e05793451300b819d428685..55c9d87cf9e3b4ced377f0702e4889c9d914928f 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include $(GOROOT)/src/Make.$(GOARCH)
+include ../../../Make.$(GOARCH)
 
 TARG=crypto/tls
 GOFILES=\
@@ -18,4 +18,4 @@ GOFILES=\
        ca_set.go\
        tls.go\
 
-include $(GOROOT)/src/Make.pkg
+include ../../../Make.pkg
index 98bf44acc7d158acd1dd8278279951371b01f7c3..b2ecfdc01d7066dec17f1c9aaa34506fc82a0927 100644 (file)
@@ -2,10 +2,10 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include $(GOROOT)/src/Make.$(GOARCH)
+include ../../../Make.$(GOARCH)
 
 TARG=crypto/x509
 GOFILES=\
        x509.go\
 
-include $(GOROOT)/src/Make.pkg
+include ../../../Make.pkg
index 8825c597ec36cbb85405c4e11a9b305e6f2cb5dc..a626513c7c5fc375fa6d58d22fee405e6a18c931 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include $(GOROOT)/src/Make.$(GOARCH)
+include ../../../Make.$(GOARCH)
 
 TARG=debug/dwarf
 GOFILES=\
@@ -13,4 +13,4 @@ GOFILES=\
        type.go\
        unit.go\
 
-include $(GOROOT)/src/Make.pkg
+include ../../../Make.pkg
index ee3ca46d6a033dfb25cab1ac080a109649119573..931f9d24d4bc3798083b2d9b316027e5afe16ed1 100644 (file)
@@ -2,11 +2,11 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include $(GOROOT)/src/Make.$(GOARCH)
+include ../../../Make.$(GOARCH)
 
 TARG=debug/elf
 GOFILES=\
        elf.go\
        file.go\
 
-include $(GOROOT)/src/Make.pkg
+include ../../../Make.pkg
index 715288250f6b862233ee7ccd82239f4ea146df45..ac16b4ceeaf31842807ad928ae0f104d79e63660 100644 (file)
@@ -2,12 +2,12 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include $(GOROOT)/src/Make.$(GOARCH)
+include ../../../Make.$(GOARCH)
 
 TARG=debug/gosym
 GOFILES=\
        pclntab.go\
        symtab.go\
 
-include $(GOROOT)/src/Make.pkg
+include ../../../Make.pkg
 
index 1a88c73778a0dc5875373f781ccaf8bb8f19e602..d34aacf54bb1fa42f7ecd008f409c3252f4f8973 100644 (file)
@@ -2,11 +2,11 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include $(GOROOT)/src/Make.$(GOARCH)
+include ../../../Make.$(GOARCH)
 
 TARG=debug/macho
 GOFILES=\
        macho.go\
        file.go\
 
-include $(GOROOT)/src/Make.pkg
+include ../../../Make.pkg
index 1c6dc9089fec406cb7045ae4184e467cc79099aa..5444ec0dbbcd40cf4f51ffdd026846a9e03adea7 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include $(GOROOT)/src/Make.$(GOARCH)
+include ../../../Make.$(GOARCH)
 
 TARG=debug/proc
 GOFILES=\
@@ -10,4 +10,4 @@ GOFILES=\
        proc_$(GOOS).go\
        regs_$(GOOS)_$(GOARCH).go\
 
-include $(GOROOT)/src/Make.pkg
+include ../../../Make.pkg
index 8b3b0774cce0bc985800a3c24b8ecc2e779ad6b0..4a75c743233fc1c4dbbc63af259a41db34de637d 100644 (file)
@@ -2,11 +2,11 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include $(GOROOT)/src/Make.$(GOARCH)
+include ../../Make.$(GOARCH)
 
 TARG=ebnf
 GOFILES=\
        ebnf.go\
        parser.go\
 
-include $(GOROOT)/src/Make.pkg
+include ../../Make.pkg
index 5a7bc176c4d6d2ab34492e5d929d5ced7ae8536b..7ec14bd1aadedf1f6c292ede419ef6835a911dde 100644 (file)
@@ -2,10 +2,10 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include $(GOROOT)/src/Make.$(GOARCH)
+include ../../../Make.$(GOARCH)
 
 TARG=encoding/ascii85
 GOFILES=\
        ascii85.go\
 
-include $(GOROOT)/src/Make.pkg
+include ../../../Make.pkg
index 1afb0ebb8e43ab146d2ac4f23b2e6b5933d5efb3..8503b16633dbda1adf17ce79ac2209728fb877c9 100644 (file)
@@ -2,10 +2,10 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include $(GOROOT)/src/Make.$(GOARCH)
+include ../../../Make.$(GOARCH)
 
 TARG=encoding/base64
 GOFILES=\
        base64.go\
 
-include $(GOROOT)/src/Make.pkg
+include ../../../Make.pkg
index 69fd57c67b9f6d862667744608e5dfe51ded8776..23d4d6d436ea23c7acdffbbf0f6fca56224a0930 100644 (file)
@@ -2,10 +2,10 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include $(GOROOT)/src/Make.$(GOARCH)
+include ../../../Make.$(GOARCH)
 
 TARG=encoding/binary
 GOFILES=\
        binary.go\
 
-include $(GOROOT)/src/Make.pkg
+include ../../../Make.pkg
index 10587743aca2317c79d981747afd0b92c928ad81..09dd96f32e48047c8e769dc72aa2dc4b140f0ac8 100644 (file)
@@ -2,10 +2,10 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include $(GOROOT)/src/Make.$(GOARCH)
+include ../../../Make.$(GOARCH)
 
 TARG=encoding/git85
 GOFILES=\
        git.go\
 
-include $(GOROOT)/src/Make.pkg
+include ../../../Make.pkg
index bcfed2d45aa0bd96f7bee8aae5bb126e8e2f6462..d6849d9a56e75dc6ee744076be0fef77eef3f7ee 100644 (file)
@@ -2,10 +2,10 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include $(GOROOT)/src/Make.$(GOARCH)
+include ../../../Make.$(GOARCH)
 
 TARG=encoding/hex
 GOFILES=\
        hex.go\
 
-include $(GOROOT)/src/Make.pkg
+include ../../../Make.pkg
index 8bdfc747bf69f7cb1c5195e95478d91820290085..79490a57d923832c77bf4d676a84cc552b9d9c3c 100644 (file)
@@ -2,10 +2,10 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include $(GOROOT)/src/Make.$(GOARCH)
+include ../../../Make.$(GOARCH)
 
 TARG=encoding/pem
 GOFILES=\
        pem.go\
 
-include $(GOROOT)/src/Make.pkg
+include ../../../Make.pkg
index 9927eb3e7bd32df69a4c3ee418f03c631d42a837..9d88b8d8aa737842c202cd6370833d66ab4b433f 100644 (file)
@@ -2,10 +2,10 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include $(GOROOT)/src/Make.$(GOARCH)
+include ../../Make.$(GOARCH)
 
 TARG=exec
 GOFILES=\
        exec.go\
 
-include $(GOROOT)/src/Make.pkg
+include ../../Make.pkg
index 57836a1b3b8f8a1b1331181f856de51edd39f7b8..40543b1950acbb073940d321464e729680a8e6d6 100644 (file)
@@ -2,11 +2,11 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include $(GOROOT)/src/Make.$(GOARCH)
+include ../../../Make.$(GOARCH)
 
 TARG=exp/datafmt
 GOFILES=\
        datafmt.go\
        parser.go\
 
-include $(GOROOT)/src/Make.pkg
+include ../../../Make.pkg
index 44238c5cfb2df7dc4aff8610f859c168db7b5f93..7ab57448272184b51857f3c063b0600be8b5ab25 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include $(GOROOT)/src/Make.$(GOARCH)
+include ../../../Make.$(GOARCH)
 
 TARG=exp/draw
 GOFILES=\
@@ -11,4 +11,4 @@ GOFILES=\
        draw.go\
        event.go\
 
-include $(GOROOT)/src/Make.pkg
+include ../../../Make.pkg
index 65bedf7baa5f281bced4286eeb8455f0005c1ae5..46445876b08c4365cf8603376a5b152a075f75f5 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include $(GOROOT)/src/Make.$(GOARCH)
+include ../../../Make.$(GOARCH)
 
 TARG=exp/eval
 GOFILES=\
@@ -20,4 +20,4 @@ GOFILES=\
        value.go\
        world.go\
 
-include $(GOROOT)/src/Make.pkg
+include ../../../Make.pkg
index dabaa280ba6ebb5c22126161e29d31fe2a95c473..1755689ea1a552b51d809540fa24a2f44ccf6ecb 100755 (executable)
@@ -12,13 +12,13 @@ set -e
 make
 6g main.go && 6l main.6
 (
-for i in $(egrep -l '// \$G (\$D/)?\$F\.go \&\& \$L \$F\.\$A && \./\$A\.out' $GOROOT/test/*.go $GOROOT/test/*/*.go)
+for i in $(egrep -l '// \$G (\$D/)?\$F\.go \&\& \$L \$F\.\$A && \./\$A\.out' "$GOROOT"/test/*.go "$GOROOT"/test/*/*.go)
 do
        if grep '^import' $i >/dev/null 2>&1
        then
                true
        else
-               if $GOROOT/usr/austin/eval/6.out -f $i >/tmp/out 2>&1 && ! test -s /tmp/out
+               if "$GOROOT"/usr/austin/eval/6.out -f $i >/tmp/out 2>&1 && ! test -s /tmp/out
                then
                        echo PASS $i
                else
index 5c8d1e9df6b5e5ccca6ebf4a6799f49c78d14f93..19c86630f007a59ef79d8e9bb08777ee4df30664 100644 (file)
@@ -2,10 +2,10 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include $(GOROOT)/src/Make.$(GOARCH)
+include ../../../Make.$(GOARCH)
 
 TARG=exp/exception
 GOFILES=\
        exception.go\
 
-include $(GOROOT)/src/Make.pkg
+include ../../../Make.pkg
index f448089ce64935910381b004fd3097300f54406a..9adf714daab44ca373de7c3e0b5375e1f2133ba9 100644 (file)
@@ -2,11 +2,11 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include $(GOROOT)/src/Make.$(GOARCH)
+include ../../../Make.$(GOARCH)
 
 TARG=exp/iterable
 GOFILES=\
        array.go\
        iterable.go\
 
-include $(GOROOT)/src/Make.pkg
+include ../../../Make.pkg
index 743658b25b766dcf1a5d3486643ad7207c63a542..d966078ec7d7fa6e344548f5d1afe9e639068a2e 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include $(GOROOT)/src/Make.$(GOARCH)
+include ../../../../Make.$(GOARCH)
 
 TARG=exp/nacl/av
 GOFILES=\
@@ -10,4 +10,4 @@ GOFILES=\
        event.go\
        image.go\
 
-include $(GOROOT)/src/Make.pkg
+include ../../../../Make.pkg
index d30ae7d13d53f06c00b575808f8b8dd312840e5e..7dda292f5e8d9273bc81264a79c095634151f1df 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include $(GOROOT)/src/Make.$(GOARCH)
+include ../../../../Make.$(GOARCH)
 
 TARG=exp/nacl/srpc
 GOFILES=\
@@ -10,4 +10,4 @@ GOFILES=\
        msg.go\
        server.go\
 
-include $(GOROOT)/src/Make.pkg
+include ../../../../Make.pkg
index 31bb9df5c9866b37773585bdb9d66c9abff61173..141f9759d00c7f56b238e9c8a57c30c47f273779 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include $(GOROOT)/src/Make.$(GOARCH)
+include ../../../Make.$(GOARCH)
 
 TARG=exp/ogle
 GOFILES=\
@@ -20,7 +20,7 @@ GOFILES=\
 
 CLEANFILES+=ogle
 
-include $(GOROOT)/src/Make.pkg
+include ../../../Make.pkg
 
 main.$O: main.go package
        $(GC) -I_obj $<
index 49e8de6d1fecabcb28888a6770f0c23ee39fb120..5448917393c563cb4b0afd36b0e9285681766941 100644 (file)
@@ -2,10 +2,10 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include $(GOROOT)/src/Make.$(GOARCH)
+include ../../Make.$(GOARCH)
 
 TARG=expvar
 GOFILES=\
        expvar.go\
 
-include $(GOROOT)/src/Make.pkg
+include ../../Make.pkg
index faa95185cacb63a63ce5f11bec96b2bf4857accd..3ffbea83c22d324850496708a4d9b918b44fbf01 100644 (file)
@@ -2,10 +2,10 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include $(GOROOT)/src/Make.$(GOARCH)
+include ../../Make.$(GOARCH)
 
 TARG=flag
 GOFILES=\
        flag.go\
 
-include $(GOROOT)/src/Make.pkg
+include ../../Make.pkg
index 9273093e8924df590890c8a81c8ffa849e19d5f8..757af41bb44160850b7ac485eeacc22c6dca5694 100644 (file)
@@ -2,11 +2,11 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include $(GOROOT)/src/Make.$(GOARCH)
+include ../../Make.$(GOARCH)
 
 TARG=fmt
 GOFILES=\
        format.go\
        print.go\
 
-include $(GOROOT)/src/Make.pkg
+include ../../Make.pkg
index 1cafa633bf7c08c527d77d71eaca6f41152bb824..752e4535077c7b52b07ce07a90a6bf698e76799f 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include $(GOROOT)/src/Make.$(GOARCH)
+include ../../../Make.$(GOARCH)
 
 TARG=go/ast
 GOFILES=\
@@ -11,4 +11,4 @@ GOFILES=\
        filter.go\
        walk.go\
 
-include $(GOROOT)/src/Make.pkg
+include ../../../Make.pkg
index 60ce26483fcf4dda9e6c2d28bdd58eff03941853..1558ac30a06463d54d528415697e884813a1b50d 100644 (file)
@@ -2,11 +2,11 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include $(GOROOT)/src/Make.$(GOARCH)
+include ../../../Make.$(GOARCH)
 
 TARG=go/doc
 GOFILES=\
        comment.go\
        doc.go\
 
-include $(GOROOT)/src/Make.pkg
+include ../../../Make.pkg
index a8f14ff634de5921d67319c6a702308687593f25..d9b52a7d9f7af581f739dc4f6bd8b3514bd1e515 100644 (file)
@@ -2,11 +2,11 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include $(GOROOT)/src/Make.$(GOARCH)
+include ../../../Make.$(GOARCH)
 
 TARG=go/parser
 GOFILES=\
        interface.go\
        parser.go\
 
-include $(GOROOT)/src/Make.pkg
+include ../../../Make.pkg
index 5737a01158bfabb664d8f190fae86fdda26d551e..a0fe22e42c882a78e93271258de4295fcaf4e698 100644 (file)
@@ -2,11 +2,11 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include $(GOROOT)/src/Make.$(GOARCH)
+include ../../../Make.$(GOARCH)
 
 TARG=go/printer
 GOFILES=\
        printer.go\
        nodes.go\
 
-include $(GOROOT)/src/Make.pkg
+include ../../../Make.pkg
index 5e3f38d00bcff9b45432f64a4caa775f8a4ccc78..70d21a972564d3ec1a281cf4a3813c88fbc21816 100644 (file)
@@ -2,11 +2,11 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include $(GOROOT)/src/Make.$(GOARCH)
+include ../../../Make.$(GOARCH)
 
 TARG=go/scanner
 GOFILES=\
        errors.go\
        scanner.go\
 
-include $(GOROOT)/src/Make.pkg
+include ../../../Make.pkg
index 259fb29f6f76c56862d2bd1763caa13d0633d8d1..629196c5db008548acee202e4bc0fd4935e6906b 100644 (file)
@@ -2,10 +2,10 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include $(GOROOT)/src/Make.$(GOARCH)
+include ../../../Make.$(GOARCH)
 
 TARG=go/token
 GOFILES=\
        token.go\
 
-include $(GOROOT)/src/Make.pkg
+include ../../../Make.pkg
index 1a77252f743bda8bf64b94b361a05d7cbfe0b769..5b175b3476fdb6d8aac66d9aa1da44587b505796 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include $(GOROOT)/src/Make.$(GOARCH)
+include ../../Make.$(GOARCH)
 
 TARG=gob
 GOFILES=\
@@ -12,4 +12,4 @@ GOFILES=\
        encoder.go\
        type.go\
 
-include $(GOROOT)/src/Make.pkg
+include ../../Make.pkg
index 5bf470fd1c68fdcc898011487a0f8377df71d2cf..aaa641f7ca7a93a3f276f5a79f13c022f04b0269 100644 (file)
@@ -2,10 +2,10 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include $(GOROOT)/src/Make.$(GOARCH)
+include ../../Make.$(GOARCH)
 
 TARG=hash
 GOFILES=\
        hash.go\
 
-include $(GOROOT)/src/Make.pkg
+include ../../Make.pkg
index 8e5a3389b5d4f320a76af42492e344f6df25e55c..6f6d66fd07b8f3e704449ad8aeb13ee7244a30f4 100644 (file)
@@ -2,10 +2,10 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include $(GOROOT)/src/Make.$(GOARCH)
+include ../../../Make.$(GOARCH)
 
 TARG=hash/adler32
 GOFILES=\
        adler32.go\
 
-include $(GOROOT)/src/Make.pkg
+include ../../../Make.pkg
index dbfcda10cb4d4bffdaea9dbecd8b5f64d32f1bf2..071d89823ee6b809f672e56d6697ab6d5f652631 100644 (file)
@@ -2,10 +2,10 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include $(GOROOT)/src/Make.$(GOARCH)
+include ../../../Make.$(GOARCH)
 
 TARG=hash/crc32
 GOFILES=\
        crc32.go\
 
-include $(GOROOT)/src/Make.pkg
+include ../../../Make.pkg
index 9740678821c58a60b9e065af216468d8c0fc3db9..93852fe7114558caa9f5a6d3d9df7374d59857cc 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include $(GOROOT)/src/Make.$(GOARCH)
+include ../../Make.$(GOARCH)
 
 TARG=http
 GOFILES=\
@@ -13,4 +13,4 @@ GOFILES=\
        status.go\
        url.go\
 
-include $(GOROOT)/src/Make.pkg
+include ../../Make.pkg
index 318070826979803efdaefb9fd2d55f5a09080aa1..f1ba374dbacc1772043d5b57dd288a006f1eb18e 100644 (file)
@@ -2,11 +2,11 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include $(GOROOT)/src/Make.$(GOARCH)
+include ../../Make.$(GOARCH)
 
 TARG=image
 GOFILES=\
        color.go\
        image.go\
 
-include $(GOROOT)/src/Make.pkg
+include ../../Make.pkg
index 5c534af248ee213a38efa3beddb9ca072cce44c1..3ba0f44d343f17e70d4b3686b1da2a87f676bf9e 100644 (file)
@@ -2,11 +2,11 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include $(GOROOT)/src/Make.$(GOARCH)
+include ../../../Make.$(GOARCH)
 
 TARG=image/png
 GOFILES=\
        reader.go\
        writer.go\
 
-include $(GOROOT)/src/Make.pkg
+include ../../../Make.pkg
index bf124f4549eb3424dd81190cc12979b4ac8111ea..cbe691644ed3f757da1505698b4f8a1da6225a84 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include $(GOROOT)/src/Make.$(GOARCH)
+include ../../Make.$(GOARCH)
 
 TARG=io
 GOFILES=\
@@ -10,4 +10,4 @@ GOFILES=\
        pipe.go\
        utils.go\
 
-include $(GOROOT)/src/Make.pkg
+include ../../Make.pkg
index 061ab88cfaabd13684398131c181061448685a8a..1adeff721ae3f1859eaa67943e534b46aad0ef11 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include $(GOROOT)/src/Make.$(GOARCH)
+include ../../Make.$(GOARCH)
 
 TARG=json
 GOFILES=\
@@ -10,4 +10,4 @@ GOFILES=\
        parse.go\
        struct.go\
 
-include $(GOROOT)/src/Make.pkg
+include ../../Make.pkg
index b569c9e9fb35eea5b6a8a6f9f2d80418e0959c18..402be03bcc26c2ea96b3676a1b86386d43c725d4 100644 (file)
@@ -2,10 +2,10 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include $(GOROOT)/src/Make.$(GOARCH)
+include ../../Make.$(GOARCH)
 
 TARG=log
 GOFILES=\
        log.go\
 
-include $(GOROOT)/src/Make.pkg
+include ../../Make.pkg
index 8a108c802bda9d2b0d19f3659564731d1fe3c095..d7c39c0cfaaeca6d0695e0203f5420c790e18495 100644 (file)
@@ -2,10 +2,10 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include $(GOROOT)/src/Make.$(GOARCH)
+include ../../Make.$(GOARCH)
 
 TARG=malloc
 GOFILES=\
        malloc.go\
 
-include $(GOROOT)/src/Make.pkg
+include ../../Make.pkg
index 74072503cf214b5a7704dcfcea3fe7cd6a9a4268..f30f38fafe7b39a120f30c0a6dfd0edbc75f6ff9 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include $(GOROOT)/src/Make.$(GOARCH)
+include ../../Make.$(GOARCH)
 
 TARG=math
 
@@ -40,4 +40,4 @@ GOFILES=\
        $(filter-out $(NOGOFILES),$(ALLGOFILES))\
        $(subst .go,_decl.go,$(NOGOFILES))\
 
-include $(GOROOT)/src/Make.pkg
+include ../../Make.pkg
index a11b0009a1e8ceedbd0d830df833d2c7e7e19d1e..bb2cb39787a226c41e91e9281b3a9261ec600ce4 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include $(GOROOT)/src/Make.$(GOARCH)
+include ../../Make.$(GOARCH)
 
 TARG=net
 GOFILES=\
@@ -21,4 +21,4 @@ GOFILES=\
        udpsock.go\
        unixsock.go\
 
-include $(GOROOT)/src/Make.pkg
+include ../../Make.pkg
index f83250b543a9fb7a04cb97f020e55404a9548468..e87fbf81035be0a148f0c4792cdacd5cfcdd51dc 100644 (file)
@@ -2,10 +2,10 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include $(GOROOT)/src/Make.$(GOARCH)
+include ../../Make.$(GOARCH)
 
 TARG=once
 GOFILES=\
        once.go\
 
-include $(GOROOT)/src/Make.pkg
+include ../../Make.pkg
index 2b30483e9d228c36bc8ce3f6e0e9c577f8f746f9..fa92c76e35ed5249f380717bc3e81cb459350d17 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include $(GOROOT)/src/Make.$(GOARCH)
+include ../../Make.$(GOARCH)
 
 TARG=os
 GOFILES=\
@@ -19,4 +19,4 @@ GOFILES=\
        time.go\
        types.go\
 
-include $(GOROOT)/src/Make.pkg
+include ../../Make.pkg
index c32a56ed8fa10c681b0abccc16b2fc1cd1cf36a6..1666345c63f8a58d96f22168d0074a3249e6c7ab 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include $(GOROOT)/src/Make.$(GOARCH)
+include ../../Make.$(GOARCH)
 
 TARG=patch
 GOFILES=\
@@ -11,4 +11,4 @@ GOFILES=\
        patch.go\
        textdiff.go\
 
-include $(GOROOT)/src/Make.pkg
+include ../../Make.pkg
index d3a40bfcfad963f0a2330d1be29a13d67f466bfc..199b6800848b4daacc4bf34fd0cc5fba84490710 100644 (file)
@@ -2,10 +2,10 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include $(GOROOT)/src/Make.$(GOARCH)
+include ../../Make.$(GOARCH)
 
 TARG=path
 GOFILES=\
        path.go\
 
-include $(GOROOT)/src/Make.pkg
+include ../../Make.pkg
index fc07d3d59ec5e9b2df229d1f6b480d997d81db3d..068b6fdee0b579e993d37baeeb060a0e41aeb79c 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include $(GOROOT)/src/Make.$(GOARCH)
+include ../../Make.$(GOARCH)
 
 TARG=rand
 GOFILES=\
@@ -11,4 +11,4 @@ GOFILES=\
        rand.go\
        rng.go\
 
-include $(GOROOT)/src/Make.pkg
+include ../../Make.pkg
index 9e9ea3ad6e230341fda307c714ccdfe86e1363da..b72d3873f5b061340ce81a3909e5b62bba2a7cc6 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include $(GOROOT)/src/Make.$(GOARCH)
+include ../../Make.$(GOARCH)
 
 TARG=reflect
 GOFILES=\
@@ -10,4 +10,4 @@ GOFILES=\
        type.go\
        value.go\
 
-include $(GOROOT)/src/Make.pkg
+include ../../Make.pkg
index 84d1a5d5110e78986f32e3ace0a9b6f41b38f4c8..9f91c8e7aa2fe1bd0cfb29c875c971abf6b40479 100644 (file)
@@ -2,10 +2,10 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include $(GOROOT)/src/Make.$(GOARCH)
+include ../../Make.$(GOARCH)
 
 TARG=regexp
 GOFILES=\
        regexp.go\
 
-include $(GOROOT)/src/Make.pkg
+include ../../Make.pkg
index 9ea1782381369c7bac27bf3602d68ae4d9790278..4757b3aae02a2fd9f7eb8d9cc5db59097154fc00 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include $(GOROOT)/src/Make.$(GOARCH)
+include ../../Make.$(GOARCH)
 
 TARG=rpc
 GOFILES=\
@@ -10,4 +10,4 @@ GOFILES=\
        debug.go\
        server.go\
 
-include $(GOROOT)/src/Make.pkg
+include ../../Make.pkg
index ea6192ae28cbb851930b68ead2d7b734f07f5be3..80bfa5103caeae43c8c0b2e0ce8ad8bb0a06954d 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include $(GOROOT)/src/Make.$(GOARCH)
+include ../../Make.$(GOARCH)
 
 TARG=runtime
 
@@ -80,7 +80,7 @@ HFILES=\
        $(GOOS)/os.h\
        $(GOOS)/$(GOARCH)/defs.h\
 
-include $(GOROOT)/src/Make.pkg
+include ../../Make.pkg
 
 clean: clean-local
 
index a10e407d629dec40e21266b385aad7fdb64977e6..57c9f8f47c0182cce8545f9f82e2f6f665753cea 100644 (file)
@@ -2,10 +2,10 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include $(GOROOT)/src/Make.$(GOARCH)
+include ../../Make.$(GOARCH)
 
 TARG=sort
 GOFILES=\
        sort.go\
 
-include $(GOROOT)/src/Make.pkg
+include ../../Make.pkg
index af5c5e1108e8f7f86729dc0625a780047c1fb24d..8b20273b8568ce04f84f64c694351f737ae075b3 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include $(GOROOT)/src/Make.$(GOARCH)
+include ../../Make.$(GOARCH)
 
 TARG=strconv
 GOFILES=\
@@ -13,4 +13,4 @@ GOFILES=\
        itoa.go\
        quote.go\
 
-include $(GOROOT)/src/Make.pkg
+include ../../Make.pkg
index 3f0e429f6a765715a5e63d51d7ed07882ef37ba2..9bae470e97c1d1567749a776edf5d4da6b9ee3de 100644 (file)
@@ -2,11 +2,11 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include $(GOROOT)/src/Make.$(GOARCH)
+include ../../Make.$(GOARCH)
 
 TARG=strings
 GOFILES=\
        reader.go\
        strings.go\
 
-include $(GOROOT)/src/Make.pkg
+include ../../Make.pkg
index 0c18f8bcbce68fe61168584ad1fe45f105f737a4..2517d01e6ece7f0aa2962e403c15bb78d54bf984 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include $(GOROOT)/src/Make.$(GOARCH)
+include ../../Make.$(GOARCH)
 
 TARG=sync
 GOFILES=\
@@ -11,4 +11,4 @@ GOFILES=\
 OFILES=\
        asm_$(GOARCH).$O\
 
-include $(GOROOT)/src/Make.pkg
+include ../../Make.pkg
index 969cd0def0458d2efe294fe5d0227598bec7b13b..5673da9d278d4f78624858ebc6203551185ebce4 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include $(GOROOT)/src/Make.$(GOARCH)
+include ../../Make.$(GOARCH)
 
 TARG=syscall
 GOFILES=\
@@ -19,4 +19,4 @@ GOFILES=\
 OFILES=\
        asm_$(GOOS)_$(GOARCH).$O\
 
-include $(GOROOT)/src/Make.pkg
+include ../../Make.pkg
index 28cb50580300f444527ea5792533b29f9d8a4762..5beb88f0f65d511d098ae561743e27e65fd9d3ea 100644 (file)
@@ -2,10 +2,10 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include $(GOROOT)/src/Make.$(GOARCH)
+include ../../Make.$(GOARCH)
 
 TARG=tabwriter
 GOFILES=\
        tabwriter.go\
 
-include $(GOROOT)/src/Make.pkg
+include ../../Make.pkg
index 832f5046cc004d2133066ff262d2b1872c9b0919..c9c79f799a251324d570c0938ba509b2d7677ccb 100644 (file)
@@ -2,11 +2,11 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include $(GOROOT)/src/Make.$(GOARCH)
+include ../../Make.$(GOARCH)
 
 TARG=template
 GOFILES=\
        format.go\
        template.go\
 
-include $(GOROOT)/src/Make.pkg
+include ../../Make.pkg
index ffbd11111c48efcf6e69c9eb2473858a440ea262..64485489eb1776343ff2dbdbc86376760c3c1b1c 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include $(GOROOT)/src/Make.$(GOARCH)
+include ../../Make.$(GOARCH)
 
 TARG=testing
 GOFILES=\
@@ -10,4 +10,4 @@ GOFILES=\
        regexp.go\
        testing.go\
 
-include $(GOROOT)/src/Make.pkg
+include ../../Make.pkg
index a37a9d62280526cfc9e6e9fcaeb1dc96354c2448..2b9abd4b37585cc40fe5dddf0864570a2facd8c9 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include $(GOROOT)/src/Make.$(GOARCH)
+include ../../../Make.$(GOARCH)
 
 TARG=testing/iotest
 GOFILES=\
@@ -10,4 +10,4 @@ GOFILES=\
        reader.go\
        writer.go\
 
-include $(GOROOT)/src/Make.pkg
+include ../../../Make.pkg
index 7e3a354daa76c699fedfe3460b4e16a858bcbd87..0e97f2af2204a18ed7eeb85c745f2660296afc6f 100644 (file)
@@ -2,10 +2,10 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include $(GOROOT)/src/Make.$(GOARCH)
+include ../../../Make.$(GOARCH)
 
 TARG=testing/quick
 GOFILES=\
        quick.go\
 
-include $(GOROOT)/src/Make.pkg
+include ../../../Make.pkg
index 1b4882d5639a5dce66432dfcf9129e902453eb5e..2e13aeb2fb924e2123e8de09f0164ec7fc45612e 100644 (file)
@@ -2,10 +2,10 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include $(GOROOT)/src/Make.$(GOARCH)
+include ../../../Make.$(GOARCH)
 
 TARG=testing/script
 GOFILES=\
        script.go\
 
-include $(GOROOT)/src/Make.pkg
+include ../../../Make.pkg
index fef9753c876f56fbbe3071b15226dbcb94107371..ac441506972bfae7a397294ed14deaea24357c8b 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include $(GOROOT)/src/Make.$(GOARCH)
+include ../../Make.$(GOARCH)
 
 TARG=time
 GOFILES=\
@@ -11,4 +11,4 @@ GOFILES=\
        time.go\
        zoneinfo.go\
 
-include $(GOROOT)/src/Make.pkg
+include ../../Make.pkg
index e309902eae55bdda1b3ab03b034c8b32d05d9a3c..489467f0ec292aac3db3b7fd3c2276660d0ca8e8 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include $(GOROOT)/src/Make.$(GOARCH)
+include ../../Make.$(GOARCH)
 
 TARG=unicode
 GOFILES=\
@@ -10,7 +10,7 @@ GOFILES=\
        letter.go\
        tables.go\
 
-include $(GOROOT)/src/Make.pkg
+include ../../Make.pkg
 
 maketables: maketables.go
        $(GC) maketables.go
index b33adaa8a1160260886b217f0e55830dfe720f71..a013913c352a0397dab001f02b033415f5fb71c3 100644 (file)
@@ -2,10 +2,10 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include $(GOROOT)/src/Make.$(GOARCH)
+include ../../Make.$(GOARCH)
 
 TARG=utf8
 GOFILES=\
        utf8.go\
 
-include $(GOROOT)/src/Make.pkg
+include ../../Make.pkg
index 3c005c6059697eb77f770ffba1b19528af7f7721..38e32e7a4f1f2e142e070fed7d5ddc8295d2f167 100644 (file)
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include $(GOROOT)/src/Make.$(GOARCH)
+include ../../Make.$(GOARCH)
 
 TARG=xml
 
@@ -10,4 +10,4 @@ GOFILES=\
        read.go\
        xml.go\
 
-include $(GOROOT)/src/Make.pkg
+include ../../Make.pkg
index 68f9905912e7aebef351ed670fc10c3d9dbce8f0..d87fb231dd073fa165de6260645bb3e455042a17 100755 (executable)
@@ -12,7 +12,7 @@ esac
 
 for i in prof cov
 do
-       sudo cp $GOROOT/src/cmd/$i/6$i /usr/local/bin/6$i
+       sudo cp "$GOROOT"/src/cmd/$i/6$i /usr/local/bin/6$i
        sudo chgrp procmod /usr/local/bin/6$i
        sudo chmod g+s /usr/local/bin/6$i
 done
index 7c3eeab8e1952d07e9362008bee53ef6adcc8cc1..1bb14d3bad4bb956c836a0602618e554b05833f4 100755 (executable)
@@ -4,7 +4,7 @@
 # license that can be found in the LICENSE file.
 
 set -e
-. $GOROOT/src/Make.$GOARCH
+. "$GOROOT"/src/Make.$GOARCH
 PATH=.:$PATH
 
 mode=run