diff options
| author | Devon H. O'Dell <devon.odell@gmail.com> | 2009-11-14 15:29:09 -0800 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2009-11-14 15:29:09 -0800 |
| commit | 553be8427ed619cff7f4e58e4a0dd8d858b49d26 (patch) | |
| tree | 941ec3d9eb7c810cae198cd58a03ce92d828c763 /src/make.bash | |
| parent | 96bcdff6622d49174465e4102bd07c49cc5cc169 (diff) | |
| download | go-553be8427ed619cff7f4e58e4a0dd8d858b49d26.tar.xz | |
Build changes to support work on the BSDs.
This does still contain some FreeBSD-specific bits, but
it's a pain to do partial diffs.
R=rsc
https://golang.org/cl/152138
Diffstat (limited to 'src/make.bash')
| -rwxr-xr-x | src/make.bash | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/make.bash b/src/make.bash index 06c1f128cd..2038fe2394 100755 --- a/src/make.bash +++ b/src/make.bash @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright 2009 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. @@ -29,7 +29,7 @@ amd64 | 386 | arm) esac case "$GOOS" in -darwin | linux | nacl) +darwin | linux | nacl | freebsd) ;; *) echo '$GOOS is set to <'$GOOS'>, must be darwin, linux, or nacl' 1>&2 @@ -41,6 +41,14 @@ CC=${CC:-gcc} sed -e "s|@CC@|$CC|" < quietgcc.bash > $GOBIN/quietgcc chmod +x $GOBIN/quietgcc +rm -f $GOBIN/gomake +MAKE=make +if ! make --version 2>/dev/null | grep 'GNU Make' >/dev/null; then + MAKE=gmake +fi +(echo '#!/bin/sh'; echo 'exec '$MAKE' "$@"') >$GOBIN/gomake +chmod +x $GOBIN/gomake + if ! (cd lib9 && which quietgcc) >/dev/null 2>&1; then echo "installed quietgcc as $GOBIN/quietgcc but 'which quietgcc' fails" 1>&2 echo "double-check that $GOBIN is in your "'$PATH' 1>&2 @@ -83,7 +91,7 @@ do bash make.bash ;; *) - make install + gomake install esac ) || exit 1 esac |
