OSDN Git Service

build: Make sure we're building our secondary resource package as dependency.
authorAdnan Begovic <adnan@cyngn.com>
Wed, 30 Sep 2015 19:17:41 +0000 (12:17 -0700)
committerSteve Kondik <steve@cyngn.com>
Sun, 4 Sep 2016 04:47:36 +0000 (21:47 -0700)
  This allows us to reference internal or public resources without
  going explicitily through the platform sdk.

Change-Id: Iba361a3dcd20bc62a06e600e0240fb09d4e7bda4

core/package_internal.mk

index 551f18e..fb7c6e0 100644 (file)
@@ -436,11 +436,24 @@ framework_res_package_export_deps := $(framework_res_package_export)
 else # LOCAL_SDK_RES_VERSION
 framework_res_package_export := \
     $(call intermediates-dir-for,APPS,framework-res,,COMMON)/package-export.apk
+
+# Avoid possible circular dependency with our platform-res
+ifneq ($(LOCAL_IGNORE_SUBDIR), true)
+cm_plat_res_package_export := \
+    $(call intermediates-dir-for,APPS,org.cyanogenmod.platform-res,,COMMON)/package-export.apk
+endif # LOCAL_IGNORE_SUBDIR
+
 # We can't depend directly on the export.apk file; it won't get its
 # PRIVATE_ vars set up correctly if we do.  Instead, depend on the
 # corresponding R.stamp file, which lists the export.apk as a dependency.
 framework_res_package_export_deps := \
     $(dir $(framework_res_package_export))src/R.stamp
+
+ifneq ($(LOCAL_IGNORE_SUBDIR), true)
+cm_plat_res_package_export_deps := \
+    $(dir $(cm_plat_res_package_export))src/R.stamp
+endif # LOCAL_IGNORE_SUBDIR
+
 endif # LOCAL_SDK_RES_VERSION
 all_library_res_package_exports := \
     $(framework_res_package_export) \
@@ -451,6 +464,14 @@ all_library_res_package_export_deps := \
     $(framework_res_package_export_deps) \
     $(foreach lib,$(LOCAL_RES_LIBRARIES),\
         $(call intermediates-dir-for,APPS,$(lib),,COMMON)/src/R.stamp)
+
+ifneq ($(LOCAL_IGNORE_SUBDIR), true)
+all_library_res_package_exports += \
+    $(cm_plat_res_package_export)
+all_library_res_package_export_deps += \
+    $(cm_plat_res_package_export_deps)
+endif # LOCAL_IGNORE_SUBDIR
+
 $(resource_export_package) $(R_file_stamp) $(LOCAL_BUILT_MODULE): $(all_library_res_package_export_deps)
 $(LOCAL_INTERMEDIATE_TARGETS): \
     PRIVATE_AAPT_INCLUDES := $(all_library_res_package_exports)