Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit be17aa48 authored by SzuWei Lin's avatar SzuWei Lin Committed by Automerger Merge Worker
Browse files

Merge "Skip generate-common-build-props for older devices without /product" am: 7240eca4

Original change: https://android-review.googlesource.com/c/platform/build/+/1530331

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Iaa9efa529f581e86c140a7750a3093bcbfb3e1db
parents 0e9acf01 7240eca4
Loading
Loading
Loading
Loading
+26 −1
Original line number Diff line number Diff line
@@ -71,6 +71,7 @@ endef
#       $(3) and (4) are affected
# $(6): optional list of files to append at the end. The content of each file is emitted
#       to the output
# $(7): optional flag to skip common properties generation
define build-properties
ALL_DEFAULT_INSTALLED_MODULES += $(2)

@@ -96,7 +97,9 @@ $(2): $(POST_PROCESS_PROPS) $(INTERNAL_BUILD_ID_MAKEFILE) $(API_FINGERPRINT) $(3
	$(hide) echo Building $$@
	$(hide) mkdir -p $$(dir $$@)
	$(hide) rm -f $$@ && touch $$@
ifneq ($(strip $(7)), true)
	$(hide) $$(call generate-common-build-props,$(call to-lower,$(strip $(1))),$$@)
endif
	$(hide) $(foreach file,$(strip $(3)),\
	    if [ -f "$(file)" ]; then\
	        echo "" >> $$@;\
@@ -309,6 +312,7 @@ $(eval $(call build-properties,\
    $(_prop_files_),\
    $(_prop_vars_),\
    $(_blacklist_names_),\
    $(empty),\
    $(empty)))

# -----------------------------------------------------------------
@@ -346,6 +350,7 @@ $(eval $(call build-properties,\
    $(_prop_files_),\
    $(_prop_vars_),\
    $(PRODUCT_VENDOR_PROPERTY_BLACKLIST),\
    $(empty),\
    $(empty)))

# -----------------------------------------------------------------
@@ -379,13 +384,28 @@ else
_footers_ :=
endif

# Skip common /product properties generation if device released before R and
# has no product partition. This is the first part of the check.
ifeq ($(call math_lt,$(if $(PRODUCT_SHIPPING_API_LEVEL),$(PRODUCT_SHIPPING_API_LEVEL),30),30), true)
  _skip_common_properties := true
endif

# The second part of the check - always generate common properties for the
# devices with product partition regardless of shipping level.
ifneq ($(BOARD_USES_PRODUCTIMAGE),)
  _skip_common_properties :=
endif

$(eval $(call build-properties,\
    product,\
    $(INSTALLED_PRODUCT_BUILD_PROP_TARGET),\
    $(_prop_files_),\
    $(_prop_vars_),\
    $(empty),\
    $(_footers_)))
    $(_footers_),\
    $(_skip_common_properties)))

_skip_common_properties :=

# ----------------------------------------------------------------
# odm/etc/build.prop
@@ -407,6 +427,7 @@ $(eval $(call build-properties,\
    $(_prop_files),\
    $(_prop_vars_),\
    $(empty),\
    $(empty),\
    $(empty)))

# ----------------------------------------------------------------
@@ -420,6 +441,7 @@ $(eval $(call build-properties,\
    $(empty),\
    $(empty),\
    $(empty),\
    $(empty),\
    $(empty)))

# ----------------------------------------------------------------
@@ -433,6 +455,7 @@ $(eval $(call build-properties,\
    $(empty),\
    $(empty),\
    $(empty),\
    $(empty),\
    $(empty)))

# -----------------------------------------------------------------
@@ -453,6 +476,7 @@ $(eval $(call build-properties,\
    $(_prop_files_),\
    $(_prop_vars_),\
    $(empty),\
    $(empty),\
    $(empty)))

# ----------------------------------------------------------------
@@ -467,4 +491,5 @@ $(eval $(call build-properties,\
    $(empty),\
    $(empty),\
    $(empty),\
    $(empty),\
    $(empty)))