1# App prebuilt coming from Soong.
2# Extra inputs:
3# LOCAL_APK_SET_INSTALL_FILE
4
5ifneq ($(LOCAL_MODULE_MAKEFILE),$(SOONG_ANDROID_MK))
6  $(call pretty-error,soong_apk_set.mk may only be used from Soong)
7endif
8
9LOCAL_BUILT_MODULE_STEM := package.apk
10LOCAL_INSTALLED_MODULE_STEM := $(notdir $(LOCAL_PREBUILT_MODULE_FILE))
11
12# Use the Soong output as the checkbuild target instead of LOCAL_BUILT_MODULE
13# to avoid checkbuilds making an extra copy of every module.
14LOCAL_CHECKED_MODULE := $(LOCAL_PREBUILT_MODULE_FILE)
15
16#######################################
17include $(BUILD_SYSTEM)/base_rules.mk
18#######################################
19
20$(eval $(call copy-one-file,$(LOCAL_PREBUILT_MODULE_FILE),$(LOCAL_BUILT_MODULE)))
21
22PACKAGES.$(LOCAL_MODULE).OVERRIDES := $(strip $(LOCAL_OVERRIDES_PACKAGES))
23
24PACKAGES := $(PACKAGES) $(LOCAL_MODULE)
25# We can't know exactly what apk files would be outputted yet.
26# Let extract_apks generate apkcerts.txt and merge it later.
27PACKAGES.$(LOCAL_MODULE).APKCERTS_FILE := $(LOCAL_APKCERTS_FILE)
28
29SOONG_ALREADY_CONV += $(LOCAL_MODULE)
30