]> Cypherpunks repositories - gostls13.git/commitdiff
build: move goapi, quietgcc, cgo, gotype, ebnflint into go-tool
authorRuss Cox <rsc@golang.org>
Tue, 31 Jan 2012 15:38:07 +0000 (10:38 -0500)
committerRuss Cox <rsc@golang.org>
Tue, 31 Jan 2012 15:38:07 +0000 (10:38 -0500)
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5552054

src/Make.inc
src/cmd/api/goapi.go [moved from src/cmd/goapi/goapi.go with 99% similarity]
src/cmd/api/goapi_test.go [moved from src/cmd/goapi/goapi_test.go with 100% similarity]
src/cmd/api/testdata/src/pkg/p1/golden.txt [moved from src/cmd/goapi/testdata/src/pkg/p1/golden.txt with 100% similarity]
src/cmd/api/testdata/src/pkg/p1/p1.go [moved from src/cmd/goapi/testdata/src/pkg/p1/p1.go with 100% similarity]
src/cmd/api/testdata/src/pkg/p2/golden.txt [moved from src/cmd/goapi/testdata/src/pkg/p2/golden.txt with 100% similarity]
src/cmd/api/testdata/src/pkg/p2/p2.go [moved from src/cmd/goapi/testdata/src/pkg/p2/p2.go with 100% similarity]
src/cmd/go/pkg.go
src/make.bash
src/pkg/runtime/autogen.sh

index 818801f686f71c6c1556408775a5e466bba5031d..1853b9465f785308de4cbb75d26495aca488663d 100644 (file)
@@ -105,8 +105,8 @@ LD=$(QUOTED_GOROOT)/bin/go-tool/$(O)l
 OS=568vq
 CFLAGS=-FVw
 
-HOST_CC=quietgcc
-HOST_LD=quietgcc
+HOST_CC=$(QUOTED_GOROOT)/bin/go-tool/quietgcc
+HOST_LD=$(QUOTED_GOROOT)/bin/go-tool/quietgcc
 HOST_O=o
 HOST_YFLAGS=-d
 HOST_AR?=ar
similarity index 99%
rename from src/cmd/goapi/goapi.go
rename to src/cmd/api/goapi.go
index a9fbbeac3d39068580162bbf5f31ef5c3c3ad50f..c862280b2c83f553a2f00226a2eb3f1163591471 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.
 
-// Goapi computes the exported API of a set of Go packages.
+// Api computes the exported API of a set of Go packages.
 package main
 
 import (
index d1bc8d5ce5ab435f1bb584a58d30b705325a09ff..2a32e2aea4fec72c12ef6dde6599558f4eca7f81 100644 (file)
@@ -229,9 +229,13 @@ Loop:
 // isGoTool is the list of directories for Go programs that are installed in
 // $GOROOT/bin/go-tool.
 var isGoTool = map[string]bool{
-       "cmd/fix":  true,
-       "cmd/vet":  true,
-       "cmd/yacc": true,
+       "cmd/api":      true,
+       "cmd/cgo":      true,
+       "cmd/fix":      true,
+       "cmd/vet":      true,
+       "cmd/yacc":     true,
+       "exp/gotype":   true,
+       "exp/ebnflint": true,
 }
 
 func scanPackage(ctxt *build.Context, t *build.Tree, arg, importPath, dir string, stk *importStack) *Package {
index 2fdcb3b247972ce7cfb74ee148fca1c235f9d223..fafd843e02b83c25be4b1baa995fe661120c6e50 100755 (executable)
@@ -44,10 +44,11 @@ export MAKEFLAGS
 unset CDPATH   # in case user has it set
 
 rm -f "$GOBIN"/quietgcc
+rm -f "$GOROOT/bin/go-tool/quietgcc"
 CC=${CC:-gcc}
 export CC
-sed -e "s|@CC@|$CC|" < "$GOROOT"/src/quietgcc.bash > "$GOBIN"/quietgcc
-chmod +x "$GOBIN"/quietgcc
+sed -e "s|@CC@|$CC|" < "$GOROOT"/src/quietgcc.bash > "$GOROOT"/bin/go-tool/quietgcc
+chmod +x "$GOROOT"/bin/go-tool/quietgcc
 
 export GOMAKE="$GOROOT"/bin/go-tool/make
 rm -f "$GOBIN"/gomake
index ca443ba7dcc1970a4a0fa28f26941774d3345811..b2bb7ad2f10d604c5d90cf7c99b684bbaf956e1d 100755 (executable)
@@ -27,7 +27,7 @@ if [ "$GOROOT" = "" ]; then
 fi
 
 # Use goc2c to translate .goc files into arch-specific .c files.
-quietgcc -o goc2c -I "$GOROOT/include" goc2c.c "$GOROOT/lib/lib9.a"
+"$GOROOT"/bin/go-tool/quietgcc -o goc2c -I "$GOROOT/include" goc2c.c "$GOROOT/lib/lib9.a"
 for file in *.goc
 do
        for arch in $GOARCHES
@@ -39,7 +39,7 @@ do
 done
 
 # Version constants.
-quietgcc -o mkversion -I "$GOROOT/include" mkversion.c "$GOROOT/lib/lib9.a"
+"$GOROOT"/bin/go-tool/quietgcc -o mkversion -I "$GOROOT/include" mkversion.c "$GOROOT/lib/lib9.a"
 GOROOT="$GOROOT_FINAL" ./mkversion >z.tmp
 mv z.tmp zversion.go