am 98ae7985: Fix using variable intermediates.COMMON before defining.

* commit '98ae79853509bbc1b6ee66ace10295c5d29510c5':
  Fix using variable intermediates.COMMON before defining.
This commit is contained in:
Ying Wang 2014-12-18 23:34:25 +00:00 committed by Android Git Automerger
commit a1e09b1ae6
2 changed files with 6 additions and 18 deletions

View file

@ -17,16 +17,13 @@ endif
# know its results before base_rules.mk is included.
include $(BUILD_SYSTEM)/configure_module_stem.mk
# base_rules.make defines $(intermediates), but we need its value
# before we include base_rules. Make a guess, and verify that
# it's correct once the real value is defined.
guessed_intermediates := $(call local-intermediates-dir,,$(LOCAL_2ND_ARCH_VAR_PREFIX))
intermediates := $(call local-intermediates-dir,,$(LOCAL_2ND_ARCH_VAR_PREFIX))
# Define the target that is the unmodified output of the linker.
# The basename of this target must be the same as the final output
# binary name, because it's used to set the "soname" in the binary.
# The includer of this file will define a rule to build this target.
linked_module := $(guessed_intermediates)/LINKED/$(my_built_module_stem)
linked_module := $(intermediates)/LINKED/$(my_built_module_stem)
ALL_ORIGINAL_DYNAMIC_BINARIES += $(linked_module)
@ -41,11 +38,6 @@ LOCAL_INTERMEDIATE_TARGETS := $(linked_module)
include $(BUILD_SYSTEM)/binary.mk
###################################
# Make sure that our guess at the value of intermediates was correct.
ifneq ($(intermediates),$(guessed_intermediates))
$(error Internal error: guessed path '$(guessed_intermediates)' doesn't match '$(intermediates))
endif
###########################################################
## Compress
###########################################################

View file

@ -123,7 +123,8 @@ endif
all_res_assets := $(strip $(all_assets) $(all_resources))
package_expected_intermediates_COMMON := $(call local-intermediates-dir,COMMON)
intermediates.COMMON := $(call local-intermediates-dir,COMMON)
# If no assets or resources were found, clear the directory variables so
# we don't try to build them.
ifneq (true,$(need_compile_asset))
@ -136,7 +137,7 @@ else
# Make sure that R_file_stamp inherits the proper PRIVATE vars.
# If R.stamp moves, be sure to update the framework makefile,
# which has intimate knowledge of its location.
R_file_stamp := $(package_expected_intermediates_COMMON)/src/R.stamp
R_file_stamp := $(intermediates.COMMON)/src/R.stamp
LOCAL_INTERMEDIATE_TARGETS += $(R_file_stamp)
endif
@ -156,7 +157,7 @@ endif
proguard_options_file :=
ifneq ($(LOCAL_PROGUARD_ENABLED),custom)
ifeq ($(need_compile_res),true)
proguard_options_file := $(package_expected_intermediates_COMMON)/proguard_options
proguard_options_file := $(intermediates.COMMON)/proguard_options
endif # need_compile_res
endif # !custom
LOCAL_PROGUARD_FLAGS := $(addprefix -include ,$(proguard_options_file)) $(LOCAL_PROGUARD_FLAGS)
@ -223,11 +224,6 @@ ifeq ($(need_compile_res),true)
# At the same time, this will copy the R.java file to a central
# 'R' directory to make it easier to add the files to an IDE.
#
#TODO: use PRIVATE_SOURCE_INTERMEDIATES_DIR instead of
# $(intermediates.COMMON)/src
ifneq ($(package_expected_intermediates_COMMON),$(intermediates.COMMON))
$(error $(LOCAL_MODULE): internal error: expected intermediates.COMMON "$(package_expected_intermediates_COMMON)" != intermediates.COMMON "$(intermediates.COMMON)")
endif
$(R_file_stamp): PRIVATE_RESOURCE_PUBLICS_OUTPUT := \
$(intermediates.COMMON)/public_resources.xml