diff options
author | Ying Wang <wangying@google.com> | 2014-11-24 23:48:56 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2014-11-24 23:48:56 +0000 |
commit | 8d698179404658b4a037c93303b2e833932d6ff9 (patch) | |
tree | 61f4ab545c8ac59eec704f0bfa952d39590bccab | |
parent | bcece29c4438c6b92c973d30bc8a46331f16369f (diff) | |
parent | dbb78d65c09b7d731871af93cc91e8a64949608d (diff) | |
download | system_core-8d698179404658b4a037c93303b2e833932d6ff9.zip system_core-8d698179404658b4a037c93303b2e833932d6ff9.tar.gz system_core-8d698179404658b4a037c93303b2e833932d6ff9.tar.bz2 |
Merge "Use LOCAL_POST_INSTALL_CMD to simplify symlink creation."
-rw-r--r-- | init/Android.mk | 24 |
1 files changed, 4 insertions, 20 deletions
diff --git a/init/Android.mk b/init/Android.mk index 72c2272..8cda879 100644 --- a/init/Android.mk +++ b/init/Android.mk @@ -51,25 +51,9 @@ LOCAL_STATIC_LIBRARIES := \ libmincrypt \ 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) - -# 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) |