diff options
author | Ian Rogers <irogers@google.com> | 2014-06-25 00:04:30 -0700 |
---|---|---|
committer | Ian Rogers <irogers@google.com> | 2014-06-27 17:23:03 -0700 |
commit | cf331d931d4d254f1bccb18c27e675b41f764890 (patch) | |
tree | 9c0067fcceba39c036fcaec0a62f44958cd6a383 /core | |
parent | e1b43254b72613e6bf9ac994c1b3f07e0020ed9c (diff) | |
download | build-cf331d931d4d254f1bccb18c27e675b41f764890.zip build-cf331d931d4d254f1bccb18c27e675b41f764890.tar.gz build-cf331d931d4d254f1bccb18c27e675b41f764890.tar.bz2 |
Host support for prefer symlink
We need a host symlink for dalvik, our *-dalvik-host build targets
are failing.
Change-Id: I6045de20c948b456a150033deb3459895aff83c6
Diffstat (limited to 'core')
-rw-r--r-- | core/executable_prefer_symlink.mk | 30 |
1 files changed, 21 insertions, 9 deletions
diff --git a/core/executable_prefer_symlink.mk b/core/executable_prefer_symlink.mk index 2f04d0d..f66a5f2 100644 --- a/core/executable_prefer_symlink.mk +++ b/core/executable_prefer_symlink.mk @@ -4,22 +4,31 @@ # # Note: now only limited to the binaries that will be installed under system/bin directory -my_symlink := $(addprefix $(TARGET_OUT)/bin/, $(LOCAL_MODULE)) # Create link to the one used depending on the target # configuration. Note that we require the TARGET_IS_64_BIT # check because 32 bit targets may not define TARGET_PREFER_32_BIT_APPS # et al. since those variables make no sense in that context. -ifeq ($(TARGET_IS_64_BIT),true) -ifneq ($(TARGET_PREFER_32_BIT_APPS),true) - $(my_symlink): PRIVATE_SRC_BINARY_NAME := $(LOCAL_MODULE_STEM_64) -else - $(my_symlink): PRIVATE_SRC_BINARY_NAME := $(LOCAL_MODULE_STEM_32) -endif + +ifneq ($(LOCAL_IS_HOST_MODULE),true) + my_symlink := $(addprefix $(TARGET_OUT)/bin/, $(LOCAL_MODULE)) + ifeq ($(TARGET_IS_64_BIT),true) + ifneq ($(TARGET_PREFER_32_BIT_APPS),true) +$(my_symlink): PRIVATE_SRC_BINARY_NAME := $(LOCAL_MODULE_STEM_64) + else +$(my_symlink): PRIVATE_SRC_BINARY_NAME := $(LOCAL_MODULE_STEM_32) + endif + else +$(my_symlink): PRIVATE_SRC_BINARY_NAME := $(LOCAL_MODULE_STEM_32) + endif else - $(my_symlink): PRIVATE_SRC_BINARY_NAME := $(LOCAL_MODULE_STEM_32) + my_symlink := $(addprefix $(HOST_OUT)/bin/, $(LOCAL_MODULE)) + ifneq ($(HOST_PREFER_32_BIT),true) +$(my_symlink): PRIVATE_SRC_BINARY_NAME := $(LOCAL_MODULE_STEM_64) + else +$(my_symlink): PRIVATE_SRC_BINARY_NAME := $(LOCAL_MODULE_STEM_32) + endif endif - $(my_symlink): $(LOCAL_INSTALLED_MODULE) $(LOCAL_MODULE_MAKEFILE) @echo "Symlink: $@ -> $(PRIVATE_SRC_BINARY_NAME)" @mkdir -p $(dir $@) @@ -30,4 +39,7 @@ $(my_symlink): $(LOCAL_INSTALLED_MODULE) $(LOCAL_MODULE_MAKEFILE) # local module name ALL_MODULES.$(LOCAL_MODULE).INSTALLED += $(my_symlink) +# Create the symlink when you run mm/mmm or "make <module_name>" +$(LOCAL_MODULE) : $(my_symlink) + my_symlink := |