Clear resource_export_package outside conditionals

$(resource_export_package) is used by package_internal.mk outside
ifeq ($(need_compile_res),true), but only cleared inside the
conditional.  This causes unnecessary dependencies to be added
to an old value of $(resource_export_package).  In rare cases,
the dependency can be on itself, causing a dependency loop.

Bug: 71571462
Test: m checkbuild
Change-Id: I9fda7fe3bf9d208ad4ba2f8cdb184034bf43f044
This commit is contained in:
Colin Cross 2018-01-04 14:27:36 -08:00
parent d31ff8ff32
commit ab61f213e0
1 changed files with 2 additions and 1 deletions

View File

@ -363,6 +363,8 @@ $(foreach x,$(sharded_java_source_list_files),$(eval $(x): $(data_binding_stamp)
$(full_classes_compiled_jar): $(data_binding_stamp)
endif # LOCAL_DATA_BINDING
resource_export_package :=
ifeq ($(need_compile_res),true)
###############################
@ -429,7 +431,6 @@ $(R_file_stamp): $(all_res_assets) $(full_android_manifest) $(RenderScript_file_
$(proguard_options_file): $(R_file_stamp)
resource_export_package :=
ifdef LOCAL_EXPORT_PACKAGE_RESOURCES
# Put this module's resources into a PRODUCT-agnositc package that
# other packages can use to build their own PRODUCT-agnostic R.java (etc.)