From 3801be1f0aa7c1919f35914043508d4cdd9c22c1 Mon Sep 17 00:00:00 2001 From: Aaron Kling Date: Tue, 13 Sep 2022 19:44:49 -0500 Subject: [PATCH] Allow passing makefile path to enforce-product-packages-exist To allow enforcing at a product level Change-Id: I75084246be885a163260bed42f2b13e0db388f85 --- core/product.mk | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/core/product.mk b/core/product.mk index cd5af1ddfd..b88102d8c4 100644 --- a/core/product.mk +++ b/core/product.mk @@ -550,12 +550,15 @@ endef # Makes including non-existent modules in PRODUCT_PACKAGES an error. # $(1): list of non-existent modules to allow. +define enforce-product-packages-exist-internal + $(eval PRODUCTS.$(1).PRODUCT_ENFORCE_PACKAGES_EXIST := true) \ + $(eval PRODUCTS.$(1).PRODUCT_ENFORCE_PACKAGES_EXIST_ALLOW_LIST := $(2)) \ + $(eval .KATI_READONLY := PRODUCTS.$(1).PRODUCT_ENFORCE_PACKAGES_EXIST) \ + $(eval .KATI_READONLY := PRODUCTS.$(1).PRODUCT_ENFORCE_PACKAGES_EXIST_ALLOW_LIST) +endef define enforce-product-packages-exist $(eval current_mk := $(strip $(word 1,$(_include_stack)))) \ - $(eval PRODUCTS.$(current_mk).PRODUCT_ENFORCE_PACKAGES_EXIST := true) \ - $(eval PRODUCTS.$(current_mk).PRODUCT_ENFORCE_PACKAGES_EXIST_ALLOW_LIST := $(1)) \ - $(eval .KATI_READONLY := PRODUCTS.$(current_mk).PRODUCT_ENFORCE_PACKAGES_EXIST) \ - $(eval .KATI_READONLY := PRODUCTS.$(current_mk).PRODUCT_ENFORCE_PACKAGES_EXIST_ALLOW_LIST) + $(enforce-product-packages-exist-internal,$(current_mk),$(1)) endef #