mirror of
https://github.com/golang/go
synced 2024-11-25 01:08:02 -07: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:
parent
4fa6d57f6e
commit
6c5e4e1854
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user