From 3a1764f8bedd293caaf21c31d67928eb8dae1114 Mon Sep 17 00:00:00 2001 From: Sasha Smundak Date: Thu, 26 Aug 2021 10:13:21 -0700 Subject: [PATCH] Add is-board-platform2/is-board-platform-in-list2 This is the first step to get rid of the set of identical macros defined in utils.mk files in multiple device/google/xxxx directories. The macros is-board-platform/is-board-platform-in-list will be eventuall replaced with the new ones. Bug: 190051051 Test: treehugger Change-Id: I28017df86dbd899be38f882dd5496c894986d8db --- core/product_config.mk | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/core/product_config.mk b/core/product_config.mk index 54fbb7d121..8045337e29 100644 --- a/core/product_config.mk +++ b/core/product_config.mk @@ -100,6 +100,16 @@ define product-copy-files-by-pattern $(join $(patsubst %,$(1),$(3)),$(patsubst %,:$(2),$(3))) endef +# Return empty unless the board matches +define is-board-platform2 +$(filter $(1), $(TARGET_BOARD_PLATFORM)) +endef + +# Return empty unless the board is in the list +define is-board-platform-in-list2 +$(filter $(1),$(TARGET_BOARD_PLATFORM)) +endef + # --------------------------------------------------------------- # Check for obsolete PRODUCT- and APP- goals ifeq ($(CALLED_FROM_SETUP),true)