From 9362c7ffdd8189830065f80b21f80d2f642d6804 Mon Sep 17 00:00:00 2001 From: Ying Wang Date: Wed, 21 Nov 2012 10:47:00 -0800 Subject: [PATCH] Establish explicit dependency on selinux file_contexts. Before this change, because the file_contexts is not in the system, data or cache directory, the dependency is not reliable. This fixed the gms build error: out/target/product/gms/root/file_contexts: No such file or directory Change-Id: Id8d5b3f4557d43a509ccc00b21dd426a414b7c42 --- core/Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/Makefile b/core/Makefile index 49a94c8ece..7ce82a0727 100644 --- a/core/Makefile +++ b/core/Makefile @@ -570,6 +570,9 @@ INTERNAL_USERIMAGES_DEPS := $(MKYAFFS2) endif INTERNAL_USERIMAGES_BINARY_PATHS := $(sort $(dir $(INTERNAL_USERIMAGES_DEPS))) +SELINUX_FC := $(TARGET_ROOT_OUT)/file_contexts +INTERNAL_USERIMAGES_DEPS += $(SELINUX_FC) + # $(1): the path of the output dictionary file define generate-userimage-prop-dictionary $(if $(INTERNAL_USERIMAGES_EXT_VARIANT),$(hide) echo "fs_type=$(INTERNAL_USERIMAGES_EXT_VARIANT)" >> $(1)) @@ -579,7 +582,7 @@ $(if $(BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE),$(hide) echo "cache_fs_type=$(BOARD_CA $(if $(BOARD_CACHEIMAGE_PARTITION_SIZE),$(hide) echo "cache_size=$(BOARD_CACHEIMAGE_PARTITION_SIZE)" >> $(1)) $(if $(INTERNAL_USERIMAGES_SPARSE_EXT_FLAG),$(hide) echo "extfs_sparse_flag=$(INTERNAL_USERIMAGES_SPARSE_EXT_FLAG)" >> $(1)) $(if $(mkyaffs2_extra_flags),$(hide) echo "mkyaffs2_extra_flags=$(mkyaffs2_extra_flags)" >> $(1)) -$(hide) echo "selinux_fc=$(TARGET_ROOT_OUT)/file_contexts" >> $(1) +$(hide) echo "selinux_fc=$(SELINUX_FC)" >> $(1) endef # -----------------------------------------------------------------