vendorkernelramdisk references input list
This fixes the incremental build issue that it fails to rebuild even
when the input list has changed.
BOARD_VENDOR_KERNEL_RAMDISK_KERNEL_MODULES_BLOCKLIST_FILE := /path/to/file
Adding the line above triggers rebuilding vendor_kernel_ramdisk.img,
which has a new blocklist file.
But, removing the line should trigger rebuilding
vendor_kernel_ramdisk.img as well, but for now it's not the case because
the command for building the image doesn't reference the input files.
In this change, the build rule references the input list (not verbatim,
but it's enough to reference just the number of input files), so that
even when the input list is reduced, the build rule is triggered.
Bug: 396542128
Test: see above
Change-Id: If37eaeef64b2d2b90c121ce6fb04e1fa00253d5c
diff --git a/core/Makefile b/core/Makefile
index a92db6c..8391065 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -1797,6 +1797,7 @@
INTERNAL_VENDOR_KERNEL_RAMDISK_TARGET := $(call intermediates-dir-for,PACKAGING,vendor_kernel_boot)/vendor_kernel_ramdisk.cpio$(RAMDISK_EXT)
$(INTERNAL_VENDOR_KERNEL_RAMDISK_TARGET): $(MKBOOTFS) $(INTERNAL_VENDOR_KERNEL_RAMDISK_FILES) | $(COMPRESSION_COMMAND_DEPS)
+ $(hide) : $(words $(INTERNAL_VENDOR_KERNEL_RAMDISK_FILES))
$(MKBOOTFS) -d $(TARGET_OUT) $(TARGET_VENDOR_KERNEL_RAMDISK_OUT) | $(COMPRESSION_COMMAND) > $@
INSTALLED_VENDOR_KERNEL_RAMDISK_TARGET := $(PRODUCT_OUT)/vendor_kernel_ramdisk.img