diff options
author | Adam Langley <agl@golang.org> | 2010-01-12 15:43:20 -0800 |
---|---|---|
committer | Adam Langley <agl@golang.org> | 2010-01-12 15:43:20 -0800 |
commit | cbd3b2e8d594ac0298b32de111bf99319342c494 (patch) | |
tree | 0e80338ce0639d9dddab574568ff5cc6ab1c90d5 | |
parent | 3daf133f35d783bb60b9ad058b2116c69aebf705 (diff) | |
download | go-git-cbd3b2e8d594ac0298b32de111bf99319342c494.tar.gz |
Add 'bench' target to makefiles.
R=rsc, agl, r
CC=golang-dev
https://golang.org/cl/188043
-rw-r--r-- | src/Make.pkg | 3 | ||||
-rw-r--r-- | src/pkg/Makefile | 12 |
2 files changed, 15 insertions, 0 deletions
diff --git a/src/Make.pkg b/src/Make.pkg index d4196b6e84..3dd57b7104 100644 --- a/src/Make.pkg +++ b/src/Make.pkg @@ -53,6 +53,9 @@ clean: test: $(QUOTED_GOBIN)/gotest +bench: + $(QUOTED_GOBIN)/gotest -benchmarks=. -match="Do not run tests" + nuke: clean rm -f $(pkgdir)/$(TARG).a diff --git a/src/pkg/Makefile b/src/pkg/Makefile index 0caa0dd3fd..4f001db855 100644 --- a/src/pkg/Makefile +++ b/src/pkg/Makefile @@ -134,13 +134,20 @@ NOTEST=\ testing/iotest\ xgb\ +NOBENCH=\ + container/vector\ + TEST=\ $(filter-out $(NOTEST),$(DIRS)) +BENCH=\ + $(filter-out $(NOBENCH),$(TEST)) + clean.dirs: $(addsuffix .clean, $(DIRS)) install.dirs: $(addsuffix .install, $(DIRS)) nuke.dirs: $(addsuffix .nuke, $(DIRS)) test.dirs: $(addsuffix .test, $(TEST)) +bench.dirs: $(addsuffix .bench, $(BENCH)) %.clean: +cd $* && $(QUOTED_GOBIN)/gomake clean @@ -154,12 +161,17 @@ test.dirs: $(addsuffix .test, $(TEST)) %.test: +cd $* && $(QUOTED_GOBIN)/gomake test +%.bench: + +cd $* && $(QUOTED_GOBIN)/gomake bench + clean: clean.dirs install: install.dirs test: test.dirs +bench: bench.dirs + nuke: nuke.dirs rm -rf "$(GOROOT)"/pkg/* |