Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a `help` target to the Makefile that prints available Makefile targets along with a brief help text for each. Prints all targets that have an end-of-line comment starting with ##, and all FLAG= variables with the same kind of end-of-line comment. Example output: ``` Usage: make [target] [FLAG=foo FLAG2=bar...] Available commands: acceptance Run acceptance tests. archive Build a source tarball from this repository. bench Run benchmarks. clean Clean all build artifacts. generate Regenerate generated code. help Print help for targets with comments. install Install CockroachDB binary. lint Run all style checkers and linters. lintshort Run a fast subset of the style checkers and linters. pre-push Run generate, lint, and test. protobuf Regenerate generated code for protobuf definitions. stress Run tests under stress. stressrace Run tests under stress with the race detector enabled. testlogic Run SQL Logic Tests. testrace Run tests with the Go race detector enabled. Available flags: BENCHES Regexp to pass to the -run argument of the go benchmark runner. FILES Space delimited list of logic test files to run, for make testlogic. PKG Which package to run tests against, e.g. "./pkg/storage". TESTFLAGS Extra flags to pass to the go test runner, e.g. "-v --vmodule=raft=1" TESTS Regexp to pass to the -run argument of the go test runner. See go help testflag. ``` Approach cribbed from https://marmelab.com/blog/2016/02/29/auto-documented-makefile.html
- Loading branch information