Use PRIVATE_POST_INSTALL_CMD to create symlink.

Bug: 15520908
Change-Id: Ib3349f7adb6def81abf07bfb9d37093e4a599d09
This commit is contained in:
Ying Wang 2014-06-09 16:32:51 -07:00
parent 4779a11a3d
commit 7f722b366a

View file

@ -258,27 +258,13 @@ include $(LOCAL_PATH)/Android.build.mk
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# create symlink to libdlext_test.so for symlink test # create symlink to libdlext_test.so for symlink test
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
libdlext_origin := $(LOCAL_INSTALLED_MODULE) # Use = instead of := to defer the evaluation of $@
libdlext_sym := $(subst libdlext_test,libdlext_test_v2,$(libdlext_origin)) $(LOCAL_INSTALLED_MODULE): PRIVATE_POST_INSTALL_CMD = \
$(libdlext_sym): $(libdlext_origin) $(hide) cd $(dir $@) && ln -sf $(notdir $@) libdlext_test_v2.so
@echo "Symlink: $@ -> $(notdir $<)"
@mkdir -p $(dir $@)
$(hide) ln -sf $(notdir $<) $@
ALL_MODULES := \
$(ALL_MODULES) $(libdlext_sym)
ifneq ($(TARGET_2ND_ARCH),) ifneq ($(TARGET_2ND_ARCH),)
# link 64 bit .so # link 64 bit .so
libdlext_origin := $(TARGET_OUT)/lib64/libdlext_test.so $(TARGET_OUT)/lib64/libdlext_test.so: PRIVATE_POST_INSTALL_CMD = \
libdlext_sym := $(subst libdlext_test,libdlext_test_v2,$(libdlext_origin)) $(hide) cd $(dir $@) && ln -sf $(notdir $@) libdlext_test_v2.so
$(libdlext_sym): $(libdlext_origin)
@echo "Symlink: $@ -> $(notdir $<)"
@mkdir -p $(dir $@)
$(hide) ln -sf $(notdir $<) $@
ALL_MODULES := \
$(ALL_MODULES) $(libdlext_sym)
endif endif
libdlext_test_norelro_src_files := \ libdlext_test_norelro_src_files := \