2359b3c162
(cherry picked from commit 7011a85606
)
Change-Id: I025fe1f64c87fd406b3a3bf3d20fd3b78be8a940
46 lines
1.3 KiB
Makefile
46 lines
1.3 KiB
Makefile
LOCAL_PATH:= $(call my-dir)
|
|
|
|
#######################################
|
|
# init.rc
|
|
# Only copy init.rc if the target doesn't have its own.
|
|
ifneq ($(TARGET_PROVIDES_INIT_RC),true)
|
|
include $(CLEAR_VARS)
|
|
|
|
LOCAL_MODULE := init.rc
|
|
LOCAL_SRC_FILES := $(LOCAL_MODULE)
|
|
LOCAL_MODULE_CLASS := ETC
|
|
LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
|
|
|
|
include $(BUILD_PREBUILT)
|
|
endif
|
|
#######################################
|
|
# init.environ.rc
|
|
|
|
include $(CLEAR_VARS)
|
|
LOCAL_MODULE_CLASS := ETC
|
|
LOCAL_MODULE := init.environ.rc
|
|
LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
|
|
|
|
# Put it here instead of in init.rc module definition,
|
|
# because init.rc is conditionally included.
|
|
#
|
|
# create some directories (some are mount points)
|
|
LOCAL_POST_INSTALL_CMD := mkdir -p $(addprefix $(TARGET_ROOT_OUT)/, \
|
|
sbin dev proc sys system data)
|
|
|
|
include $(BUILD_SYSTEM)/base_rules.mk
|
|
|
|
# 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 :=
|
|
#######################################
|