agent: Allow specifying DESTDIR and AGENT_POLICY via env vars

This will help to build the agent binary as part of the kata-deploy
localbuild, as we need to pass the DESTDIR to where the agent will be
installed, and also whether we're building the agent with policy support
enabled or not.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
This commit is contained in:
Fabiano Fidêncio 2023-10-03 14:18:45 +02:00
parent 45c1188839
commit 1727487eef

View File

@ -34,7 +34,7 @@ ifeq ($(SECCOMP),yes)
endif
##VAR AGENT_POLICY=yes|no define if agent enables the policy feature
AGENT_POLICY := no
AGENT_POLICY ?= no
# Enable the policy feature of rust build
ifeq ($(AGENT_POLICY),yes)
@ -62,7 +62,7 @@ endif
TARGET_PATH = target/$(TRIPLE)/$(BUILD_TYPE)/$(TARGET)
##VAR DESTDIR=<path> is a directory prepended to each installed target file
DESTDIR :=
DESTDIR ?=
##VAR BINDIR=<path> is a directory for installing executable programs
BINDIR := /usr/bin