Depend on the ramdisk/root files for BOARD_BUILD_SYSTEM_ROOT_IMAGE
When using BOARD_BUILD_SYSTEM_ROOT_IMAGE, there is no direct dependency
on the files that get typically added to the ramdisk.img apart from the
NOTICE.html dependency that some files have. This change explicitly adds
the ramdisk/root files as a dependencies of system.img so that the image
is recreated any time a file in the ramdisk changes. It also creates the
installed-files-root.txt file.
Bug: 62387674
Test: /init.rc is present in system.img's dependencies
Change-Id: I234cb8d8a648f8963610be519de1b70b7efe1fd7
diff --git a/core/main.mk b/core/main.mk
index c440f55..42e9f2c 100644
--- a/core/main.mk
+++ b/core/main.mk
@@ -1263,6 +1263,13 @@
endif
endif
+ ifeq ($(BOARD_BUILD_SYSTEM_ROOT_IMAGE),true)
+ $(call dist-for-goals, droidcore, \
+ $(INSTALLED_FILES_FILE_ROOT) \
+ $(INSTALLED_FILES_JSON_ROOT) \
+ )
+ endif
+
ifeq ($(EMMA_INSTRUMENT),true)
$(JACOCO_REPORT_CLASSES_ALL) : $(INSTALLED_SYSTEMIMAGE)
$(call dist-for-goals, dist_files, $(JACOCO_REPORT_CLASSES_ALL))