1
0
mirror of https://github.com/golang/go synced 2024-11-21 21:54:40 -07:00

Add 'bench' target to makefiles.

R=rsc, agl, r
CC=golang-dev
https://golang.org/cl/188043
This commit is contained in:
Adam Langley 2010-01-12 15:43:20 -08:00
parent 3daf133f35
commit cbd3b2e8d5
2 changed files with 15 additions and 0 deletions

View File

@ -53,6 +53,9 @@ clean:
test: test:
$(QUOTED_GOBIN)/gotest $(QUOTED_GOBIN)/gotest
bench:
$(QUOTED_GOBIN)/gotest -benchmarks=. -match="Do not run tests"
nuke: clean nuke: clean
rm -f $(pkgdir)/$(TARG).a rm -f $(pkgdir)/$(TARG).a

View File

@ -134,13 +134,20 @@ NOTEST=\
testing/iotest\ testing/iotest\
xgb\ xgb\
NOBENCH=\
container/vector\
TEST=\ TEST=\
$(filter-out $(NOTEST),$(DIRS)) $(filter-out $(NOTEST),$(DIRS))
BENCH=\
$(filter-out $(NOBENCH),$(TEST))
clean.dirs: $(addsuffix .clean, $(DIRS)) clean.dirs: $(addsuffix .clean, $(DIRS))
install.dirs: $(addsuffix .install, $(DIRS)) install.dirs: $(addsuffix .install, $(DIRS))
nuke.dirs: $(addsuffix .nuke, $(DIRS)) nuke.dirs: $(addsuffix .nuke, $(DIRS))
test.dirs: $(addsuffix .test, $(TEST)) test.dirs: $(addsuffix .test, $(TEST))
bench.dirs: $(addsuffix .bench, $(BENCH))
%.clean: %.clean:
+cd $* && $(QUOTED_GOBIN)/gomake clean +cd $* && $(QUOTED_GOBIN)/gomake clean
@ -154,12 +161,17 @@ test.dirs: $(addsuffix .test, $(TEST))
%.test: %.test:
+cd $* && $(QUOTED_GOBIN)/gomake test +cd $* && $(QUOTED_GOBIN)/gomake test
%.bench:
+cd $* && $(QUOTED_GOBIN)/gomake bench
clean: clean.dirs clean: clean.dirs
install: install.dirs install: install.dirs
test: test.dirs test: test.dirs
bench: bench.dirs
nuke: nuke.dirs nuke: nuke.dirs
rm -rf "$(GOROOT)"/pkg/* rm -rf "$(GOROOT)"/pkg/*