Allow include $(sort $(wildcard */font.mk)) and variants
Include/inherit-product calls already allow asterisks, the wildcard is not necessary. If we see an include using $(wildcard), act as if it doesn't exist. Bug: 218736658 Test: go test Change-Id: Ib21007a2042fbfaa95c07571792983e14135a035
This commit is contained in:
@@ -197,15 +197,31 @@ def init(g, handle):
|
||||
mkname: "path/product.mk",
|
||||
in: `
|
||||
$(call inherit-product, */font.mk)
|
||||
$(call inherit-product, $(sort $(wildcard */font.mk)))
|
||||
$(call inherit-product, $(wildcard */font.mk))
|
||||
|
||||
include */font.mk
|
||||
include $(sort $(wildcard */font.mk))
|
||||
include $(wildcard */font.mk)
|
||||
`,
|
||||
expected: `load("//build/make/core:product_config.rbc", "rblf")
|
||||
load("//foo:font.star", _font_init = "init")
|
||||
load("//bar:font.star", _font1_init = "init")
|
||||
load("//bar:font.star", _font_init = "init")
|
||||
load("//foo:font.star", _font1_init = "init")
|
||||
|
||||
def init(g, handle):
|
||||
cfg = rblf.cfg(handle)
|
||||
rblf.inherit(handle, "foo/font", _font_init)
|
||||
rblf.inherit(handle, "bar/font", _font1_init)
|
||||
rblf.inherit(handle, "bar/font", _font_init)
|
||||
rblf.inherit(handle, "foo/font", _font1_init)
|
||||
rblf.inherit(handle, "bar/font", _font_init)
|
||||
rblf.inherit(handle, "foo/font", _font1_init)
|
||||
rblf.inherit(handle, "bar/font", _font_init)
|
||||
rblf.inherit(handle, "foo/font", _font1_init)
|
||||
_font_init(g, handle)
|
||||
_font1_init(g, handle)
|
||||
_font_init(g, handle)
|
||||
_font1_init(g, handle)
|
||||
_font_init(g, handle)
|
||||
_font1_init(g, handle)
|
||||
`,
|
||||
},
|
||||
{
|
||||
|
Reference in New Issue
Block a user