Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cf14eb59 authored by Ying Wang's avatar Ying Wang Committed by Android (Google) Code Review
Browse files

Merge "Install the nonexistent-source symlink as a post-install step"

parents 3aed2cf0 c4d6ade8
Loading
Loading
Loading
Loading
+3 −15
Original line number Diff line number Diff line
@@ -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)