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
diff --git a/core/product_config.mk b/core/product_config.mk
index 54fbb7d..8045337 100644
--- a/core/product_config.mk
+++ b/core/product_config.mk
@@ -100,6 +100,16 @@
 $(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)