1
0
mirror of https://github.com/golang/go synced 2024-11-22 05:04:40 -07:00

build: create bin and pkg directories as needed; drop from hg

R=dsymonds, r
CC=golang-dev
https://golang.org/cl/2050043
This commit is contained in:
Russ Cox 2010-09-02 14:20:02 -04:00
parent 4e64555894
commit 5bf658cc8f
4 changed files with 7 additions and 9 deletions

View File

@ -1,4 +0,0 @@
Command binaries are installed in this directory.
Mercurial does not maintain empty directories.
This file helps.

View File

@ -1,4 +0,0 @@
Package binaries are installed in this directory tree.
Mercurial does not maintain empty directories.
This file helps.

View File

@ -22,7 +22,7 @@ if [ "$DIR1" != "$DIR2" ]; then
fi fi
export GOBIN=${GOBIN:-"$GOROOT/bin"} export GOBIN=${GOBIN:-"$GOROOT/bin"}
if [ ! -d "$GOBIN" ]; then if [ ! -d "$GOBIN" -a "$GOBIN" != "$GOROOT/bin" ]; then
echo '$GOBIN is not a directory or does not exist' 1>&2 echo '$GOBIN is not a directory or does not exist' 1>&2
echo 'create it or set $GOBIN differently' 1>&2 echo 'create it or set $GOBIN differently' 1>&2
exit 1 exit 1

View File

@ -10,6 +10,12 @@ if [ ! -f env.bash ]; then
fi fi
. ./env.bash . ./env.bash
# Create target directories
if [ "$GOBIN" = "$GOROOT/bin" ]; then
mkdir -p "$GOROOT/bin"
fi
mkdir -p "$GOROOT/pkg"
GOROOT_FINAL=${GOROOT_FINAL:-$GOROOT} GOROOT_FINAL=${GOROOT_FINAL:-$GOROOT}
MAKEFLAGS=${MAKEFLAGS:-"-j4"} MAKEFLAGS=${MAKEFLAGS:-"-j4"}