blob: 5e6dc4191f3a6f7f07ed83884620c76af9cd0330 [file] [log] [blame]
Jeff Vander Stoep564e2922019-05-02 13:48:44 -07001version := $(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_REQUIRED_MODULES := $(version).compat.cil
Jooyung Han749cf932019-05-30 01:05:43 +09009LOCAL_MODULE_CLASS := FAKE
10LOCAL_MODULE_TAGS := optional
11
12include $(BUILD_SYSTEM)/base_rules.mk
Jeff Vander Stoep564e2922019-05-02 13:48:44 -070013
14all_cil_files := \
15 $(built_plat_cil) \
16 $(built_plat_mapping_cil) \
17 $(built_pub_vers_cil) \
18 $(built_vendor_cil) \
19 $(ALL_MODULES.$(version).compat.cil.BUILT) \
20
Bowgo Tsai948934b2019-08-29 17:12:11 +080021ifdef HAS_SYSTEM_EXT_SEPOLICY
Bowgo Tsaiac381252019-10-04 14:34:18 +080022all_cil_files += $(built_system_ext_cil)
23endif
Bowgo Tsai948934b2019-08-29 17:12:11 +080024
Bowgo Tsaiac381252019-10-04 14:34:18 +080025ifdef HAS_SYSTEM_EXT_PUBLIC_SEPOLICY
26all_cil_files += $(built_system_ext_mapping_cil)
Bowgo Tsai948934b2019-08-29 17:12:11 +080027endif
28
Jeff Vander Stoep564e2922019-05-02 13:48:44 -070029ifdef HAS_PRODUCT_SEPOLICY
Bowgo Tsai7c4150c2019-10-04 15:36:05 +080030all_cil_files += $(built_product_cil)
31endif
Jeff Vander Stoep564e2922019-05-02 13:48:44 -070032
Bowgo Tsai7c4150c2019-10-04 15:36:05 +080033ifdef HAS_PRODUCT_PUBLIC_SEPOLICY
34all_cil_files += $(built_product_mapping_cil)
Jeff Vander Stoep564e2922019-05-02 13:48:44 -070035endif
36
37ifdef BOARD_ODM_SEPOLICY_DIRS
38all_cil_files += $(built_odm_cil)
39endif
40
Jooyung Han749cf932019-05-30 01:05:43 +090041$(LOCAL_BUILT_MODULE): PRIVATE_CIL_FILES := $(all_cil_files)
42$(LOCAL_BUILT_MODULE): $(HOST_OUT_EXECUTABLES)/secilc $(HOST_OUT_EXECUTABLES)/sepolicy-analyze $(all_cil_files)
Jeff Vander Stoep564e2922019-05-02 13:48:44 -070043 @mkdir -p $(dir $@)
Jeff Vander Stoep87fabf32019-05-17 12:39:41 -070044 $(hide) $< -m -N -M true -G -c $(POLICYVERS) $(PRIVATE_CIL_FILES) -o $@ -f /dev/null
Jeff Vander Stoep564e2922019-05-02 13:48:44 -070045
Jeff Vander Stoep564e2922019-05-02 13:48:44 -070046all_cil_files :=
47version :=
48version_under_treble_tests :=