summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYing Wang <wangying@google.com>2014-06-18 22:59:02 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-06-18 22:59:02 +0000
commit68d97430dd2cc25bb753df748d859415520a7dcb (patch)
tree12cb2c8b44b0562b7ad1ac6529b37ecb7f2b3717
parent8d782f5170960f023a77be656e60398390aa58aa (diff)
parent4924d10ae04574a15d94c6812153321af59a3e5b (diff)
downloadsystem_core-68d97430dd2cc25bb753df748d859415520a7dcb.zip
system_core-68d97430dd2cc25bb753df748d859415520a7dcb.tar.gz
system_core-68d97430dd2cc25bb753df748d859415520a7dcb.tar.bz2
am 4924d10a: Merge "Regenerate init.environ.rc if PRODUCT_BOOTCLASSPATH changed."
* commit '4924d10ae04574a15d94c6812153321af59a3e5b': Regenerate init.environ.rc if PRODUCT_BOOTCLASSPATH changed.
-rw-r--r--rootdir/Android.mk10
1 files changed, 9 insertions, 1 deletions
diff --git a/rootdir/Android.mk b/rootdir/Android.mk
index 2c16084..aca08bf 100644
--- a/rootdir/Android.mk
+++ b/rootdir/Android.mk
@@ -30,9 +30,17 @@ LOCAL_POST_INSTALL_CMD := mkdir -p $(addprefix $(TARGET_ROOT_OUT)/, \
include $(BUILD_SYSTEM)/base_rules.mk
-$(LOCAL_BUILT_MODULE): $(LOCAL_PATH)/init.environ.rc.in
+# Regenerate init.environ.rc if PRODUCT_BOOTCLASSPATH has changed.
+bcp_md5 := $(word 1, $(shell echo $(PRODUCT_BOOTCLASSPATH) | $(MD5SUM)))
+bcp_dep := $(intermediates)/$(bcp_md5).bcp.dep
+$(bcp_dep) :
+ $(hide) mkdir -p $(dir $@) && rm -rf $(dir $@)*.bcp.dep && touch $@
+
+$(LOCAL_BUILT_MODULE): $(LOCAL_PATH)/init.environ.rc.in $(bcp_dep)
@echo "Generate: $< -> $@"
@mkdir -p $(dir $@)
$(hide) sed -e 's?%BOOTCLASSPATH%?$(PRODUCT_BOOTCLASSPATH)?g' $< >$@
+bcp_md5 :=
+bcp_dep :=
#######################################