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(
|
do(
|
||||||
cd "$GOROOT"/src/$i || exit 1
|
cd "$GOROOT"/src/$i || exit 1
|
||||||
if test -f clean.bash; then
|
if test -f clean.bash; then
|
||||||
bash clean.bash
|
bash clean.bash --gomake $MAKE
|
||||||
else
|
else
|
||||||
gomake clean
|
$MAKE clean
|
||||||
fi
|
fi
|
||||||
)done
|
)done
|
||||||
|
@ -3,9 +3,14 @@
|
|||||||
# Use of this source code is governed by a BSD-style
|
# Use of this source code is governed by a BSD-style
|
||||||
# license that can be found in the LICENSE file.
|
# 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
|
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
|
do
|
||||||
cd $i
|
cd $i
|
||||||
gomake clean
|
$gomake clean
|
||||||
cd ..
|
cd ..
|
||||||
done
|
done
|
||||||
|
@ -211,19 +211,19 @@ test.dirs: $(addsuffix .test, $(TEST))
|
|||||||
bench.dirs: $(addsuffix .bench, $(BENCH))
|
bench.dirs: $(addsuffix .bench, $(BENCH))
|
||||||
|
|
||||||
%.clean:
|
%.clean:
|
||||||
+cd $* && gomake clean
|
+cd $* && $(MAKE) clean
|
||||||
|
|
||||||
%.install:
|
%.install:
|
||||||
+cd $* && gomake install
|
+cd $* && $(MAKE) install
|
||||||
|
|
||||||
%.nuke:
|
%.nuke:
|
||||||
+cd $* && gomake nuke
|
+cd $* && $(MAKE) nuke
|
||||||
|
|
||||||
%.test:
|
%.test:
|
||||||
+cd $* && gomake test
|
+cd $* && $(MAKE) test
|
||||||
|
|
||||||
%.bench:
|
%.bench:
|
||||||
+cd $* && gomake bench
|
+cd $* && $(MAKE) bench
|
||||||
|
|
||||||
clean: clean.dirs
|
clean: clean.dirs
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user