summaryrefslogtreecommitdiff
path: root/exports
diff options
context:
space:
mode:
authorjwijenbergh <jeroenwijenbergh@protonmail.com>2023-10-23 08:41:33 +0200
committerjwijenbergh <jeroenwijenbergh@protonmail.com>2023-10-23 08:41:33 +0200
commitc9d1f0b089d3bc636b9636e2bcb0ac273606d3ce (patch)
tree59e39ba21a7026c35614dc85b13e50a97a74ce18 /exports
parentc0989cfbfe5421dd4512f0fe301968e0ac5b91cd (diff)
Exports: Get proper path to internal/version
Diffstat (limited to 'exports')
-rw-r--r--exports/common.mk7
1 files changed, 4 insertions, 3 deletions
diff --git a/exports/common.mk b/exports/common.mk
index d188cb9..44ba07a 100644
--- a/exports/common.mk
+++ b/exports/common.mk
@@ -18,8 +18,11 @@ LIB_PREFIX ?= lib
LIB_SUFFIX ?= .so
endif
+# Get relative exports/ directory when included from a wrapper, without trailing slash
+override EXPORTS_PATH = $(patsubst %/,%,$(dir $(lastword $(MAKEFILE_LIST))))
+
# Current version
-VERSION := $(shell grep -o 'const Version = "[^"]*' ../internal/version/version.go | cut -d '"' -f 2)
+VERSION := $(shell grep -o 'const Version = "[^"]*' $(EXPORTS_PATH)/../internal/version/version.go | cut -d '"' -f 2)
# Library name without prefixes/suffixes
LIB_NAME ?= eduvpn_common
@@ -27,8 +30,6 @@ LIB_NAME_VERSION ?= $(LIB_NAME)-$(VERSION)
# Library file name
LIB_FILE ?= $(LIB_PREFIX)$(LIB_NAME_VERSION)$(LIB_SUFFIX)
-# 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)