summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYing Wang2013-09-20 12:37:42 -0500
committerYing Wang2013-09-20 12:37:42 -0500
commitc4d6ade8394c84bf8f15147f4b31f5fcb7f60120 (patch)
tree83d78be0f09ce73808dbf9a926a6bb835b69d7ce /healthd/Android.mk
parentb5e14ead1ea7554914e9f332f51240520fb22eba (diff)
downloadplatform-system-core-c4d6ade8394c84bf8f15147f4b31f5fcb7f60120.tar.gz
platform-system-core-c4d6ade8394c84bf8f15147f4b31f5fcb7f60120.tar.xz
platform-system-core-c4d6ade8394c84bf8f15147f4b31f5fcb7f60120.zip
Install the nonexistent-source symlink as a post-install step
Previously because /sbin/healthd does not exist on the build host, make always tries to rebuild the symlink even in an already-up-to-date tree. Change-Id: I41201282281476b14eaf4c7d9b2e09fe367c1422
Diffstat (limited to 'healthd/Android.mk')
-rw-r--r--healthd/Android.mk18
1 files changed, 3 insertions, 15 deletions
diff --git a/healthd/Android.mk b/healthd/Android.mk
index 4a853eeaf..5cd5ce186 100644
--- a/healthd/Android.mk
+++ b/healthd/Android.mk
@@ -44,24 +44,12 @@ endif
44 44
45LOCAL_HAL_STATIC_LIBRARIES := libhealthd 45LOCAL_HAL_STATIC_LIBRARIES := libhealthd
46 46
47include $(BUILD_EXECUTABLE)
48
49# Symlink /charger to /sbin/healthd 47# Symlink /charger to /sbin/healthd
50SYMLINKS := \ 48LOCAL_POST_INSTALL_CMD := $(hide) mkdir -p $(TARGET_ROOT_OUT) \
51 $(TARGET_ROOT_OUT)/charger 49 && ln -sf /sbin/healthd $(TARGET_ROOT_OUT)/charger
52 50
53$(SYMLINKS): HEALTHD_BINARY := $(LOCAL_MODULE) 51include $(BUILD_EXECUTABLE)
54$(SYMLINKS): $(LOCAL_INSTALLED_MODULE) $(LOCAL_PATH)/Android.mk
55 @echo "Symlink: $@ -> /sbin/$(HEALTHD_BINARY)"
56 @rm -rf $@
57 $(hide) ln -sf /sbin/$(HEALTHD_BINARY) $@
58
59ALL_DEFAULT_INSTALLED_MODULES += $(SYMLINKS)
60 52
61# We need this so that the installed files could be picked up based on the
62# local module name
63ALL_MODULES.$(LOCAL_MODULE).INSTALLED := \
64 $(ALL_MODULES.$(LOCAL_MODULE).INSTALLED) $(SYMLINKS)
65 53
66define _add-charger-image 54define _add-charger-image
67include $$(CLEAR_VARS) 55include $$(CLEAR_VARS)