pkg(Makefile): allow hyphen in language names

This commit is contained in:
Thomas Hobson 2021-02-27 19:51:13 +13:00
parent bc0b9741cf
commit da51de09b3
No known key found for this signature in database
GPG Key ID: 9F1FD9D87950DB6F
1 changed files with 2 additions and 3 deletions

View File

@ -7,9 +7,8 @@ PKG_SLUGS=$(foreach pkg, ${PKG_FILES}, $(addprefix $(shell make -f ${pkg} name)-
# Functions # Functions
define pkg_info define pkg_info
$(eval PKG_SLUG=$(patsubst $1-%,%,$2)) $(eval PKG_SLUG=$(patsubst $1-%,%,$2))
$(eval PKG_PARTS=$(subst -, ,${PKG_SLUG})) $(eval PKG_VERSION=$(lastword $(subst -, ,${PKG_SLUG})))
$(eval PKG_NAME=$(word 1,${PKG_PARTS})) $(eval PKG_NAME=$(patsubst %-${PKG_VERSION},%,${PKG_SLUG}))
$(eval PKG_VERSION=$(word 2,${PKG_PARTS}))
$(eval PKG_FILE=$(shell grep '^VERSIONS\s*=.*${PKG_VERSION}' $(shell grep "NAME\s*=\s*${PKG_NAME}" ${PKG_FILES} -l) -l)) $(eval PKG_FILE=$(shell grep '^VERSIONS\s*=.*${PKG_VERSION}' $(shell grep "NAME\s*=\s*${PKG_NAME}" ${PKG_FILES} -l) -l))
endef endef