Joey Armstrong | a6af152 | 2023-01-17 16:06:16 -0500 | [diff] [blame] | 1 | # -*- makefile -*- |
| 2 | # ----------------------------------------------------------------------- |
| 3 | # Copyright 2022-2023 Open Networking Foundation (ONF) and the ONF Contributors (ONF) and the ONF Contributors |
| 4 | # |
| 5 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | # you may not use this file except in compliance with the License. |
| 7 | # You may obtain a copy of the License at |
| 8 | # |
| 9 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | # |
| 11 | # Unless required by applicable law or agreed to in writing, software |
| 12 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | # See the License for the specific language governing permissions and |
| 15 | # limitations under the License. |
| 16 | # ----------------------------------------------------------------------- |
| 17 | |
| 18 | ## ----------------------------------------------------------------------- |
| 19 | ## ----------------------------------------------------------------------- |
| 20 | .PHONY: help |
| 21 | help :: help-usage help-by-target |
| 22 | |
| 23 | help-usage : |
| 24 | @echo "Usage: $(MAKE) [options] [target] ..." |
| 25 | @echo |
| 26 | @echo "[LINT]" |
| 27 | @echo " lint-mod Verify the integrity of the 'mod' files" |
| 28 | @echo " sca Run static code analysis with the golangci-lint tool" |
| 29 | @echo |
| 30 | @echo "[CLEAN]" |
| 31 | @echo " clean Remove files created by the build" |
| 32 | @echo " distclean Remove build and testing artifacts and reports" |
| 33 | @echo "[RELEASE]" |
| 34 | @echo " mod-update go.mod with released versions, update go.sum and vendor/ files" |
| 35 | |
| 36 | help-by-target: |
| 37 | @echo |
| 38 | @grep --no-filename '^[[:alpha:]_-]*:.* ##' $(MAKEFILE_LIST) \ |
| 39 | | sort \ |
| 40 | | awk 'BEGIN {FS=":.* ## "}; {printf "%-25s : %s\n", $$1, $$2};' |
| 41 | |
| 42 | # [EOF] |