Simplify Makefile for metrics_daemon.

We can use the LOCAL_INIT_RC variable for init.rc files.

Also, switch to use <service>.rc for the filename, since this is what
Android does now.

Bug: 24465893
Change-Id: Ibf4715c3b0352422b98afc04abfd68a42a46149c
This commit is contained in:
Jorge Lucangeli Obes 2015-09-28 11:31:58 -07:00
parent 12ede1332a
commit 9341286385
2 changed files with 2 additions and 13 deletions

View File

@ -16,8 +16,6 @@ LOCAL_PATH := $(call my-dir)
ifeq ($(HOST_OS),linux)
LOCAL_INIT_SERVICE := metrics_daemon
metrics_cpp_extension := .cc
libmetrics_sources := \
c_metrics_library.cc \
@ -124,13 +122,13 @@ include $(BUILD_STATIC_LIBRARY)
# metrics daemon.
# ========================================================
include $(CLEAR_VARS)
LOCAL_MODULE := $(LOCAL_INIT_SERVICE)
LOCAL_MODULE := metrics_daemon
LOCAL_C_INCLUDES := $(metrics_includes) \
external/libchromeos
LOCAL_CFLAGS := $(metrics_CFLAGS)
LOCAL_CPP_EXTENSION := $(metrics_cpp_extension)
LOCAL_CPPFLAGS := $(metrics_CPPFLAGS)
LOCAL_REQUIRED_MODULES := init.$(LOCAL_INIT_SERVICE).rc
LOCAL_INIT_RC := metrics_daemon.rc
LOCAL_RTTI_FLAG := -frtti
LOCAL_SHARED_LIBRARIES := $(metrics_shared_libraries) \
libmetrics \
@ -146,15 +144,6 @@ LOCAL_SRC_FILES := $(metrics_daemon_sources)
LOCAL_STATIC_LIBRARIES := metrics_daemon_protos
include $(BUILD_EXECUTABLE)
ifdef INITRC_TEMPLATE
include $(CLEAR_VARS)
LOCAL_MODULE := init.$(LOCAL_INIT_SERVICE).rc
LOCAL_MODULE_CLASS := ETC
LOCAL_MODULE_PATH := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_INITRCD)
LOCAL_SRC_FILES := init.$(LOCAL_INIT_SERVICE).rc
include $(BUILD_PREBUILT)
endif # INITRC_TEMPLATE
# Unit tests for metrics.
# ========================================================
include $(CLEAR_VARS)