From 6f7e32b6d9dcf4732dd0acbd89be77b42805a5ca Mon Sep 17 00:00:00 2001 From: jwijenbergh Date: Mon, 5 Feb 2024 17:14:36 +0100 Subject: Exports Make: Get version from internal version --- exports/common.mk | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'exports') diff --git a/exports/common.mk b/exports/common.mk index cb649ad..646c9c1 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 = 2.0.0 +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,9 +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) -- cgit v1.2.3