Commit a0c55432 authored by Rob Pike's avatar Rob Pike

fix weird all.bash failures by running deps.bash before make clean runs in pkg directory.

before this change, if pkg/Make.deps is missing or broken, clean.bash fails and the build dies
but not until much later.

add freebsd to error message about valid values of $GOOS

TODO: would be nice if this process exited when an error occurred. subshells make it hard

R=rsc
CC=golang-dev
https://golang.org/cl/160065
parent 28f19140
...@@ -31,10 +31,10 @@ amd64 | 386 | arm) ...@@ -31,10 +31,10 @@ amd64 | 386 | arm)
esac esac
case "$GOOS" in case "$GOOS" in
darwin | linux | nacl | freebsd) darwin | freebsd | linux | nacl)
;; ;;
*) *)
echo '$GOOS is set to <'$GOOS'>, must be darwin, linux, or nacl' 1>&2 echo '$GOOS is set to <'$GOOS'>, must be darwin, freebsd, linux, or nacl' 1>&2
exit 1 exit 1
esac esac
...@@ -73,6 +73,10 @@ if [ -d /selinux -a -f /selinux/booleans/allow_execstack ] ; then ...@@ -73,6 +73,10 @@ if [ -d /selinux -a -f /selinux/booleans/allow_execstack ] ; then
fi fi
fi fi
(
cd pkg;
bash deps.bash # do this here so clean.bash will work in the pkg directory
)
bash clean.bash bash clean.bash
for i in lib9 libbio libmach cmd pkg libcgo cmd/cgo cmd/ebnflint cmd/godoc cmd/gofmt cmd/goyacc cmd/hgpatch for i in lib9 libbio libmach cmd pkg libcgo cmd/cgo cmd/ebnflint cmd/godoc cmd/gofmt cmd/goyacc cmd/hgpatch
...@@ -93,7 +97,6 @@ do ...@@ -93,7 +97,6 @@ do
bash make.bash bash make.bash
;; ;;
pkg) pkg)
bash deps.bash
gomake install gomake install
;; ;;
*) *)
......
...@@ -145,4 +145,4 @@ nuke: nuke.dirs ...@@ -145,4 +145,4 @@ nuke: nuke.dirs
deps: deps:
./deps.bash ./deps.bash
include Make.deps -include Make.deps
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