Jeff Vander Stoep | 564e292 | 2019-05-02 13:48:44 -0700 | [diff] [blame] | 1 | version := $(version_under_treble_tests) |
| 2 | |
| 3 | include $(CLEAR_VARS) |
| 4 | ################################# |
| 5 | # build this target to ensure the compat permissions files all build against the current policy |
| 6 | # |
| 7 | LOCAL_MODULE := $(version)_compat_test |
| 8 | LOCAL_REQUIRED_MODULES := $(version).compat.cil |
Jeff Vander Stoep | 87fabf3 | 2019-05-17 12:39:41 -0700 | [diff] [blame] | 9 | intermediates := $(TARGET_OUT_INTERMEDIATES)/ETC/sepolicy_intermediates |
Jeff Vander Stoep | 564e292 | 2019-05-02 13:48:44 -0700 | [diff] [blame] | 10 | |
| 11 | all_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 | |
| 18 | ifdef HAS_PRODUCT_SEPOLICY |
| 19 | all_cil_files += \ |
| 20 | $(built_product_cil) \ |
| 21 | $(built_product_mapping_cil) \ |
| 22 | |
| 23 | endif |
| 24 | |
| 25 | ifdef BOARD_ODM_SEPOLICY_DIRS |
| 26 | all_cil_files += $(built_odm_cil) |
| 27 | endif |
| 28 | |
Jeff Vander Stoep | 87fabf3 | 2019-05-17 12:39:41 -0700 | [diff] [blame] | 29 | compat_test := $(intermediates)/$(LOCAL_MODULE) |
| 30 | droidcore: $(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 Stoep | 564e292 | 2019-05-02 13:48:44 -0700 | [diff] [blame] | 35 | @mkdir -p $(dir $@) |
Jeff Vander Stoep | 87fabf3 | 2019-05-17 12:39:41 -0700 | [diff] [blame] | 36 | $(hide) $< -m -N -M true -G -c $(POLICYVERS) $(PRIVATE_CIL_FILES) -o $@ -f /dev/null |
Jeff Vander Stoep | 564e292 | 2019-05-02 13:48:44 -0700 | [diff] [blame] | 37 | |
Jeff Vander Stoep | 87fabf3 | 2019-05-17 12:39:41 -0700 | [diff] [blame] | 38 | compat_test := |
Jeff Vander Stoep | 564e292 | 2019-05-02 13:48:44 -0700 | [diff] [blame] | 39 | all_cil_files := |
| 40 | version := |
| 41 | version_under_treble_tests := |