From 47c31e3792ca0c28eebf05166f5e07f009fa8ff3 Mon Sep 17 00:00:00 2001 From: Thomas Hobson Date: Fri, 19 Feb 2021 21:05:37 +1300 Subject: [PATCH] Allow build platform to be directly specified --- packages/common.mk | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/common.mk b/packages/common.mk index 9cb6bbd..f045d34 100644 --- a/packages/common.mk +++ b/packages/common.mk @@ -6,6 +6,8 @@ LANG_COMPILED=$(or ${COMPILED}, false) LANG_PKG_TARGETS=pkg-info.json ${LANG_NAME}-${LANG_VERSION}/ ${LANG_NAME}-${LANG_VERSION}/environment run +BUILD_PLATFORM=$(or ${PLATFORM}, baremetal-$(shell grep -oP "^ID=\K\w+" /etc/os-release )) + ifeq (${LANG_COMPILED}, true) ${LANG_NAME}-${LANG_VERSION}.pkg.tar.gz: $(LANG_PKG_TARGETS) compile endif @@ -20,7 +22,7 @@ pkg-info.jq: echo '.version="${LANG_VERSION}"' >> pkg-info.jq echo '.author="${LANG_AUTHOR}"' >> pkg-info.jq echo '.dependencies={}' >> pkg-info.jq - echo '.distro="$(shell grep -oP "^ID=\K\w+" /etc/os-release )"' + echo '.build_platform="${BUILD_PLATFORM}"' $(foreach dep, ${LANG_DEPS}, echo '.dependencies.$(word 1,$(subst =, ,${dep}))="$(word 2,$(subst =, ,${dep}))"' >> pkg-info.jq) %.asc: %