2017-07-07 14:59:51 -07:00
|
|
|
# Command to turn collection of policy files into a policy.conf file to be
|
|
|
|
# processed by checkpolicy
|
|
|
|
define transform-policy-to-conf
|
|
|
|
@mkdir -p $(dir $@)
|
2019-06-19 10:52:50 -07:00
|
|
|
$(hide) $(M4) --fatal-warnings $(PRIVATE_ADDITIONAL_M4DEFS) \
|
2017-07-07 14:59:51 -07:00
|
|
|
-D mls_num_sens=$(PRIVATE_MLS_SENS) -D mls_num_cats=$(PRIVATE_MLS_CATS) \
|
2018-03-07 15:36:29 -08:00
|
|
|
-D target_build_variant=$(PRIVATE_TARGET_BUILD_VARIANT) \
|
2017-07-07 14:59:51 -07:00
|
|
|
-D target_with_dexpreopt=$(WITH_DEXPREOPT) \
|
|
|
|
-D target_arch=$(PRIVATE_TGT_ARCH) \
|
|
|
|
-D target_with_asan=$(PRIVATE_TGT_WITH_ASAN) \
|
2019-06-13 15:05:15 -07:00
|
|
|
-D target_with_native_coverage=$(PRIVATE_TGT_WITH_NATIVE_COVERAGE) \
|
2017-11-09 11:24:56 -08:00
|
|
|
-D target_full_treble=$(PRIVATE_SEPOLICY_SPLIT) \
|
2017-10-19 00:54:49 -07:00
|
|
|
-D target_compatible_property=$(PRIVATE_COMPATIBLE_PROPERTY) \
|
2019-09-25 23:14:55 -07:00
|
|
|
-D target_treble_sysprop_neverallow=$(PRIVATE_TREBLE_SYSPROP_NEVERALLOW) \
|
2018-06-05 14:11:08 -07:00
|
|
|
-D target_exclude_build_test=$(PRIVATE_EXCLUDE_BUILD_TEST) \
|
2019-10-15 18:10:38 -07:00
|
|
|
-D target_requires_insecure_execmem_for_swiftshader=$(PRODUCT_REQUIRES_INSECURE_EXECMEM_FOR_SWIFTSHADER) \
|
2017-07-07 14:59:51 -07:00
|
|
|
$(PRIVATE_TGT_RECOVERY) \
|
2019-06-19 10:52:50 -07:00
|
|
|
-s $(PRIVATE_POLICY_FILES) > $@
|
2017-07-07 14:59:51 -07:00
|
|
|
endef
|
|
|
|
.KATI_READONLY := transform-policy-to-conf
|