Commit cbbc23ed authored by Michael Shigorin's avatar Michael Shigorin

image.in: added groups2lists()

NB: PKGDIR might be overridden now so that these functions can be used within both metaprofile and generated profile contexts; this isn't clean but I couldn't come up with anything better so far.
parent 85c1a0f2
# globals
PKGDIR := $(GLOBAL_BUILDDIR)/pkg
PKGDIR ?= $(GLOBAL_BUILDDIR)/pkg
# duplicated from metaprofile makefiles for the sake of "local" builds
ARCH ?= $(shell arch | sed 's/i686/i586/; s/armv.*/arm/; s/ppc.*/ppc/')
......@@ -20,6 +20,15 @@ profile = $(addprefix $(PKGDIR)/,$(call rprofile,$(1)))
# map first argument (a function) onto second one (an argument list)
map = $(foreach a,$(2),$(call $(1),$(a)))
# happens at least twice, and variables are the same by design
groups2lists = $(shell $(groups2lists_body))
define groups2lists_body
{ if [ -n "$(THE_GROUPS)$(MAIN_GROUPS)" ]; then \
sed -rn 's,^X-Alterator-PackageList=(.*)$$,\1,p' \
$(call map,group,$(THE_GROUPS) $(MAIN_GROUPS)); \
fi; }
endef
# kernel package list generation; see also #24669
NULL :=
SPACE := $(NULL) # the officially documented way of getting a space
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment