mirror of
https://github.com/golang/go
synced 2024-11-24 21:50:11 -07:00
build: let pkg/Makefile coordinate building of Go commands
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
This commit is contained in:
parent
5008927c5c
commit
15f336b675
@ -19,7 +19,7 @@ gomake enam.o
|
||||
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
|
||||
|
@ -52,7 +52,8 @@ fi
|
||||
)
|
||||
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)
|
||||
|
@ -123,6 +123,14 @@ DIRS=\
|
||||
utf8\
|
||||
websocket\
|
||||
xml\
|
||||
../libcgo\
|
||||
../cmd/cgo\
|
||||
../cmd/ebnflint\
|
||||
../cmd/godoc\
|
||||
../cmd/gofmt\
|
||||
../cmd/goinstall\
|
||||
../cmd/goyacc\
|
||||
../cmd/hgpatch\
|
||||
|
||||
NOTEST=\
|
||||
debug/proc\
|
||||
@ -140,6 +148,14 @@ NOTEST=\
|
||||
runtime/pprof\
|
||||
syscall\
|
||||
testing/iotest\
|
||||
../libcgo\
|
||||
../cmd/cgo\
|
||||
../cmd/ebnflint\
|
||||
../cmd/godoc\
|
||||
../cmd/gofmt\
|
||||
../cmd/goinstall\
|
||||
../cmd/goyacc\
|
||||
../cmd/hgpatch\
|
||||
|
||||
NOBENCH=\
|
||||
container/vector\
|
||||
@ -211,3 +227,5 @@ deps:
|
||||
./deps.bash
|
||||
|
||||
-include Make.deps
|
||||
|
||||
../cmd/cgo.install: ../libcgo.install
|
||||
|
@ -13,7 +13,7 @@ fi
|
||||
|
||||
# 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
|
||||
@ -31,6 +31,7 @@ for dir in $dirs; do (
|
||||
egrep "$dirpat" |
|
||||
grep -v "^$dir\$" |
|
||||
sed 's/$/.install/' |
|
||||
sed 's;^C\.install;../cmd/cgo.install;' |
|
||||
sort -u
|
||||
)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user