diff --git a/src/clean.bash b/src/clean.bash index cf290295170..1c568a59105 100755 --- a/src/clean.bash +++ b/src/clean.bash @@ -5,15 +5,15 @@ rm -rf $GOROOT/pkg/[0-9a-zA-Z_]* rm -f $GOROOT/lib/*.[6a] -for i in lib9 libbio libmach libregexp cmd pkg -do +for i in lib9 libbio libcgo libmach libregexp cmd pkg \ + ../misc/cgo/gmp ../misc/cgo/stdio \ + ../usr/r/rpc ../usr/dsymonds/iterable \ + ../usr/austin/eval ../usr/austin/ogle ../test/bench +do( cd $i - case $i in - cmd) + if test -f clean.bash; then bash clean.bash - ;; - *) + else make clean - esac - cd .. -done + fi +)done diff --git a/src/cmd/5a/Makefile b/src/cmd/5a/Makefile index ac2931ed04a..87c9d68cda7 100644 --- a/src/cmd/5a/Makefile +++ b/src/cmd/5a/Makefile @@ -34,7 +34,7 @@ y.tab.c: y.tab.h test -f y.tab.c && touch y.tab.c clean: - rm -f $(OFILES) $(TARG) *.5 enam.c 5.out a.out y.tab.h y.tab.c + rm -f *.$O $(TARG) *.5 enam.c 5.out a.out y.tab.h y.tab.c install: $(TARG) cp $(TARG) $(GOBIN)/$(TARG) diff --git a/src/cmd/5c/Makefile b/src/cmd/5c/Makefile index 96219bdbaf3..be9f4c52a99 100644 --- a/src/cmd/5c/Makefile +++ b/src/cmd/5c/Makefile @@ -34,7 +34,7 @@ $(TARG): $(OFILES) $(LIB) $(OFILES): $(HFILES) clean: - rm -f $(OFILES) $(TARG) *.5 enam.c 5.out a.out + rm -f *.$O $(TARG) *.5 enam.c 5.out a.out install: $(TARG) cp $(TARG) $(GOBIN)/$(TARG) diff --git a/src/cmd/5g/Makefile b/src/cmd/5g/Makefile index 2d4831ba9e3..05915a75e54 100644 --- a/src/cmd/5g/Makefile +++ b/src/cmd/5g/Makefile @@ -32,7 +32,7 @@ $(TARG): $(OFILES) $(LIB) $(OFILES): $(HFILES) clean: - rm -f $(OFILES) $(TARG) *.5 enam.c 5.out a.out + rm -f *.o $(TARG) *.5 enam.c 5.out a.out install: $(TARG) cp $(TARG) $(GOBIN)/$(TARG) diff --git a/src/cmd/5l/Makefile b/src/cmd/5l/Makefile index d2c2f76e1ed..44ee2ead121 100644 --- a/src/cmd/5l/Makefile +++ b/src/cmd/5l/Makefile @@ -34,7 +34,7 @@ enam.c: 5.out.h sh mkenam clean: - rm -f $(OFILES) $(TARG) *.5 enam.c 5.out a.out + rm -f *.o $(TARG) *.5 enam.c 5.out a.out install: $(TARG) cp $(TARG) $(GOBIN)/$(TARG) diff --git a/src/cmd/6a/Makefile b/src/cmd/6a/Makefile index 38548c05f07..0050921b577 100644 --- a/src/cmd/6a/Makefile +++ b/src/cmd/6a/Makefile @@ -34,7 +34,7 @@ y.tab.c: y.tab.h test -f y.tab.c && touch y.tab.c clean: - rm -f $(OFILES) $(TARG) *.6 enam.c 6.out a.out y.tab.h y.tab.c + rm -f *.$O $(TARG) *.6 enam.c 6.out a.out y.tab.h y.tab.c install: $(TARG) cp $(TARG) $(GOBIN)/$(TARG) diff --git a/src/cmd/6c/Makefile b/src/cmd/6c/Makefile index d5daa9e1b47..1cae39e1be5 100644 --- a/src/cmd/6c/Makefile +++ b/src/cmd/6c/Makefile @@ -35,7 +35,7 @@ $(TARG): $(OFILES) $(LIB) $(OFILES): $(HFILES) clean: - rm -f $(OFILES) $(TARG) *.6 enam.c 6.out a.out + rm -f *.$O $(TARG) *.6 enam.c 6.out a.out install: $(TARG) cp $(TARG) $(GOBIN)/$(TARG) diff --git a/src/cmd/6g/Makefile b/src/cmd/6g/Makefile index 2a1819618e2..6538c55289b 100644 --- a/src/cmd/6g/Makefile +++ b/src/cmd/6g/Makefile @@ -33,7 +33,7 @@ $(TARG): $(OFILES) $(LIB) $(OFILES): $(HFILES) clean: - rm -f $(OFILES) $(TARG) *.6 enam.c 6.out a.out + rm -f $(TARG) enam.c 6.out a.out *.$O *.6 install: $(TARG) cp $(TARG) $(GOBIN)/$(TARG) diff --git a/src/cmd/6l/Makefile b/src/cmd/6l/Makefile index 4821f9d91e5..82de18448db 100644 --- a/src/cmd/6l/Makefile +++ b/src/cmd/6l/Makefile @@ -37,7 +37,7 @@ enam.c: 6.out.h sh mkenam clean: - rm -f $(OFILES) $(TARG) *.6 enam.c 6.out a.out + rm -f *.$O $(TARG) *.6 enam.c 6.out a.out install: $(TARG) cp $(TARG) $(GOBIN)/$(TARG) diff --git a/src/cmd/8a/Makefile b/src/cmd/8a/Makefile index ae221632b4e..cb5897e0848 100644 --- a/src/cmd/8a/Makefile +++ b/src/cmd/8a/Makefile @@ -11,12 +11,10 @@ HFILES=\ a.h\ y.tab.h\ ../8l/8.out.h\ - compat.h\ OFILES=\ y.tab.$O\ lex.$O\ - compat.$O\ ../8l/enam.$O\ YFILES=\ @@ -36,7 +34,7 @@ y.tab.c: y.tab.h test -f y.tab.c && touch y.tab.c clean: - rm -f $(OFILES) $(TARG) *.6 enam.c 6.out a.out y.tab.h y.tab.c + rm -f *.$O $(TARG) *.6 enam.c 6.out a.out y.tab.h y.tab.c install: $(TARG) cp $(TARG) $(GOBIN)/$(TARG) diff --git a/src/cmd/8c/Makefile b/src/cmd/8c/Makefile index 5d8d79fe33e..0f3973910bb 100644 --- a/src/cmd/8c/Makefile +++ b/src/cmd/8c/Makefile @@ -37,7 +37,7 @@ $(TARG): $(OFILES) $(LIB) $(OFILES): $(HFILES) clean: - rm -f $(OFILES) $(TARG) *.8 8.out a.out + rm -f *.$O $(TARG) *.8 8.out a.out install: $(TARG) cp $(TARG) $(GOBIN)/$(TARG) diff --git a/src/cmd/8g/Makefile b/src/cmd/8g/Makefile index 7325d62d9c8..b5c272ea459 100644 --- a/src/cmd/8g/Makefile +++ b/src/cmd/8g/Makefile @@ -34,7 +34,7 @@ $(TARG): $(OFILES) $(LIB) $(OFILES): $(HFILES) clean: - rm -f $(OFILES) $(TARG) *.8 enam.c 8.out a.out + rm -f *.$O $(TARG) *.8 enam.c 8.out a.out install: $(TARG) cp $(TARG) $(GOBIN)/$(TARG) diff --git a/src/cmd/8l/Makefile b/src/cmd/8l/Makefile index e0ba629e6e4..4520a4a1ecb 100644 --- a/src/cmd/8l/Makefile +++ b/src/cmd/8l/Makefile @@ -36,7 +36,7 @@ enam.c: 8.out.h sh mkenam clean: - rm -f $(OFILES) $(TARG) *.8 enam.c 8.out a.out + rm -f *.$O $(TARG) *.8 enam.c 8.out a.out install: $(TARG) cp $(TARG) $(GOBIN)/$(TARG) diff --git a/src/cmd/ar/Makefile b/src/cmd/ar/Makefile index f0e51afdd49..cbed2617d88 100644 --- a/src/cmd/ar/Makefile +++ b/src/cmd/ar/Makefile @@ -16,7 +16,7 @@ $(TARG): $(OFILES) $(LD) -o $(TARG) -L$(GOROOT)/lib $(OFILES) -lmach -lbio -l9 clean: - rm -f $(OFILES) $(TARG) + rm -f *.$O $(TARG) install: $(TARG) cp $(TARG) $(GOBIN)/$(TARG) diff --git a/src/cmd/cc/Makefile b/src/cmd/cc/Makefile index 9eea5a17899..98b89f0a286 100644 --- a/src/cmd/cc/Makefile +++ b/src/cmd/cc/Makefile @@ -42,6 +42,6 @@ y.tab.c: y.tab.h test -f y.tab.c && touch y.tab.c clean: - rm -f $(OFILES) *.6 enam.c 6.out a.out y.tab.h y.tab.c $(LIB) + rm -f *.$O *.6 enam.c 6.out a.out y.tab.h y.tab.c $(LIB) install: $(LIB) diff --git a/src/cmd/clean.bash b/src/cmd/clean.bash index 8e6e5a7f1f7..8432c9f22bb 100644 --- a/src/cmd/clean.bash +++ b/src/cmd/clean.bash @@ -3,7 +3,7 @@ # 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 ar db nm acid cov ebnflint godefs godoc gofmt prof gotest +for i in cc 6l 6a 6c 8l 8a 8c 8g 5l 5a 5c 5g gc 6g ar db nm acid cgo cov ebnflint godefs godoc gofmt prof gotest do cd $i make clean diff --git a/src/cmd/cov/Makefile b/src/cmd/cov/Makefile index 9c0d8abaa05..a264fdc21cc 100644 --- a/src/cmd/cov/Makefile +++ b/src/cmd/cov/Makefile @@ -20,7 +20,7 @@ $(TARG): $(OFILES) $(LD) -o $(TARG) -L$(GOROOT)/lib $(OFILES) -lmach -lregexp9 -lbio -l9 clean: - rm -f $(OFILES) $(TARG) + rm -f *.$O $(TARG) install: install-$(shell uname | tr A-Z a-z) install-linux: install-default diff --git a/src/cmd/gc/Makefile b/src/cmd/gc/Makefile index 1e116a9acff..d552a910157 100644 --- a/src/cmd/gc/Makefile +++ b/src/cmd/gc/Makefile @@ -64,6 +64,6 @@ opnames.h: mkopnames go.h ./mkopnames go.h >opnames.h clean: - rm -f $(OFILES) *.6 enam.c 6.out a.out y.tab.h y.tab.c $(LIB) mkbuiltin1 builtin.c _builtin.c + rm -f *.[568o] enam.c [568].out a.out y.tab.h y.tab.c $(LIB) mkbuiltin1 builtin.c _builtin.c install: $(LIB) diff --git a/src/cmd/godefs/Makefile b/src/cmd/godefs/Makefile index 819f94a0045..d3215c87d6f 100644 --- a/src/cmd/godefs/Makefile +++ b/src/cmd/godefs/Makefile @@ -16,7 +16,7 @@ $(TARG): $(OFILES) $(LD) -o $(TARG) -L$(GOROOT)/lib $(OFILES) -lbio -l9 clean: - rm -f $(OFILES) $(TARG) + rm -f *.$O $(TARG) install: $(TARG) cp $(TARG) $(GOBIN)/$(TARG) diff --git a/src/cmd/nm/Makefile b/src/cmd/nm/Makefile index 00d9beebfe4..b2134e6b5de 100644 --- a/src/cmd/nm/Makefile +++ b/src/cmd/nm/Makefile @@ -16,7 +16,7 @@ $(TARG): $(OFILES) $(LD) -o $(TARG) -L$(GOROOT)/lib $(OFILES) -lmach -lbio -l9 clean: - rm -f $(OFILES) $(TARG) + rm -f *.$O $(TARG) install: $(TARG) cp $(TARG) $(GOBIN)/$(TARG) diff --git a/src/cmd/prof/Makefile b/src/cmd/prof/Makefile index daab2df1bfa..7ebc19d63fa 100644 --- a/src/cmd/prof/Makefile +++ b/src/cmd/prof/Makefile @@ -20,7 +20,7 @@ $(TARG): $(OFILES) $(LD) -o $(TARG) -L$(GOROOT)/lib $(OFILES) -lmach -lbio -l9 clean: - rm -f $(OFILES) $(TARG) + rm -f *.$O $(TARG) install: install-$(shell uname | tr A-Z a-z) install-linux: install-default diff --git a/test/bench/clean.bash b/test/bench/clean.bash new file mode 100755 index 00000000000..d56c0e39405 --- /dev/null +++ b/test/bench/clean.bash @@ -0,0 +1,4 @@ +#!/bin/sh + +OS=568 +rm -f [$OS].out *.[$OS] diff --git a/usr/austin/ogle/Makefile b/usr/austin/ogle/Makefile index df0bb2d32d4..9ea9beabe9d 100644 --- a/usr/austin/ogle/Makefile +++ b/usr/austin/ogle/Makefile @@ -18,6 +18,8 @@ GOFILES=\ process.go\ vars.go\ +CLEANFILES+=ogle + include $(GOROOT)/src/Make.pkg main.$O: main.go package