Commands written in Go depend on Go packages, so they
cannot be built by src/cmd/make.bash. They have been
built by src/make.bash after all the packages are done, but
we want to be able to use cgo (written in Go) during the build
of package net. To make this possible, build the commands
from src/pkg/Makefile instead of src/make.bash, so that they
are included in the package dependency analysis.
R=r
CC=golang-dev
https://golang.org/cl/
1972046
cd ..
# Note: commands written in Go are not listed here.
-# They are in ../make.bash so that they can be built
+# They are in ../pkg/Makefile so that they can be built
# after the Go libraries on which they depend.
for i in cc ${O}l ${O}a ${O}c gc ${O}g cov godefs gopack gotest nm prof
do
)
bash "$GOROOT"/src/clean.bash
-for i in lib9 libbio libmach cmd pkg libcgo cmd/cgo cmd/ebnflint cmd/godoc cmd/gofmt cmd/goinstall cmd/goyacc cmd/hgpatch
+# pkg builds libcgo and the Go programs in cmd.
+for i in lib9 libbio libmach cmd pkg
do
case "$i-$GOOS-$GOARCH" in
libcgo-nacl-* | cmd/*-nacl-* | libcgo-linux-arm)
utf8\
websocket\
xml\
+ ../libcgo\
+ ../cmd/cgo\
+ ../cmd/ebnflint\
+ ../cmd/godoc\
+ ../cmd/gofmt\
+ ../cmd/goinstall\
+ ../cmd/goyacc\
+ ../cmd/hgpatch\
NOTEST=\
debug/proc\
runtime/pprof\
syscall\
testing/iotest\
+ ../libcgo\
+ ../cmd/cgo\
+ ../cmd/ebnflint\
+ ../cmd/godoc\
+ ../cmd/gofmt\
+ ../cmd/goinstall\
+ ../cmd/goyacc\
+ ../cmd/hgpatch\
NOBENCH=\
container/vector\
./deps.bash
-include Make.deps
+
+../cmd/cgo.install: ../libcgo.install
# Get list of directories from Makefile
dirs=$(sed '1,/^DIRS=/d; /^$/,$d; s/\\//g' Makefile)
-dirpat=$(echo $dirs | sed 's/ /|/g; s/.*/^(&)$/')
+dirpat=$(echo $dirs C | sed 's/ /|/g; s/.*/^(&)$/')
for dir in $dirs; do (
cd $dir || exit 1
egrep "$dirpat" |
grep -v "^$dir\$" |
sed 's/$/.install/' |
+ sed 's;^C\.install;../cmd/cgo.install;' |
sort -u
)