partner_gms: Skip makefile inclusion if vendor/partner_* doesn't exist

This skips partner_* for some unfortunate devices where someone set
GMS_MAKEFILE/MAINLINE_MODULES_MAKEFILE.

Change-Id: Idadd7a5df315a3792237181b5c277d40d1bd1431
This commit is contained in:
LuK1337
2024-01-08 12:21:43 +01:00
parent d18183e1d3
commit ebf86e1abe

View File

@@ -1,6 +1,7 @@
ifeq ($(WITH_GMS),true) ifeq ($(WITH_GMS),true)
# Special handling for Android TV # Special handling for Android TV
ifeq ($(PRODUCT_IS_ATV),true) ifeq ($(PRODUCT_IS_ATV),true)
ifneq (,$(wildcard vendor/partner_gms-tv))
ifneq ($(GMS_MAKEFILE),) ifneq ($(GMS_MAKEFILE),)
# Specify the GMS makefile you want to use, for example: # Specify the GMS makefile you want to use, for example:
# - gms.mk - default Android TV GMS # - gms.mk - default Android TV GMS
@@ -11,14 +12,18 @@ ifeq ($(WITH_GMS),true)
$(call inherit-product, vendor/partner_gms-tv/products/gms.mk) $(call inherit-product, vendor/partner_gms-tv/products/gms.mk)
endif endif
$(call inherit-product, vendor/partner_gms-tv/products/mainline_modules.mk) $(call inherit-product, vendor/partner_gms-tv/products/mainline_modules.mk)
endif
# Special handling for Android Automotive # Special handling for Android Automotive
else ifeq ($(PRODUCT_IS_AUTO),true) else ifeq ($(PRODUCT_IS_AUTO),true)
ifneq (,$(wildcard vendor/partner_gms-car))
ifneq ($(GMS_MAKEFILE),) ifneq ($(GMS_MAKEFILE),)
$(call inherit-product, vendor/partner_gms-car/products/$(GMS_MAKEFILE)) $(call inherit-product, vendor/partner_gms-car/products/$(GMS_MAKEFILE))
else else
$(call inherit-product, vendor/partner_gms-car/products/gms.mk) $(call inherit-product, vendor/partner_gms-car/products/gms.mk)
endif endif
endif
else else
ifneq (,$(wildcard vendor/partner_gms))
# Specify the GMS makefile you want to use, for example: # Specify the GMS makefile you want to use, for example:
# - fi.mk - Project Fi # - fi.mk - Project Fi
# - gms.mk - default GMS # - gms.mk - default GMS
@@ -29,9 +34,11 @@ ifeq ($(WITH_GMS),true)
ifneq ($(GMS_MAKEFILE),) ifneq ($(GMS_MAKEFILE),)
$(call inherit-product, vendor/partner_gms/products/$(GMS_MAKEFILE)) $(call inherit-product, vendor/partner_gms/products/$(GMS_MAKEFILE))
else else
$(call inherit-product-if-exists, vendor/partner_gms/products/gms.mk) $(call inherit-product, vendor/partner_gms/products/gms.mk)
endif
endif endif
ifneq (,$(wildcard vendor/partner_modules))
# Specify the mainline module makefile you want to use, for example: # Specify the mainline module makefile you want to use, for example:
# - mainline_modules.mk - updatable apex # - mainline_modules.mk - updatable apex
# - mainline_modules_flatten_apex.mk - flatten apex # - mainline_modules_flatten_apex.mk - flatten apex
@@ -40,4 +47,5 @@ ifeq ($(WITH_GMS),true)
$(call inherit-product, vendor/partner_modules/build/$(MAINLINE_MODULES_MAKEFILE)) $(call inherit-product, vendor/partner_modules/build/$(MAINLINE_MODULES_MAKEFILE))
endif endif
endif endif
endif
endif endif