@echo $(dir)
%.make:
- (cd $* && make)
+ (cd $* && gomake)
# To use cgo in a Go package, add a line
#
-#!/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.
-#!/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.
-#!/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.
-#!/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.
if test -f clean.bash; then
bash clean.bash
else
- make clean
+ gomake clean
fi
)done
-#!/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.
for i in cc 6l 6a 6c 8l 8a 8c 8g 5l 5a 5c 5g gc 6g gopack nm cgo cov ebnflint godefs godoc gofmt gotest goyacc hgpatch prof
do
cd $i
- make clean
+ gomake clean
cd ..
done
-#!/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.
-#!/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.
set -e
-make testpackage-clean
-make testpackage "GOTESTFILES=$gofiles"
+gomake testpackage-clean
+gomake testpackage "GOTESTFILES=$gofiles"
if $havex; then
$GC -o $xofile $xgofiles
fi
MAKEFLAGS=
MAKELEVEL=
-importpath=$(make -s importpath)
+importpath=$(gomake -s importpath)
{
# test functions are named TestFoo
# the grep -v eliminates methods and other special names
-#!/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.
cd ${O}l
bash mkenam
-make enam.o
+gomake enam.o
cd ..
for i in cc ${O}l ${O}a ${O}c gc ${O}g gopack nm cov godefs prof gotest
do
echo; echo; echo %%%% making $i %%%%; echo
cd $i
- make install
+ gomake install
cd ..
done
-#!/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.
-#!/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.
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
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
bash make.bash
;;
*)
- make install
+ gomake install
esac
) || exit 1
esac
test.dirs: $(addsuffix .test, $(TEST))
%.clean:
- +cd $* && make clean
+ +cd $* && gomake clean
%.install:
- +cd $* && make install
+ +cd $* && gomake install
%.nuke:
- +cd $* && make nuke
+ +cd $* && gomake nuke
%.test:
- +cd $* && make test
+ +cd $* && gomake test
clean: clean.dirs
-#!/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.
-#!/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.
-#!/bin/sh
+#!/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.
echo 'undefined $GOOS_$GOARCH:' "$GOOSARCH" 1>&2
exit 1
;;
+freebsd_amd64)
+ mksysnum="mksysnum_freebsd.sh /usr/src/sys/kern/syscalls.master"
+ mktypes="godefs -gsyscall -f-m64"
+ ;;
darwin_386)
mksyscall="mksyscall.sh -l32"
mksysnum="mksysnum_darwin.sh /home/rsc/pub/xnu-1228/bsd/kern/syscalls.master"
-#!/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.
#include <sys/event.h>
'
+includes_FreeBSD='
+#include <sys/wait.h>
+#include <sys/event.h>
+'
+
includes='
#include <sys/types.h>
#include <fcntl.h>
-#!/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.
-#!/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.
do
(
xcd $i
- make clean
- time make
- make install
- make test
+ gomake clean
+ time gomake
+ gomake install
+ gomake test
) || exit $?
done
}
# from what maketest does.
(xcd pkg/sync;
-make clean;
-time make
-GOMAXPROCS=10 make test
+gomake clean;
+time gomake
+GOMAXPROCS=10 gomake test
) || exit $?
(xcd cmd/gofmt
-make clean
-time make
-time make smoketest
+gomake clean
+time gomake
+time gomake smoketest
) || exit $?
(xcd cmd/ebnflint
-make clean
-time make
-time make test
+gomake clean
+time gomake
+time gomake test
) || exit $?
(xcd ../misc/cgo/stdio
-make clean
+gomake clean
./test.bash
) || exit $?
(xcd pkg/exp/ogle
-make clean
-time make ogle
+gomake clean
+time gomake ogle
) || exit $?
(xcd ../doc/progs
-#!/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.
-#!/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.