2009-03-04 11:32:55 +08:00
|
|
|
LOCAL_PATH:= $(call my-dir)
|
|
|
|
|
2013-07-24 09:03:37 +08:00
|
|
|
#######################################
|
|
|
|
# init.rc
|
2009-03-04 11:32:55 +08:00
|
|
|
# Only copy init.rc if the target doesn't have its own.
|
|
|
|
ifneq ($(TARGET_PROVIDES_INIT_RC),true)
|
2013-07-24 09:03:37 +08:00
|
|
|
include $(CLEAR_VARS)
|
2009-03-04 11:32:55 +08:00
|
|
|
|
2013-07-24 09:03:37 +08:00
|
|
|
LOCAL_MODULE := init.rc
|
|
|
|
LOCAL_SRC_FILES := $(LOCAL_MODULE)
|
|
|
|
LOCAL_MODULE_CLASS := ETC
|
|
|
|
LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
|
2010-04-21 05:32:50 +08:00
|
|
|
|
2013-07-24 09:03:37 +08:00
|
|
|
include $(BUILD_PREBUILT)
|
|
|
|
endif
|
|
|
|
#######################################
|
|
|
|
# init.environ.rc
|
2012-04-05 02:26:59 +08:00
|
|
|
|
2013-07-24 09:03:37 +08:00
|
|
|
include $(CLEAR_VARS)
|
|
|
|
LOCAL_MODULE_CLASS := ETC
|
|
|
|
LOCAL_MODULE := init.environ.rc
|
|
|
|
LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
|
2009-03-04 11:32:55 +08:00
|
|
|
|
2013-07-24 09:03:37 +08:00
|
|
|
# Put it here instead of in init.rc module definition,
|
|
|
|
# because init.rc is conditionally included.
|
|
|
|
#
|
2009-03-04 11:32:55 +08:00
|
|
|
# create some directories (some are mount points)
|
2013-07-24 09:03:37 +08:00
|
|
|
LOCAL_POST_INSTALL_CMD := mkdir -p $(addprefix $(TARGET_ROOT_OUT)/, \
|
|
|
|
sbin dev proc sys system data)
|
|
|
|
|
|
|
|
include $(BUILD_SYSTEM)/base_rules.mk
|
|
|
|
|
2014-06-15 00:11:02 +08:00
|
|
|
# Regenerate init.environ.rc if PRODUCT_BOOTCLASSPATH has changed.
|
2014-08-05 22:42:34 +08:00
|
|
|
bcp_md5 := $(word 1, $(shell echo $(PRODUCT_BOOTCLASSPATH) $(PRODUCT_SYSTEM_SERVER_CLASSPATH) | $(MD5SUM)))
|
2014-06-15 00:11:02 +08:00
|
|
|
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)
|
2013-07-24 09:03:37 +08:00
|
|
|
@echo "Generate: $< -> $@"
|
|
|
|
@mkdir -p $(dir $@)
|
|
|
|
$(hide) sed -e 's?%BOOTCLASSPATH%?$(PRODUCT_BOOTCLASSPATH)?g' $< >$@
|
2014-08-05 22:42:34 +08:00
|
|
|
$(hide) sed -i -e 's?%SYSTEMSERVERCLASSPATH%?$(PRODUCT_SYSTEM_SERVER_CLASSPATH)?g' $@
|
2013-07-24 09:03:37 +08:00
|
|
|
|
2014-06-15 00:11:02 +08:00
|
|
|
bcp_md5 :=
|
|
|
|
bcp_dep :=
|
2013-07-24 09:03:37 +08:00
|
|
|
#######################################
|