Commit 9a15c218 authored by Russ Cox's avatar Russ Cox

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

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5552054
parent 6f428f09
...@@ -105,8 +105,8 @@ LD=$(QUOTED_GOROOT)/bin/go-tool/$(O)l ...@@ -105,8 +105,8 @@ LD=$(QUOTED_GOROOT)/bin/go-tool/$(O)l
OS=568vq OS=568vq
CFLAGS=-FVw CFLAGS=-FVw
HOST_CC=quietgcc HOST_CC=$(QUOTED_GOROOT)/bin/go-tool/quietgcc
HOST_LD=quietgcc HOST_LD=$(QUOTED_GOROOT)/bin/go-tool/quietgcc
HOST_O=o HOST_O=o
HOST_YFLAGS=-d HOST_YFLAGS=-d
HOST_AR?=ar HOST_AR?=ar
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style // Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file. // 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 package main
import ( import (
......
...@@ -229,9 +229,13 @@ Loop: ...@@ -229,9 +229,13 @@ Loop:
// isGoTool is the list of directories for Go programs that are installed in // isGoTool is the list of directories for Go programs that are installed in
// $GOROOT/bin/go-tool. // $GOROOT/bin/go-tool.
var isGoTool = map[string]bool{ var isGoTool = map[string]bool{
"cmd/fix": true, "cmd/api": true,
"cmd/vet": true, "cmd/cgo": true,
"cmd/yacc": 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 { func scanPackage(ctxt *build.Context, t *build.Tree, arg, importPath, dir string, stk *importStack) *Package {
......
...@@ -44,10 +44,11 @@ export MAKEFLAGS ...@@ -44,10 +44,11 @@ export MAKEFLAGS
unset CDPATH # in case user has it set unset CDPATH # in case user has it set
rm -f "$GOBIN"/quietgcc rm -f "$GOBIN"/quietgcc
rm -f "$GOROOT/bin/go-tool/quietgcc"
CC=${CC:-gcc} CC=${CC:-gcc}
export CC export CC
sed -e "s|@CC@|$CC|" < "$GOROOT"/src/quietgcc.bash > "$GOBIN"/quietgcc sed -e "s|@CC@|$CC|" < "$GOROOT"/src/quietgcc.bash > "$GOROOT"/bin/go-tool/quietgcc
chmod +x "$GOBIN"/quietgcc chmod +x "$GOROOT"/bin/go-tool/quietgcc
export GOMAKE="$GOROOT"/bin/go-tool/make export GOMAKE="$GOROOT"/bin/go-tool/make
rm -f "$GOBIN"/gomake rm -f "$GOBIN"/gomake
......
...@@ -27,7 +27,7 @@ if [ "$GOROOT" = "" ]; then ...@@ -27,7 +27,7 @@ if [ "$GOROOT" = "" ]; then
fi fi
# Use goc2c to translate .goc files into arch-specific .c files. # 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 for file in *.goc
do do
for arch in $GOARCHES for arch in $GOARCHES
...@@ -39,7 +39,7 @@ do ...@@ -39,7 +39,7 @@ do
done done
# Version constants. # 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 GOROOT="$GOROOT_FINAL" ./mkversion >z.tmp
mv z.tmp zversion.go mv z.tmp zversion.go
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment