Add a new macro for products to make artifact path requirements.
When a product adds a path requirement, the build system will verify that all its artifacts are produced inside these paths, and fail otherwise. The paths are all relative to PRODUCT_OUT, and the macro also supports giving a whitelist, for known existing offenders in the hierarchy. The build will fail if redundant whitelist entries are present. Example invocation: _paths := $(TARGET_COPY_OUT_SYSTEM)/ _whitelist := root/init root/init.rc $(call require-artifacts-in-path $(_paths), $(_whitelist)) Bug: 80410283 Test: Downstream with a new product definition. Change-Id: I235de681f65254087a42e345af69b2113b682072
This commit is contained in:
@@ -234,6 +234,12 @@ endif
|
||||
$(call import-products, $(current_product_makefile))
|
||||
endif # Import all or just the current product makefile
|
||||
|
||||
# Import all the products that have made artifact path requirements, so that we can verify
|
||||
# the artifacts they produce.
|
||||
$(foreach makefile,$(ARTIFACT_PATH_REQUIREMENT_PRODUCTS),\
|
||||
$(if $(filter-out $(makefile),$(PRODUCTS)),$(eval $(call import-products,$(makefile))))\
|
||||
)
|
||||
|
||||
# Sanity check
|
||||
$(check-all-products)
|
||||
|
||||
|
Reference in New Issue
Block a user