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

Commit 78d8e9c3 authored by Anton Hansson's avatar Anton Hansson Committed by android-build-merger
Browse files

Merge "Allow merging product_services into /product"

am: 02d7d48d

Change-Id: Icefdfa28d9b8ca97aafb43ab1edd044fa975aae3
parents 9e4fa5a4 02d7d48d
Loading
Loading
Loading
Loading
+12 −2
Original line number Diff line number Diff line
@@ -580,7 +580,12 @@ $(INSTALLED_ODM_BUILD_PROP_TARGET): $(BUILDINFO_COMMON_SH)
	$(hide) build/make/tools/post_process_props.py $@

# -----------------------------------------------------------------
# product_services build.prop
# product_services build.prop (unless it's merged into /product)
ifdef MERGE_PRODUCT_SERVICES_INTO_PRODUCT
  ifneq (,$(PRODUCT_PRODUCT_SERVICES_PROPERTIES))
    $(error PRODUCT_PRODUCT_SERVICES_PROPERTIES is not supported in this build.)
  endif
else
INSTALLED_PRODUCT_SERVICES_BUILD_PROP_TARGET := $(TARGET_OUT_PRODUCT_SERVICES)/build.prop
ALL_DEFAULT_INSTALLED_MODULES += $(INSTALLED_PRODUCT_SERVICES_BUILD_PROP_TARGET)

@@ -588,7 +593,6 @@ FINAL_PRODUCT_SERVICES_PROPERTIES += \
    $(call collapse-pairs, $(PRODUCT_PRODUCT_SERVICES_PROPERTIES))
FINAL_PRODUCT_SERVICES_PROPERTIES := $(call uniq-pairs-by-first-component, \
    $(FINAL_PRODUCT_SERVICES_PROPERTIES),=)

$(INSTALLED_PRODUCT_SERVICES_BUILD_PROP_TARGET): $(BUILDINFO_COMMON_SH)
	@echo Target product_services buildinfo: $@
	@mkdir -p $(dir $@)
@@ -602,6 +606,7 @@ endif # BOARD_USES_PRODUCT_SERVICESIMAGE
	$(hide) $(foreach line,$(FINAL_PRODUCT_SERVICES_PROPERTIES), \
	    echo "$(line)" >> $@;)
	$(hide) build/make/tools/post_process_props.py $@
endif # MERGE_PRODUCT_SERVICES_INTO_PRODUCT

# ----------------------------------------------------------------

@@ -1156,8 +1161,13 @@ $(installed_vendor_notice_xml_gz): $(target_vendor_notice_file_xml_gz)
	$(copy-file-to-target)
$(installed_product_notice_xml_gz): $(target_product_notice_file_xml_gz)
	$(copy-file-to-target)

# No notice file for product_services if its contents are merged into /product.
# The notices will be part of the /product notice file.
ifndef MERGE_PRODUCT_SERVICES_INTO_PRODUCT
$(installed_product_services_notice_xml_gz): $(target_product_services_notice_file_xml_gz)
	$(copy-file-to-target)
endif

# if we've been run my mm, mmm, etc, don't reinstall this every time
ifeq ($(ONE_SHOT_MAKEFILE),)
+6 −1
Original line number Diff line number Diff line
@@ -444,11 +444,16 @@ endif

###########################################
# Now we can substitute with the real value of TARGET_COPY_OUT_PRODUCT_SERVICES
MERGE_PRODUCT_SERVICES_INTO_PRODUCT :=
ifeq ($(TARGET_COPY_OUT_PRODUCT_SERVICES),$(_product_services_path_placeholder))
  TARGET_COPY_OUT_PRODUCT_SERVICES := system/product_services
else ifeq ($(TARGET_COPY_OUT_PRODUCT),$(TARGET_COPY_OUT_PRODUCT_SERVICES))
  MERGE_PRODUCT_SERVICES_INTO_PRODUCT := true
else ifeq ($(filter product_services system/product_services,$(TARGET_COPY_OUT_PRODUCT_SERVICES)),)
  $(error TARGET_COPY_OUT_PRODUCT_SERVICES must be either 'product_services' or 'system/product_services', seeing '$(TARGET_COPY_OUT_PRODUCT_SERVICES)'.)
  $(error TARGET_COPY_OUT_PRODUCT_SERVICES must be either 'product_services',\
    '$(TARGET_COPY_OUT_PRODUCT)' or 'system/product_services', seeing '$(TARGET_COPY_OUT_PRODUCT_SERVICES)'.)
endif
.KATI_READONLY := MERGE_PRODUCT_SERVICES_INTO_PRODUCT
PRODUCT_COPY_FILES := $(subst $(_product_services_path_placeholder),$(TARGET_COPY_OUT_PRODUCT_SERVICES),$(PRODUCT_COPY_FILES))

BOARD_USES_PRODUCT_SERVICESIMAGE :=