From b9a0d73fd20d89e2368d65d7635c60e71f831b13 Mon Sep 17 00:00:00 2001 From: StevenWdV Date: Wed, 9 Feb 2022 17:11:33 +0100 Subject: Small Makefile improvement --- exports/common.mk | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/exports/common.mk b/exports/common.mk index bc5a3d6..1059e63 100644 --- a/exports/common.mk +++ b/exports/common.mk @@ -23,10 +23,8 @@ LIB_NAME ?= eduvpn_common # Library file name LIB_FILE ?= $(LIB_PREFIX)$(LIB_NAME)$(LIB_SUFFIX) -# Get relative exports/ directory when included from a wrapper -EXPORTS_PATH = $(dir $(lastword $(MAKEFILE_LIST))) -# Remove trailing slash -EXPORTS_PATH := $(EXPORTS_PATH:/=) +# Get relative exports/ directory when included from a wrapper, without trailing slash +override EXPORTS_PATH = $(patsubst %/,%,$(dir $(lastword $(MAKEFILE_LIST)))) EXPORTS_LIB_PATH ?= $(EXPORTS_PATH)/lib EXPORTS_LIB_SUBFOLDER_PATH ?= $(EXPORTS_LIB_PATH)/$(GOOS)/$(GOARCH) -- cgit v1.2.3