mkimage-profiles/image.in/functions.mk
Michael Shigorin 2f307ffffb main.mk introduced, lib/*.mk partially rewritten
The former toplevel Makefile is now toplevel main.mk;
this change allows for multi-target, multi-arch processing
in the current toplevel Makefile.

As the "build" symlink semantics change quite considerably
when one is doing bulk builds (several pruned builddirs might
be useful for comparison), BUILDDIR is now much more likely
to be recreated: the cases when it will persist are when it's
either a single-image build or when the prefix hasn't changed.

There are some more or less subtle bugfixes and enhancements
all over the map as well.

Done within 20111230..20120102 timeframe, actually...
2012-01-02 21:01:09 +02:00

24 lines
760 B
Makefile

# globals
PKGDIR := $(GLOBAL_BUILDDIR)/pkg
# duplicated from metaprofile makefiles for the sake of "local" builds
ARCH ?= $(shell arch | sed 's/i686/i586/')
DATE ?= $(shell date +%Y%m%d)
# prefix pkglist name with its directory to form a path
list = $(1:%=$(PKGDIR)/lists/%)
# prefix/suffix group name to form a path
group = $(1:%=$(PKGDIR)/groups/%.directory)
# map first argument (a function) onto second one (an argument list)
map = $(foreach a,$(2),$(call $(1),$(a)))
# kernel package list generation; see also #24669
NULL :=
SPACE := $(NULL) # the officially documented way of getting a space
list2re = $(subst $(SPACE),|,$(strip $(1)))
# args: KMODULES, KFLAVOURS
kpackages = ^kernel-(image|modules-($(call list2re,$(1))))-($(call list2re,$(2)))$$