| 1 | # NOTE: this Makefile is meant to provide a simplified entry point for humans to |
| 2 | # run all of the critical steps to verify one's changes are harmonious in |
| 3 | # nature. Keeping target bodies to one line each and abstaining from make magic |
| 4 | # are very important so that maintainers and contributors can focus their |
| 5 | # attention on files that are primarily Go. |
| 6 | |
| 7 | GO_RUN_BUILD := go run scripts/build.go |
| 8 | |
| 9 | .PHONY: all |
| 10 | all: generate vet test check-binary-size gfmrun |
| 11 | |
| 12 | # NOTE: this is a special catch-all rule to run any of the commands |
| 13 | # defined in scripts/build.go with optional arguments passed |
| 14 | # via GFLAGS (global flags) and FLAGS (command-specific flags), e.g.: |
| 15 | # |
| 16 | # $ make test GFLAGS='--packages cli' |
| 17 | %: |
| 18 | $(GO_RUN_BUILD) $(GFLAGS) $* $(FLAGS) |
| 19 | |
| 20 | .PHONY: docs |
| 21 | docs: |
| 22 | mkdocs build |
| 23 | |
| 24 | .PHONY: serve-docs |
| 25 | serve-docs: |
| 26 | mkdocs serve |