From e65db838ffcf9d0213beaae75f98076557b6b5cd Mon Sep 17 00:00:00 2001 From: David Gibson Date: Tue, 22 Mar 2022 16:53:59 +1100 Subject: [PATCH] virtcontainers: Remove VC_BIN_DIR The VC_BIN_DIR variable in the virtcontainers Makefile is almost unused. It's used to generate TEST_BIN_DIR, and it's created in the install target. However, we also create TEST_BIN_DIR, which is a subdirectory of VC_BIN_DIR with mkdir -p, so it will necessarily create VC_BIN_DIR along the way. So we can drop the unnecessary mkdir and expand the definition of VC_BIN_DIR in the definition of TEST_BIN_DIR. Signed-off-by: David Gibson --- src/runtime/virtcontainers/Makefile | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/runtime/virtcontainers/Makefile b/src/runtime/virtcontainers/Makefile index 86da3a6e9..1665577c8 100644 --- a/src/runtime/virtcontainers/Makefile +++ b/src/runtime/virtcontainers/Makefile @@ -6,8 +6,7 @@ PREFIX := /usr BIN_DIR := $(PREFIX)/bin -VC_BIN_DIR := $(BIN_DIR)/virtcontainers/bin -TEST_BIN_DIR := $(VC_BIN_DIR)/test +TEST_BIN_DIR := $(BIN_DIR)/virtcontainers/bin/test HOOK_DIR := hook/mock HOOK_BIN := hook MK_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST)))) @@ -56,7 +55,6 @@ define INSTALL_TEST_EXEC endef install: - @mkdir -p $(VC_BIN_DIR) @mkdir -p $(TEST_BIN_DIR) $(call INSTALL_TEST_EXEC,$(HOOK_DIR)/$(HOOK_BIN))