]> Cypherpunks repositories - gostls13.git/commitdiff
fix weird all.bash failures by running deps.bash before make clean runs in pkg directory.
authorRob Pike <r@golang.org>
Wed, 25 Nov 2009 05:07:05 +0000 (21:07 -0800)
committerRob Pike <r@golang.org>
Wed, 25 Nov 2009 05:07:05 +0000 (21:07 -0800)
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

src/make.bash
src/pkg/Makefile

index 7d0c2b350f8b898438b2f446016aa58a6dbb70ff..5807dbe4e978d028ca54dc7add81b2b2763a8c7d 100755 (executable)
@@ -31,10 +31,10 @@ amd64 | 386 | arm)
 esac
 
 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
 esac
 
@@ -73,6 +73,10 @@ if [ -d /selinux -a -f /selinux/booleans/allow_execstack ] ; then
        fi
 fi
 
+(
+       cd pkg;
+       bash deps.bash  # do this here so clean.bash will work in the pkg directory
+)
 bash clean.bash
 
 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
                                bash make.bash
                                ;;
                        pkg)
-                               bash deps.bash
                                gomake install
                                ;;
                        *)
index 549377db21e03f5cc63dfae46bcadb5340e75dd4..2b5e76c40af032dc469fd6177b0285576ca87c75 100644 (file)
@@ -145,4 +145,4 @@ nuke: nuke.dirs
 deps:
        ./deps.bash
 
-include Make.deps
+-include Make.deps