blob: a388d4aecb0b6215180b20473dbcd7230e8cd94b [file] [log] [blame]
Joey Armstronga6af1522023-01-17 16:06:16 -05001# -*- makefile -*-
2# -----------------------------------------------------------------------
Joey Armstrong11f5a572024-01-12 19:11:32 -05003# Copyright 2022-2024 Open Networking Foundation (ONF) and the ONF Contributors
Joey Armstronga6af1522023-01-17 16:06:16 -05004#
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
21help :: help-usage help-by-target
22
23help-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
36help-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]