mirror of
https://github.com/golang/go
synced 2024-11-21 12:24:39 -07:00
adc9337262
The compiledir pattern compiles all files xxx.dir/*.go in lexicographic order (which is assumed to coincide with the topological order of dependencies). R=rsc CC=golang-dev, remy https://golang.org/cl/6440048
57 lines
797 B
Plaintext
57 lines
797 B
Plaintext
# Copyright 2012 The Go Authors. All rights reserved.
|
|
# Use of this source code is governed by a BSD-style
|
|
# license that can be found in the LICENSE file.
|
|
|
|
# These function names are also known to
|
|
# (and are the plan for transitioning to) run.go.
|
|
|
|
compile() {
|
|
$G $D/$F.go
|
|
}
|
|
|
|
compiledir() {
|
|
for gofile in $D/$F.dir/*.go
|
|
do
|
|
$G ${gofile} || return 1
|
|
done
|
|
}
|
|
|
|
build() {
|
|
$G $D/$F.go && $L $F.$A
|
|
}
|
|
|
|
runoutput() {
|
|
go run "$D/$F.go" > tmp.go
|
|
go run tmp.go
|
|
}
|
|
|
|
run() {
|
|
gofiles=""
|
|
ingo=true
|
|
while $ingo; do
|
|
case "$1" in
|
|
*.go)
|
|
gofiles="$gofiles $1"
|
|
shift
|
|
;;
|
|
*)
|
|
ingo=false
|
|
;;
|
|
esac
|
|
done
|
|
|
|
$G $D/$F.go $gofiles && $L $F.$A && ./$A.out "$@"
|
|
}
|
|
|
|
cmpout() {
|
|
$G $D/$F.go && $L $F.$A && ./$A.out 2>&1 | cmp - $D/$F.out
|
|
}
|
|
|
|
errorcheck() {
|
|
errchk $G -e $D/$F.go
|
|
}
|
|
|
|
skip() {
|
|
true
|
|
}
|