From c4d6ade8394c84bf8f15147f4b31f5fcb7f60120 Mon Sep 17 00:00:00 2001 From: Ying Wang Date: Fri, 20 Sep 2013 10:37:42 -0700 Subject: 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 --- healthd/Android.mk | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) (limited to 'healthd') 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) -- cgit v1.1