From 82ccebaa598d3e3a80f72f63a72aa34caaac477b Mon Sep 17 00:00:00 2001 From: Ying Wang Date: Mon, 13 Aug 2012 15:03:00 -0700 Subject: [PATCH] Move the selinux modules to core PRODUCT_PACKAGES The module names are phony targets and we should avoid having file targets depend on phony targets. Instead the build system makes sure to use the file dependency with PRODUCT_PACKAGES. Change-Id: I8dc59d8f9ed92c146b8827d71278e27214e60f3a --- core/Makefile | 12 ++++-------- target/product/core.mk | 9 +++++++++ 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/core/Makefile b/core/Makefile index 8445c583ed..17f45cfa25 100644 --- a/core/Makefile +++ b/core/Makefile @@ -352,13 +352,9 @@ INTERNAL_RAMDISK_FILES := $(filter $(TARGET_ROOT_OUT)/%, \ BUILT_RAMDISK_TARGET := $(PRODUCT_OUT)/ramdisk.img -ifeq ($(HAVE_SELINUX),true) -SELINUX_DEPENDS := sepolicy file_contexts seapp_contexts property_contexts mac_permissions.xml -endif - # We just build this directly to the install location. INSTALLED_RAMDISK_TARGET := $(BUILT_RAMDISK_TARGET) -$(INSTALLED_RAMDISK_TARGET): $(MKBOOTFS) $(INTERNAL_RAMDISK_FILES) $(SELINUX_DEPENDS) | $(MINIGZIP) +$(INSTALLED_RAMDISK_TARGET): $(MKBOOTFS) $(INTERNAL_RAMDISK_FILES) | $(MINIGZIP) $(call pretty,"Target ram disk: $@") $(hide) $(MKBOOTFS) $(TARGET_ROOT_OUT) | $(MINIGZIP) > $@ @@ -707,7 +703,7 @@ ifdef is_tests_build # $(tests_MODULES)) endif -FULL_SYSTEMIMAGE_DEPS := $(INTERNAL_SYSTEMIMAGE_FILES) $(INTERNAL_USERIMAGES_DEPS) $(SELINUX_DEPENDS) +FULL_SYSTEMIMAGE_DEPS := $(INTERNAL_SYSTEMIMAGE_FILES) $(INTERNAL_USERIMAGES_DEPS) # ----------------------------------------------------------------- # installed file list # Depending on anything that $(BUILT_SYSTEMIMAGE) depends on. @@ -1156,7 +1152,7 @@ INTERNAL_OTA_PACKAGE_TARGET := $(PRODUCT_OUT)/$(name).zip $(INTERNAL_OTA_PACKAGE_TARGET): KEY_CERT_PAIR := $(DEFAULT_KEY_CERT_PAIR) -$(INTERNAL_OTA_PACKAGE_TARGET): $(BUILT_TARGET_FILES_PACKAGE) $(DISTTOOLS) $(SELINUX_DEPENDS) +$(INTERNAL_OTA_PACKAGE_TARGET): $(BUILT_TARGET_FILES_PACKAGE) $(DISTTOOLS) @echo "Package OTA: $@" $(hide) ./build/tools/releasetools/ota_from_target_files -v \ -p $(HOST_OUT) \ @@ -1184,7 +1180,7 @@ else $(INTERNAL_UPDATE_PACKAGE_TARGET): extensions := $(TARGET_RELEASETOOLS_EXTENSIONS) endif -$(INTERNAL_UPDATE_PACKAGE_TARGET): $(BUILT_TARGET_FILES_PACKAGE) $(DISTTOOLS) $(SELINUX_DEPENDS) +$(INTERNAL_UPDATE_PACKAGE_TARGET): $(BUILT_TARGET_FILES_PACKAGE) $(DISTTOOLS) @echo "Package: $@" $(hide) ./build/tools/releasetools/img_from_target_files -v \ -s $(extensions) \ diff --git a/target/product/core.mk b/target/product/core.mk index c7ae51c10c..d637bd4c90 100644 --- a/target/product/core.mk +++ b/target/product/core.mk @@ -148,3 +148,12 @@ ifeq ($(WITH_HOST_DALVIK),true) zoneinfo-host.idx \ zoneinfo-host.version endif + +ifeq ($(HAVE_SELINUX),true) + PRODUCT_PACKAGES += \ + sepolicy \ + file_contexts \ + seapp_contexts \ + property_contexts \ + mac_permissions.xml +endif