1
0
mirror of https://github.com/golang/go synced 2024-11-22 03:24:41 -07:00

build: move goapi, quietgcc, cgo, gotype, ebnflint into go-tool

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5552054
This commit is contained in:
Russ Cox 2012-01-31 10:38:07 -05:00
parent 6f428f0979
commit 9a15c2186c
10 changed files with 15 additions and 10 deletions

View 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

View 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 (

View 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/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 {

View File

@ -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

View File

@ -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