1
0
mirror of https://github.com/golang/go synced 2024-09-25 11:20:13 -06:00

build: allow clean.bash to work on fresh checkout

Must be invoked as ./clean.bash --gomake make
(or --gomake gmake, depending on the name of
GNU make).

R=niemeyer
CC=golang-dev
https://golang.org/cl/4023065
This commit is contained in:
Russ Cox 2011-02-04 14:33:08 -05:00
parent 4fa6d57f6e
commit 6c5e4e1854
3 changed files with 13 additions and 8 deletions

View File

@ -25,8 +25,8 @@ for i in lib9 libbio libmach cmd pkg \
do(
cd "$GOROOT"/src/$i || exit 1
if test -f clean.bash; then
bash clean.bash
bash clean.bash --gomake $MAKE
else
gomake clean
$MAKE clean
fi
)done

View File

@ -3,9 +3,14 @@
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
gomake=gomake
if [ $1 == "--gomake" -a "$2" != "" ]; then
gomake=$2
fi
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 goinstall gotest goyacc hgpatch prof
do
cd $i
gomake clean
$gomake clean
cd ..
done

View File

@ -211,19 +211,19 @@ test.dirs: $(addsuffix .test, $(TEST))
bench.dirs: $(addsuffix .bench, $(BENCH))
%.clean:
+cd $* && gomake clean
+cd $* && $(MAKE) clean
%.install:
+cd $* && gomake install
+cd $* && $(MAKE) install
%.nuke:
+cd $* && gomake nuke
+cd $* && $(MAKE) nuke
%.test:
+cd $* && gomake test
+cd $* && $(MAKE) test
%.bench:
+cd $* && gomake bench
+cd $* && $(MAKE) bench
clean: clean.dirs