2011-10-06 12:46:31 +04:00
# globals
PKGDIR := $( GLOBAL_BUILDDIR) /pkg
2011-10-21 20:14:02 +04:00
2011-12-30 14:46:58 +04:00
# duplicated from metaprofile makefiles for the sake of "local" builds
2012-07-16 22:10:54 +04:00
ARCH ?= $( shell arch | sed 's/i686/i586/; s/armv.*/arm/; s/ppc.*/ppc/' )
2011-10-06 12:46:31 +04:00
DATE ?= $( shell date +%Y%m%d)
2010-08-28 20:28:42 +04:00
2012-05-08 18:59:57 +04:00
# prefix pkglist name with its directory to form a path (relative/absolute)
rlist = $( 1:%= lists/%)
list = $( addprefix $( PKGDIR) /,$( call rlist,$( 1) ) )
2010-08-28 20:28:42 +04:00
2012-05-08 18:59:57 +04:00
# prefix/suffix group name to form a path (relative/absolute)
rgroup = $( 1:%= groups/%.directory)
group = $( addprefix $( PKGDIR) /,$( call rgroup,$( 1) ) )
2010-10-29 13:11:03 +04:00
2016-03-25 13:49:13 +03:00
# prefix/suffix pkg profile name to form a path (relative/absolute)
rprofile = $( 1:%= profiles/%.directory)
profile = $( addprefix $( PKGDIR) /,$( call rprofile,$( 1) ) )
2010-10-29 13:11:03 +04:00
# 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
2012-05-21 18:33:39 +04:00
COMMA := ,
2011-10-06 12:46:31 +04:00
2010-10-29 13:11:03 +04:00
list2re = $( subst $( SPACE) ,| ,$( strip $( 1) ) )
2012-04-25 15:18:23 +04:00
2014-09-18 20:08:08 +04:00
# args: KFLAVOURS, KMODULES
# NB: $(2) could be empty
kpackages = $( and $( 1) , \
^kernel-( image| modules-( $( call list2re,$( 2) ) ) ) -( $( call list2re,$( 1) ) ) $$ )
2012-04-25 15:18:23 +04:00
# arg: branding subpackages
2012-06-13 23:07:10 +04:00
branding = $( and $( 1) ,^branding-$( BRANDING) -( $( call list2re,$( 1) ) ) $$ )