diff options
author | Ying Wang <wangying@google.com> | 2013-09-20 10:37:42 -0700 |
---|---|---|
committer | Ying Wang <wangying@google.com> | 2013-09-20 10:37:42 -0700 |
commit | c4d6ade8394c84bf8f15147f4b31f5fcb7f60120 (patch) | |
tree | 83d78be0f09ce73808dbf9a926a6bb835b69d7ce /healthd | |
parent | b5e14ead1ea7554914e9f332f51240520fb22eba (diff) | |
download | system_core-c4d6ade8394c84bf8f15147f4b31f5fcb7f60120.zip system_core-c4d6ade8394c84bf8f15147f4b31f5fcb7f60120.tar.gz system_core-c4d6ade8394c84bf8f15147f4b31f5fcb7f60120.tar.bz2 |
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')
-rw-r--r-- | healthd/Android.mk | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/healthd/Android.mk b/healthd/Android.mk index 4a853ee..5cd5ce1 100644 --- a/healthd/Android.mk +++ b/healthd/Android.mk @@ -44,24 +44,12 @@ endif LOCAL_HAL_STATIC_LIBRARIES := libhealthd -include $(BUILD_EXECUTABLE) - # Symlink /charger to /sbin/healthd -SYMLINKS := \ - $(TARGET_ROOT_OUT)/charger +LOCAL_POST_INSTALL_CMD := $(hide) mkdir -p $(TARGET_ROOT_OUT) \ + && ln -sf /sbin/healthd $(TARGET_ROOT_OUT)/charger -$(SYMLINKS): HEALTHD_BINARY := $(LOCAL_MODULE) -$(SYMLINKS): $(LOCAL_INSTALLED_MODULE) $(LOCAL_PATH)/Android.mk - @echo "Symlink: $@ -> /sbin/$(HEALTHD_BINARY)" - @rm -rf $@ - $(hide) ln -sf /sbin/$(HEALTHD_BINARY) $@ - -ALL_DEFAULT_INSTALLED_MODULES += $(SYMLINKS) +include $(BUILD_EXECUTABLE) -# 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) define _add-charger-image include $$(CLEAR_VARS) |