summaryrefslogtreecommitdiffstats
path: root/toolbox
diff options
context:
space:
mode:
authorYing Wang <wangying@google.com>2014-11-24 12:40:32 -0800
committerYing Wang <wangying@google.com>2014-11-24 14:09:24 -0800
commit7d45be0e4aa034e7184464b9535d8a822110d58f (patch)
treef51aebdac319e5ed0e791649727b5658b9222ae2 /toolbox
parenta4b846f0d3a679b24f9cd92da9705ae0dcd12995 (diff)
downloadcore-7d45be0e4aa034e7184464b9535d8a822110d58f.tar.gz
core-7d45be0e4aa034e7184464b9535d8a822110d58f.tar.bz2
core-7d45be0e4aa034e7184464b9535d8a822110d58f.zip
Use LOCAL_POST_LINK_CMD to install toolbox symlinks
It's simpler; Also whenever toolbox is updated the symlinks get recreated. Change-Id: I03fb61a5e0f14fd4ed23680dd6db87eed5b46787
Diffstat (limited to 'toolbox')
-rw-r--r--toolbox/Android.mk19
1 files changed, 3 insertions, 16 deletions
diff --git a/toolbox/Android.mk b/toolbox/Android.mk
index be70db4b2..5e019b61a 100644
--- a/toolbox/Android.mk
+++ b/toolbox/Android.mk
@@ -228,6 +228,9 @@ LOCAL_WHOLE_STATIC_LIBRARIES := $(patsubst %,libtoolbox_%,$(BSD_TOOLS))
LOCAL_MODULE := toolbox
LOCAL_ADDITIONAL_DEPENDENCIES += $(LOCAL_PATH)/Android.mk
+# Install the symlinks.
+LOCAL_POST_INSTALL_CMD := $(hide) $(foreach t,$(ALL_TOOLS),ln -sf toolbox $(TARGET_OUT)/bin/$(t);)
+
# Including this will define $(intermediates).
#
include $(BUILD_EXECUTABLE)
@@ -241,22 +244,6 @@ $(TOOLS_H): $(LOCAL_PATH)/Android.mk
$(TOOLS_H):
$(transform-generated-source)
-# Make symbolic link launchers for each tool.
-SYMLINKS := $(addprefix $(TARGET_OUT)/bin/,$(ALL_TOOLS))
-$(SYMLINKS): TOOLBOX_BINARY := $(LOCAL_MODULE)
-$(SYMLINKS): $(LOCAL_INSTALLED_MODULE) $(LOCAL_PATH)/Android.mk
- @echo "Symlink: $@ -> $(TOOLBOX_BINARY)"
- @mkdir -p $(dir $@)
- @rm -rf $@
- $(hide) ln -sf $(TOOLBOX_BINARY) $@
-
-ALL_DEFAULT_INSTALLED_MODULES += $(SYMLINKS)
-
-# We need this so that the installed files could be picked up based on the
-# local module name
-ALL_MODULES.$(LOCAL_MODULE).INSTALLED := \
- $(ALL_MODULES.$(LOCAL_MODULE).INSTALLED) $(SYMLINKS)
-
# We only want 'r' on userdebug and eng builds.
include $(CLEAR_VARS)