• Michael Shigorin's avatar
    kernel and BUILDDIR fixes · c2f70e5c
    Michael Shigorin authored
    - image.in/functions.mk: rework kpackage()
      + it takes two arguments explicitly now: this adds some noise
        for "generic" invocations but is rather less messy with recently
        introduced STAGE1_KFLAVOUR (which in its turn is rather cleaner
        than messing with KFLAVOURS, especially since soemthing changed
        in presumably apt and we can't rely on kernel packages being
        installed in the order formed).
    - BUILDDIR/DEBUG related fixes
      + Makefile: BUILDDIR initialization moved to distro.mk
    - build.log += git info
    c2f70e5c
functions.mk 601 Bytes
PKGDIR=$(GLOBAL_BUILDDIR)/pkg

# 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)))$$