build: Add make vendor

Add a top-level `vendor` entry, which will help us when adding the
vendor check as part of the static checks.

Related: #2159

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
This commit is contained in:
Fabiano Fidêncio 2021-07-13 14:16:44 +02:00
parent f9643d83fb
commit ac8f972e4b
2 changed files with 8 additions and 4 deletions

View File

@ -15,7 +15,7 @@ TOOLS =
TOOLS += agent-ctl
STANDARD_TARGETS = build check clean install test
STANDARD_TARGETS = build check clean install test vendor
include utils.mk

View File

@ -13,9 +13,9 @@
# $1 - Directory component lives in.
# $2 - Name of component.
#
# Note: The "clean" rule is the "odd one out" - it only depends on the
# Makefile. This ensure that running clean won't first try to build the
# project.
# Note: The "clean" and "vendor" rules are the "odd one out" - they only
# depend on the Makefile. This ensure that running them won't first try
# to build the project.
define make_rules
$(2) : $(1)/$(2)/Makefile
@ -25,6 +25,9 @@ build-$(2) : $(2)
check-$(2) : $(2)
make -C $(1)/$(2) check
vendor-$(2) : $(1)/$(2)/Makefile
make -C $(1)/$(2) vendor
clean-$(2) : $(1)/$(2)/Makefile
make -C $(1)/$(2) clean
@ -39,6 +42,7 @@ test-$(2) : $(2)
build-$(2) \
clean-$(2) \
check-$(2) \
vendor-$(2) \
test-$(2) \
install-$(2)
endef