Fix build error on empty root folder
If a build target does not contain system image, it doesn't
output anything to root folder. The patch fix the build error for
the case the root folder is empty.
Bug: 212486689
Test: make bootimage dist
Test: Build pass
Change-Id: I4f1376eb7e615f48171ed9c3057c5a78074abaa6
diff --git a/core/Makefile b/core/Makefile
index 4c1ae51..a97890e 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -784,6 +784,7 @@
$(INSTALLED_FILES_FILE_ROOT): .KATI_IMPLICIT_OUTPUTS := $(INSTALLED_FILES_JSON_ROOT)
$(INSTALLED_FILES_FILE_ROOT) : $(INTERNAL_ROOT_FILES) $(FILESLIST) $(FILESLIST_UTIL)
@echo Installed file list: $@
+ mkdir -p $(TARGET_ROOT_OUT)
mkdir -p $(dir $@)
rm -f $@
$(FILESLIST) $(TARGET_ROOT_OUT) > $(@:.txt=.json)