blob: 85947516de85dae438f50b1e1c584a046c59a5c5 [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
Jeff Vander Stoep87fabf32019-05-17 12:39:41 -07009intermediates := $(TARGET_OUT_INTERMEDIATES)/ETC/sepolicy_intermediates
Jeff Vander Stoep564e2922019-05-02 13:48:44 -070010
11all_cil_files := \
12 $(built_plat_cil) \
13 $(built_plat_mapping_cil) \
14 $(built_pub_vers_cil) \
15 $(built_vendor_cil) \
16 $(ALL_MODULES.$(version).compat.cil.BUILT) \
17
18ifdef HAS_PRODUCT_SEPOLICY
19all_cil_files += \
20 $(built_product_cil) \
21 $(built_product_mapping_cil) \
22
23endif
24
25ifdef BOARD_ODM_SEPOLICY_DIRS
26all_cil_files += $(built_odm_cil)
27endif
28
Jeff Vander Stoep87fabf32019-05-17 12:39:41 -070029compat_test := $(intermediates)/$(LOCAL_MODULE)
30droidcore: $(compat_test)
31$(version)_compat_test: $(compat_test)
32.PHONY: $(version)_compat_test
33$(compat_test): PRIVATE_CIL_FILES := $(all_cil_files)
34$(compat_test): $(HOST_OUT_EXECUTABLES)/secilc $(HOST_OUT_EXECUTABLES)/sepolicy-analyze $(all_cil_files)
Jeff Vander Stoep564e2922019-05-02 13:48:44 -070035 @mkdir -p $(dir $@)
Jeff Vander Stoep87fabf32019-05-17 12:39:41 -070036 $(hide) $< -m -N -M true -G -c $(POLICYVERS) $(PRIVATE_CIL_FILES) -o $@ -f /dev/null
Jeff Vander Stoep564e2922019-05-02 13:48:44 -070037
Jeff Vander Stoep87fabf32019-05-17 12:39:41 -070038compat_test :=
Jeff Vander Stoep564e2922019-05-02 13:48:44 -070039all_cil_files :=
40version :=
41version_under_treble_tests :=