From da51de09b3d1611cce43f39ec3b3a3cb36947162 Mon Sep 17 00:00:00 2001 From: Thomas Hobson Date: Sat, 27 Feb 2021 19:51:13 +1300 Subject: [PATCH] pkg(Makefile): allow hyphen in language names --- packages/Makefile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/Makefile b/packages/Makefile index f8d01f0..a3a5513 100644 --- a/packages/Makefile +++ b/packages/Makefile @@ -7,9 +7,8 @@ PKG_SLUGS=$(foreach pkg, ${PKG_FILES}, $(addprefix $(shell make -f ${pkg} name)- # Functions define pkg_info $(eval PKG_SLUG=$(patsubst $1-%,%,$2)) - $(eval PKG_PARTS=$(subst -, ,${PKG_SLUG})) - $(eval PKG_NAME=$(word 1,${PKG_PARTS})) - $(eval PKG_VERSION=$(word 2,${PKG_PARTS})) + $(eval PKG_VERSION=$(lastword $(subst -, ,${PKG_SLUG}))) + $(eval PKG_NAME=$(patsubst %-${PKG_VERSION},%,${PKG_SLUG})) $(eval PKG_FILE=$(shell grep '^VERSIONS\s*=.*${PKG_VERSION}' $(shell grep "NAME\s*=\s*${PKG_NAME}" ${PKG_FILES} -l) -l)) endef