diff options
author | Ying Wang <wangying@google.com> | 2014-07-23 20:20:49 -0700 |
---|---|---|
committer | Ying Wang <wangying@google.com> | 2014-07-23 22:26:32 -0700 |
commit | 6aef04736294976b3bedaae5cb581a01f6387cc7 (patch) | |
tree | 81096809194df7eea0f484b5d4b217e53a7a219d /core | |
parent | 1cd4638594d21ca4643b3b96c894f93a0bd1e87a (diff) | |
download | build-6aef04736294976b3bedaae5cb581a01f6387cc7.zip build-6aef04736294976b3bedaae5cb581a01f6387cc7.tar.gz build-6aef04736294976b3bedaae5cb581a01f6387cc7.tar.bz2 |
Support to set up TARGET_COPY_OUT_VENDOR in board config.
We first define TARGET_COPY_OUT_VENDOR as a placeholder. In product
config makefiiles we actually get the placeholders in
PRODUCT_COPY_FILES. A device can set up TARGET_COPY_OUT_VENDOR in its
BoardConfig.mk. We substitute the placeholder with the real
TARGET_COPY_OUT_VENDOR value after loading the BoardConfig.mk.
With this change, we can support building vendor stuff to
system.img (the default) or a separate vendor.img.
Bug: 16515152
Change-Id: I5b601d7a8b34fe032a1bac02aa5c204a3765691d
Diffstat (limited to 'core')
-rw-r--r-- | core/envsetup.mk | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/core/envsetup.mk b/core/envsetup.mk index fcbc91f..96044b3 100644 --- a/core/envsetup.mk +++ b/core/envsetup.mk @@ -119,12 +119,21 @@ endif # Define them here so they can be used in product config files. TARGET_COPY_OUT_SYSTEM := system TARGET_COPY_OUT_DATA := data -TARGET_COPY_OUT_VENDOR := system/vendor TARGET_COPY_OUT_OEM := oem TARGET_COPY_OUT_ROOT := root TARGET_COPY_OUT_RECOVERY := recovery - -# Read the product specs so we an get TARGET_DEVICE and other +########################################### +# Define TARGET_COPY_OUT_VENDOR to a placeholder, for at this point +# we don't know if the device wants to build a separate vendor.img +# or just build vendor stuff into system.img. +# A device can set up TARGET_COPY_OUT_VENDOR to "vendor" in its +# BoardConfig.mk. +# We'll substitute with the real value after loading BoardConfig.mk. +_vendor_path_placeholder := ||VENDOR-PATH-PH|| +TARGET_COPY_OUT_VENDOR := $(_vendor_path_placeholder) +########################################### + +# Read the product specs so we can get TARGET_DEVICE and other # variables that we need in order to locate the output files. include $(BUILD_SYSTEM)/product_config.mk @@ -157,6 +166,17 @@ endif TARGET_DEVICE_DIR := $(patsubst %/,%,$(dir $(board_config_mk))) board_config_mk := +########################################### +# Now we can substitute with the real value of TARGET_COPY_OUT_VENDOR +ifeq ($(TARGET_COPY_OUT_VENDOR),$(_vendor_path_placeholder)) +TARGET_COPY_OUT_VENDOR := system/vendor +else ifeq ($(filter vendor system/vendor,$(TARGET_COPY_OUT_VENDOR)),) +$(error TARGET_COPY_OUT_VENDOR must be either 'vendor' or 'system/vendor', seeing '$(TARGET_COPY_OUT_VENDOR)'.) +endif +PRODUCT_COPY_FILES := $(subst $(_vendor_path_placeholder),$(TARGET_COPY_OUT_VENDOR),$(PRODUCT_COPY_FILES)) +########################################### + + # --------------------------------------------------------------- # Set up configuration for target machine. # The following must be set: |