blob: 2ecdbdc5f7a05f7e462ab190e4357bbf1dec888f [file] [log] [blame]
Dan Cashman36ee91d2017-07-07 14:59:51 -07001# Command to turn collection of policy files into a policy.conf file to be
2# processed by checkpolicy
3define transform-policy-to-conf
4@mkdir -p $(dir $@)
Dan Willemsen3c3e59b2019-06-19 10:52:50 -07005$(hide) $(M4) --fatal-warnings $(PRIVATE_ADDITIONAL_M4DEFS) \
Dan Cashman36ee91d2017-07-07 14:59:51 -07006 -D mls_num_sens=$(PRIVATE_MLS_SENS) -D mls_num_cats=$(PRIVATE_MLS_CATS) \
Joel Galenson8c72eea2018-03-07 15:36:29 -08007 -D target_build_variant=$(PRIVATE_TARGET_BUILD_VARIANT) \
Dan Cashman36ee91d2017-07-07 14:59:51 -07008 -D target_with_dexpreopt=$(WITH_DEXPREOPT) \
9 -D target_arch=$(PRIVATE_TGT_ARCH) \
10 -D target_with_asan=$(PRIVATE_TGT_WITH_ASAN) \
Pirama Arumuga Nainarce9c0c52019-06-13 15:05:15 -070011 -D target_with_native_coverage=$(PRIVATE_TGT_WITH_NATIVE_COVERAGE) \
Steven Moreland763697d2017-11-09 11:24:56 -080012 -D target_full_treble=$(PRIVATE_SEPOLICY_SPLIT) \
Jaekyun Seoke4971452017-10-19 16:54:49 +090013 -D target_compatible_property=$(PRIVATE_COMPATIBLE_PROPERTY) \
Inseob Kimed59c222019-09-26 15:14:55 +090014 -D target_treble_sysprop_neverallow=$(PRIVATE_TREBLE_SYSPROP_NEVERALLOW) \
Tri Vo77c44fc2018-06-05 14:11:08 -070015 -D target_exclude_build_test=$(PRIVATE_EXCLUDE_BUILD_TEST) \
Peter Collingbourne330ee2c2019-10-15 18:10:38 -070016 -D target_requires_insecure_execmem_for_swiftshader=$(PRODUCT_REQUIRES_INSECURE_EXECMEM_FOR_SWIFTSHADER) \
Dan Cashman36ee91d2017-07-07 14:59:51 -070017 $(PRIVATE_TGT_RECOVERY) \
Dan Willemsen3c3e59b2019-06-19 10:52:50 -070018 -s $(PRIVATE_POLICY_FILES) > $@
Dan Cashman36ee91d2017-07-07 14:59:51 -070019endef
20.KATI_READONLY := transform-policy-to-conf