Add LOCAL_POST_INSTALL_CMD

With this support, you can piggy-back some symlinks when a module gets
installed.
This is especially helpful if the target of the symlink doesn't exist on
the build machine.

Change-Id: I48af7a90ce67475bc49b72f94a8753b94da98edd
This commit is contained in:
Ying Wang 2013-02-06 11:44:41 -08:00
parent 06a9e61da4
commit e56605ada2
2 changed files with 3 additions and 0 deletions

View File

@ -496,10 +496,12 @@ ifndef LOCAL_UNINSTALLABLE_MODULE
# Define a copy rule to install the module.
# acp and libraries that it uses can't use acp for
# installation; hence, LOCAL_ACP_UNAVAILABLE.
$(LOCAL_INSTALLED_MODULE): PRIVATE_POST_INSTALL_CMD := $(LOCAL_POST_INSTALL_CMD)
ifneq ($(LOCAL_ACP_UNAVAILABLE),true)
$(LOCAL_INSTALLED_MODULE): $(LOCAL_BUILT_MODULE) | $(ACP)
@echo "Install: $@"
$(copy-file-to-new-target)
$(PRIVATE_POST_INSTALL_CMD)
else
$(LOCAL_INSTALLED_MODULE): $(LOCAL_BUILT_MODULE)
@echo "Install: $@"

View File

@ -131,6 +131,7 @@ LOCAL_SOURCE_FILES_ALL_GENERATED:= # '',true
LOCAL_DONT_DELETE_JAR_META_INF:=
LOCAL_ADDITIONAL_CERTIFICATES:=
LOCAL_PREBUILT_MODULE_FILE:=
LOCAL_POST_INSTALL_CMD:=
# Trim MAKEFILE_LIST so that $(call my-dir) doesn't need to
# iterate over thousands of entries every time.