verity: clean up verity build dependencies
Move image dependencies out of PRODUCT_PACKAGES and into direct
dependencies for the image building rules.
Fix the test for PRODUCT_SUPPORTS_VERITY, it needs to check for
the current project as the global is no longer set.
Change-Id: I811501834ae5ec658229bd505fcc48275ff578c9
diff --git a/core/Makefile b/core/Makefile
index 480c719..d0667e2 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -410,8 +410,6 @@
INSTALLED_KERNEL_TARGET :=
endif
-VERITY_SIGNER_CMD := $(HOST_OUT_EXECUTABLES)/verity_signer
-
# -----------------------------------------------------------------
# the ramdisk
INTERNAL_RAMDISK_FILES := $(filter $(TARGET_ROOT_OUT)/%, \
@@ -644,8 +642,8 @@
endif
INTERNAL_USERIMAGES_BINARY_PATHS := $(sort $(dir $(INTERNAL_USERIMAGES_DEPS)))
-ifeq (true, $(PRODUCT_SUPPORTS_VERITY))
-INTERNAL_USERIMAGES_DEPS += $(HOST_OUT_EXECUTABLES)/verity_signer
+ifeq (true,$(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_SUPPORTS_VERITY))
+INTERNAL_USERIMAGES_DEPS += $(APPEND2SIMG) $(VERITY_SIGNER)
endif
SELINUX_FC := $(TARGET_ROOT_OUT)/file_contexts
@@ -881,7 +879,7 @@
verity=$(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_SUPPORTS_VERITY) \
verity_block_device=$(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_VERITY_PARTITION) \
verity_key=$(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_VERITY_SIGNING_KEY) \
- verity_signer_cmd=$(VERITY_SIGNER_CMD))
+ verity_signer_cmd=$(VERITY_SIGNER))
$(hide) PATH=$(foreach p,$(INTERNAL_USERIMAGES_BINARY_PATHS),$(p):)$$PATH \
./build/tools/releasetools/build_image.py \
$(TARGET_OUT) $(systemimage_intermediates)/system_image_info.txt $(1)
diff --git a/core/config.mk b/core/config.mk
index e11a7a3..b809d94 100644
--- a/core/config.mk
+++ b/core/config.mk
@@ -375,6 +375,8 @@
BCC_COMPAT := $(HOST_OUT_EXECUTABLES)/bcc_compat$(HOST_EXECUTABLE_SUFFIX)
LINT := prebuilts/sdk/tools/lint
RMTYPEDEFS := $(HOST_OUT_EXECUTABLES)/rmtypedefs
+APPEND2SIMG := $(HOST_OUT_EXECUTABLES)/append2simg
+VERITY_SIGNER := $(HOST_OUT_EXECUTABLES)/verity_signer
# ACP is always for the build OS, not for the host OS
ACP := $(BUILD_OUT_EXECUTABLES)/acp$(BUILD_EXECUTABLE_SUFFIX)