1version := $(version_under_treble_tests)
2
3include $(CLEAR_VARS)
4#################################
5# build this target to ensure the compat permissions files all build against the current policy
6#
7LOCAL_MODULE := $(version)_compat_test
8LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 legacy_unencumbered
9LOCAL_LICENSE_CONDITIONS := notice unencumbered
10LOCAL_NOTICE_FILE := $(LOCAL_PATH)/NOTICE
11LOCAL_REQUIRED_MODULES := $(version).compat.cil
12LOCAL_MODULE_CLASS := FAKE
13LOCAL_MODULE_TAGS := optional
14
15include $(BUILD_SYSTEM)/base_rules.mk
16
17all_cil_files := \
18    $(built_plat_cil) \
19    $(built_plat_mapping_cil) \
20    $(built_pub_vers_cil) \
21    $(ALL_MODULES.$(version).compat.cil.BUILT) \
22
23ifdef HAS_SYSTEM_EXT_SEPOLICY
24all_cil_files += $(built_system_ext_cil)
25endif
26
27ifdef HAS_SYSTEM_EXT_PUBLIC_SEPOLICY
28all_cil_files += $(built_system_ext_mapping_cil)
29endif
30
31ifdef HAS_PRODUCT_SEPOLICY
32all_cil_files += $(built_product_cil)
33endif
34
35ifdef HAS_PRODUCT_PUBLIC_SEPOLICY
36all_cil_files += $(built_product_mapping_cil)
37endif
38
39ifneq ($(mixed_sepolicy_build),true)
40
41all_cil_files += $(built_vendor_cil)
42
43ifdef BOARD_ODM_SEPOLICY_DIRS
44all_cil_files += $(built_odm_cil)
45endif
46
47endif # ifneq ($(mixed_sepolicy_build),true)
48
49$(LOCAL_BUILT_MODULE): PRIVATE_CIL_FILES := $(all_cil_files)
50$(LOCAL_BUILT_MODULE): $(HOST_OUT_EXECUTABLES)/secilc $(HOST_OUT_EXECUTABLES)/sepolicy-analyze $(all_cil_files)
51	@mkdir -p $(dir $@)
52	$(hide) $< -m -N -M true -G -c $(POLICYVERS) $(PRIVATE_CIL_FILES) -o $@ -f /dev/null
53
54all_cil_files :=
55version :=
56version_under_treble_tests :=
57