Merge "Generate a NOTICE xml file for /product partition."

am: bd64cd3fe8

Change-Id: I3a8ab1d4bc4f034c7646d31182bbe01814797b8d
This commit is contained in:
Dario Freni
2018-07-10 09:27:36 -07:00
committed by android-build-merger

View File

@@ -863,7 +863,7 @@ endif
.PHONY: notice_files
# Create the rule to combine the files into text and html/xml forms
# $(1) - xml_excluded_vendor|xml_vendor|html
# $(1) - xml_excluded_vendor_product|xml_vendor|xml_product|html
# $(2) - Plain text output file
# $(3) - HTML/XML output file
# $(4) - File title
@@ -888,9 +888,10 @@ $(2) $(3): PRIVATE_DIR := $(5)
$(2) : $(3)
$(3) : $(6) $(BUILD_SYSTEM)/Makefile build/make/tools/generate-notice-files.py
build/make/tools/generate-notice-files.py --text-output $(2) \
$(if $(filter $(1),xml_excluded_vendor),-e vendor --xml-output, \
$(if $(filter $(1),xml_excluded_vendor_product),-e vendor$(comma)product --xml-output, \
$(if $(filter $(1),xml_vendor),-i vendor --xml-output, \
--html-output)) $(3) \
$(if $(filter $(1),xml_product),-i product --xml-output, \
--html-output))) $(3) \
-t $$(PRIVATE_MESSAGE) -s $$(PRIVATE_DIR)/src
notice_files: $(2) $(3)
endef
@@ -916,6 +917,11 @@ target_vendor_notice_file_txt := $(TARGET_OUT_INTERMEDIATES)/NOTICE_VENDOR.txt
target_vendor_notice_file_xml := $(TARGET_OUT_INTERMEDIATES)/NOTICE_VENDOR.xml
target_vendor_notice_file_xml_gz := $(TARGET_OUT_INTERMEDIATES)/NOTICE_VENDOR.xml.gz
installed_vendor_notice_xml_gz := $(TARGET_OUT_VENDOR)/etc/NOTICE.xml.gz
target_product_notice_file_txt := $(TARGET_OUT_INTERMEDIATES)/NOTICE_PRODUCT.txt
target_product_notice_file_xml := $(TARGET_OUT_INTERMEDIATES)/NOTICE_PRODUCT.xml
target_product_notice_file_xml_gz := $(TARGET_OUT_INTERMEDIATES)/NOTICE_PRODUCT.xml.gz
installed_product_notice_xml_gz := $(TARGET_OUT_PRODUCT)/etc/NOTICE.xml.gz
endif
ifndef TARGET_BUILD_APPS
@@ -924,7 +930,7 @@ winpthreads_notice_file := $(TARGET_OUT_NOTICE_FILES)/src/winpthreads.txt
pdk_fusion_notice_files := $(filter $(TARGET_OUT_NOTICE_FILES)/%, $(ALL_PDK_FUSION_FILES))
ifdef target_vendor_notice_file_xml_gz
$(eval $(call combine-notice-files, xml_excluded_vendor, \
$(eval $(call combine-notice-files, xml_excluded_vendor_product, \
$(target_notice_file_txt), \
$(target_notice_file_html_or_xml), \
"Notices for files contained in the filesystem images in this directory:", \
@@ -936,6 +942,14 @@ $(eval $(call combine-notice-files, xml_vendor, \
"Notices for files contained in the vendor filesystem image in this directory:", \
$(TARGET_OUT_NOTICE_FILES), \
$(target_notice_file_html_or_xml)))
ifdef target_product_notice_file_txt
$(eval $(call combine-notice-files, xml_product, \
$(target_product_notice_file_txt), \
$(target_product_notice_file_xml), \
"Notices for files contained in the product filesystem image in this directory:", \
$(TARGET_OUT_NOTICE_FILES), \
$(target_notice_file_html_or_xml)))
endif
else
$(eval $(call combine-notice-files, html, \
$(target_notice_file_txt), \
@@ -971,12 +985,23 @@ $(installed_vendor_notice_xml_gz): $(target_vendor_notice_file_xml_gz)
$(copy-file-to-target)
endif
ifdef target_product_notice_file_xml_gz
# Install the product html file at /product/etc/NOTICE.xml.gz.
$(target_product_notice_file_xml_gz): $(target_product_notice_file_xml) | $(MINIGZIP)
$(hide) $(MINIGZIP) -9 < $< > $@
$(installed_product_notice_xml_gz): $(target_product_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),)
ALL_DEFAULT_INSTALLED_MODULES += $(installed_notice_html_or_xml_gz)
ifdef target_vendor_notice_file_xml_gz
ALL_DEFAULT_INSTALLED_MODULES += $(installed_vendor_notice_xml_gz)
endif
ifdef target_product_notice_file_xml_gz
ALL_DEFAULT_INSTALLED_MODULES += $(installed_product_notice_xml_gz)
endif
endif
endif # TARGET_BUILD_APPS