blob: 2c16084423b3cc8028ba2f4a41c48c446e16a5a0 [file] [log] [blame]
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -08001LOCAL_PATH:= $(call my-dir)
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -08002
Ying Wang5748ee92013-07-23 18:03:37 -07003#######################################
4# init.rc
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -08005# Only copy init.rc if the target doesn't have its own.
6ifneq ($(TARGET_PROVIDES_INIT_RC),true)
Ying Wang5748ee92013-07-23 18:03:37 -07007include $(CLEAR_VARS)
8
9LOCAL_MODULE := init.rc
10LOCAL_SRC_FILES := $(LOCAL_MODULE)
11LOCAL_MODULE_CLASS := ETC
12LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
13
14include $(BUILD_PREBUILT)
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -080015endif
Ying Wang5748ee92013-07-23 18:03:37 -070016#######################################
17# init.environ.rc
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -080018
Ying Wang5748ee92013-07-23 18:03:37 -070019include $(CLEAR_VARS)
20LOCAL_MODULE_CLASS := ETC
21LOCAL_MODULE := init.environ.rc
22LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
Colin Cross44b65d02010-04-20 14:32:50 -070023
Ying Wang5748ee92013-07-23 18:03:37 -070024# Put it here instead of in init.rc module definition,
25# because init.rc is conditionally included.
26#
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -080027# create some directories (some are mount points)
Ying Wang5748ee92013-07-23 18:03:37 -070028LOCAL_POST_INSTALL_CMD := mkdir -p $(addprefix $(TARGET_ROOT_OUT)/, \
29 sbin dev proc sys system data)
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -080030
Ying Wang5748ee92013-07-23 18:03:37 -070031include $(BUILD_SYSTEM)/base_rules.mk
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -080032
Ying Wang5748ee92013-07-23 18:03:37 -070033$(LOCAL_BUILT_MODULE): $(LOCAL_PATH)/init.environ.rc.in
34 @echo "Generate: $< -> $@"
35 @mkdir -p $(dir $@)
36 $(hide) sed -e 's?%BOOTCLASSPATH%?$(PRODUCT_BOOTCLASSPATH)?g' $< >$@
37
38#######################################