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,43 +1,51 @@
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 ($(GMS_MAKEFILE),) ifneq (,$(wildcard vendor/partner_gms-tv))
# Specify the GMS makefile you want to use, for example: ifneq ($(GMS_MAKEFILE),)
# - gms.mk - default Android TV GMS # Specify the GMS makefile you want to use, for example:
# - gms_gtv.mk - default Google TV GMS # - gms.mk - default Android TV GMS
# - gms_minimal.mk - minimal Android TV GMS # - gms_gtv.mk - default Google TV GMS
$(call inherit-product, vendor/partner_gms-tv/products/$(GMS_MAKEFILE)) # - gms_minimal.mk - minimal Android TV GMS
else $(call inherit-product, vendor/partner_gms-tv/products/$(GMS_MAKEFILE))
$(call inherit-product, vendor/partner_gms-tv/products/gms.mk) else
$(call inherit-product, vendor/partner_gms-tv/products/gms.mk)
endif
$(call inherit-product, vendor/partner_gms-tv/products/mainline_modules.mk)
endif endif
$(call inherit-product, vendor/partner_gms-tv/products/mainline_modules.mk)
# Special handling for Android Automotive # Special handling for Android Automotive
else ifeq ($(PRODUCT_IS_AUTO),true) else ifeq ($(PRODUCT_IS_AUTO),true)
ifneq ($(GMS_MAKEFILE),) ifneq (,$(wildcard vendor/partner_gms-car))
$(call inherit-product, vendor/partner_gms-car/products/$(GMS_MAKEFILE)) ifneq ($(GMS_MAKEFILE),)
else $(call inherit-product, vendor/partner_gms-car/products/$(GMS_MAKEFILE))
$(call inherit-product, vendor/partner_gms-car/products/gms.mk) else
$(call inherit-product, vendor/partner_gms-car/products/gms.mk)
endif
endif endif
else else
# Specify the GMS makefile you want to use, for example: ifneq (,$(wildcard vendor/partner_gms))
# - fi.mk - Project Fi # Specify the GMS makefile you want to use, for example:
# - gms.mk - default GMS # - fi.mk - Project Fi
# - gms_go.mk - low ram devices # - gms.mk - default GMS
# - gms_go_2gb.mk - low ram devices (2GB) # - gms_go.mk - low ram devices
# - gms_64bit_only.mk - devices supporting 64-bit only # - gms_go_2gb.mk - low ram devices (2GB)
# - gms_minimal.mk - minimal GMS # - gms_64bit_only.mk - devices supporting 64-bit only
ifneq ($(GMS_MAKEFILE),) # - gms_minimal.mk - minimal GMS
$(call inherit-product, vendor/partner_gms/products/$(GMS_MAKEFILE)) ifneq ($(GMS_MAKEFILE),)
else $(call inherit-product, vendor/partner_gms/products/$(GMS_MAKEFILE))
$(call inherit-product-if-exists, vendor/partner_gms/products/gms.mk) else
$(call inherit-product, vendor/partner_gms/products/gms.mk)
endif
endif endif
# Specify the mainline module makefile you want to use, for example: ifneq (,$(wildcard vendor/partner_modules))
# - mainline_modules.mk - updatable apex # Specify the mainline module makefile you want to use, for example:
# - mainline_modules_flatten_apex.mk - flatten apex # - mainline_modules.mk - updatable apex
# - mainline_modules_low_ram.mk - low ram devices # - mainline_modules_flatten_apex.mk - flatten apex
ifneq ($(MAINLINE_MODULES_MAKEFILE),) # - mainline_modules_low_ram.mk - low ram devices
$(call inherit-product, vendor/partner_modules/build/$(MAINLINE_MODULES_MAKEFILE)) ifneq ($(MAINLINE_MODULES_MAKEFILE),)
$(call inherit-product, vendor/partner_modules/build/$(MAINLINE_MODULES_MAKEFILE))
endif
endif endif
endif endif
endif endif