Merge "Use LOCAL_POST_INSTALL_CMD to simplify symlink creation."
This commit is contained in:
commit
8d69817940
1 changed files with 4 additions and 20 deletions
|
|
@ -51,25 +51,9 @@ LOCAL_STATIC_LIBRARIES := \
|
||||||
libmincrypt \
|
libmincrypt \
|
||||||
libext4_utils_static
|
libext4_utils_static
|
||||||
|
|
||||||
LOCAL_ADDITIONAL_DEPENDENCIES += $(LOCAL_PATH)/Android.mk
|
# Create symlinks
|
||||||
|
LOCAL_POST_INSTALL_CMD := $(hide) mkdir -p $(TARGET_ROOT_OUT)/sbin; \
|
||||||
|
ln -sf ../init $(TARGET_ROOT_OUT)/sbin/ueventd; \
|
||||||
|
ln -sf ../init $(TARGET_ROOT_OUT)/sbin/watchdogd
|
||||||
|
|
||||||
include $(BUILD_EXECUTABLE)
|
include $(BUILD_EXECUTABLE)
|
||||||
|
|
||||||
# Make a symlink from /sbin/ueventd and /sbin/watchdogd to /init
|
|
||||||
SYMLINKS := \
|
|
||||||
$(TARGET_ROOT_OUT)/sbin/ueventd \
|
|
||||||
$(TARGET_ROOT_OUT)/sbin/watchdogd
|
|
||||||
|
|
||||||
$(SYMLINKS): INIT_BINARY := $(LOCAL_MODULE)
|
|
||||||
$(SYMLINKS): $(LOCAL_INSTALLED_MODULE) $(LOCAL_PATH)/Android.mk
|
|
||||||
@echo "Symlink: $@ -> ../$(INIT_BINARY)"
|
|
||||||
@mkdir -p $(dir $@)
|
|
||||||
@rm -rf $@
|
|
||||||
$(hide) ln -sf ../$(INIT_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)
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue