makefile: add help texts (#45988)

ref pingcap/tidb#45987
This commit is contained in:
二手掉包工程师
2023-08-11 11:07:56 +08:00
committed by GitHub
parent cfefc836ba
commit 203d3c73ca

View File

@ -14,7 +14,12 @@
include Makefile.common
.PHONY: all clean test server dev benchkv benchraw check checklist parser tidy ddltest build_br build_lightning build_lightning-ctl build_dumpling ut bazel_build bazel_prepare bazel_test check-file-perm check-bazel-prepare bazel_lint tazel precheck
.PHONY: help all clean test server dev benchkv benchraw check checklist parser tidy ddltest build_br build_lightning build_lightning-ctl build_dumpling ut bazel_build bazel_prepare bazel_test check-file-perm check-bazel-prepare bazel_lint tazel precheck
# Adapted from https://www.thapaliya.com/en/writings/well-documented-makefiles/
help: ## Display this help and any documented user-facing targets. Other undocumented targets may be present in the Makefile.
help:
@awk 'BEGIN {FS = ": ##"; printf "Usage:\n make <target>\n\nTargets:\n"} /^[a-zA-Z0-9_\.\-\/%]+: ##/ { printf " %-45s %s\n", $$1, $$2 }' $(MAKEFILE_LIST)
default: server buildsucc
@ -448,7 +453,7 @@ bazel_ci_simple_prepare:
--run_under="cd $(CURDIR) && " \
//tools/tazel:tazel
bazel_prepare:
bazel_prepare: ## Update and generate BUILD.bazel files. Please run this before commit.
bazel run //:gazelle
bazel run //:gazelle -- update-repos -from_file=go.mod -to_macro DEPS.bzl%go_deps -build_file_proto_mode=disable -prune
bazel run \