summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYing Wang <wangying@google.com>2014-06-09 16:32:51 -0700
committerYing Wang <wangying@google.com>2014-06-09 16:32:51 -0700
commit7f722b366aad52000465818ffbdc880676be9aae (patch)
tree4b8e02771f2273a3e5e5a02e27f2e8de1d95d6c1
parent4779a11a3dfa7314b3cb3998b1f9172c40dfc5f6 (diff)
downloadbionic-7f722b366aad52000465818ffbdc880676be9aae.zip
bionic-7f722b366aad52000465818ffbdc880676be9aae.tar.gz
bionic-7f722b366aad52000465818ffbdc880676be9aae.tar.bz2
Use PRIVATE_POST_INSTALL_CMD to create symlink.
Bug: 15520908 Change-Id: Ib3349f7adb6def81abf07bfb9d37093e4a599d09
-rw-r--r--tests/Android.mk24
1 files changed, 5 insertions, 19 deletions
diff --git a/tests/Android.mk b/tests/Android.mk
index 25f8b2b..56b1ef1 100644
--- a/tests/Android.mk
+++ b/tests/Android.mk
@@ -258,27 +258,13 @@ include $(LOCAL_PATH)/Android.build.mk
# -----------------------------------------------------------------------------
# create symlink to libdlext_test.so for symlink test
# -----------------------------------------------------------------------------
-libdlext_origin := $(LOCAL_INSTALLED_MODULE)
-libdlext_sym := $(subst libdlext_test,libdlext_test_v2,$(libdlext_origin))
-$(libdlext_sym): $(libdlext_origin)
- @echo "Symlink: $@ -> $(notdir $<)"
- @mkdir -p $(dir $@)
- $(hide) ln -sf $(notdir $<) $@
-
-ALL_MODULES := \
- $(ALL_MODULES) $(libdlext_sym)
-
+# Use = instead of := to defer the evaluation of $@
+$(LOCAL_INSTALLED_MODULE): PRIVATE_POST_INSTALL_CMD = \
+ $(hide) cd $(dir $@) && ln -sf $(notdir $@) libdlext_test_v2.so
ifneq ($(TARGET_2ND_ARCH),)
# link 64 bit .so
-libdlext_origin := $(TARGET_OUT)/lib64/libdlext_test.so
-libdlext_sym := $(subst libdlext_test,libdlext_test_v2,$(libdlext_origin))
-$(libdlext_sym): $(libdlext_origin)
- @echo "Symlink: $@ -> $(notdir $<)"
- @mkdir -p $(dir $@)
- $(hide) ln -sf $(notdir $<) $@
-
-ALL_MODULES := \
- $(ALL_MODULES) $(libdlext_sym)
+$(TARGET_OUT)/lib64/libdlext_test.so: PRIVATE_POST_INSTALL_CMD = \
+ $(hide) cd $(dir $@) && ln -sf $(notdir $@) libdlext_test_v2.so
endif
libdlext_test_norelro_src_files := \