]> Cypherpunks repositories - gostls13.git/commitdiff
build: allow clean.bash to work on fresh checkout
authorRuss Cox <rsc@golang.org>
Fri, 4 Feb 2011 19:33:08 +0000 (14:33 -0500)
committerRuss Cox <rsc@golang.org>
Fri, 4 Feb 2011 19:33:08 +0000 (14:33 -0500)
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

src/clean.bash
src/cmd/clean.bash
src/pkg/Makefile

index d96eb52df044caa80291504b8e7fbc3daf61dd72..5c1dded5659332c3628d75a2500fa2fac588cb76 100755 (executable)
@@ -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
index 6349919a8ad06b976de33b2c6b3ab9c439157a30..b451670974067ff58871c1e6584cbcb8c60c58f6 100644 (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
index 6ba6951afc360ac5d340db5e4f163b6c930b19f1..2ca68f3e935b1f1c5507725feb27e446d00d4747 100644 (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