Allow build platform to be directly specified

This commit is contained in:
Thomas Hobson 2021-02-19 21:05:37 +13:00
parent e03c7c50f3
commit 47c31e3792
No known key found for this signature in database
GPG Key ID: 9F1FD9D87950DB6F
1 changed files with 3 additions and 1 deletions

View File

@ -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 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) ifeq (${LANG_COMPILED}, true)
${LANG_NAME}-${LANG_VERSION}.pkg.tar.gz: $(LANG_PKG_TARGETS) compile ${LANG_NAME}-${LANG_VERSION}.pkg.tar.gz: $(LANG_PKG_TARGETS) compile
endif endif
@ -20,7 +22,7 @@ pkg-info.jq:
echo '.version="${LANG_VERSION}"' >> pkg-info.jq echo '.version="${LANG_VERSION}"' >> pkg-info.jq
echo '.author="${LANG_AUTHOR}"' >> pkg-info.jq echo '.author="${LANG_AUTHOR}"' >> pkg-info.jq
echo '.dependencies={}' >> 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) $(foreach dep, ${LANG_DEPS}, echo '.dependencies.$(word 1,$(subst =, ,${dep}))="$(word 2,$(subst =, ,${dep}))"' >> pkg-info.jq)
%.asc: % %.asc: %