From e56605ada23ff5a52e3aa8f76d383671859a7c91 Mon Sep 17 00:00:00 2001 From: Ying Wang Date: Wed, 6 Feb 2013 11:44:41 -0800 Subject: [PATCH] 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 --- core/base_rules.mk | 2 ++ core/clear_vars.mk | 1 + 2 files changed, 3 insertions(+) diff --git a/core/base_rules.mk b/core/base_rules.mk index 8b9024a4a..494f75b81 100644 --- a/core/base_rules.mk +++ b/core/base_rules.mk @@ -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: $@" diff --git a/core/clear_vars.mk b/core/clear_vars.mk index e56180d2f..38c18f1e2 100644 --- a/core/clear_vars.mk +++ b/core/clear_vars.mk @@ -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.