Dan Cashman | 36ee91d | 2017-07-07 14:59:51 -0700 | [diff] [blame] | 1 | # Command to turn collection of policy files into a policy.conf file to be |
| 2 | # processed by checkpolicy |
| 3 | define transform-policy-to-conf |
| 4 | @mkdir -p $(dir $@) |
| 5 | $(hide) m4 $(PRIVATE_ADDITIONAL_M4DEFS) \ |
| 6 | -D mls_num_sens=$(PRIVATE_MLS_SENS) -D mls_num_cats=$(PRIVATE_MLS_CATS) \ |
Joel Galenson | 053cb34 | 2018-03-07 15:36:29 -0800 | [diff] [blame] | 7 | -D target_build_variant=$(PRIVATE_TARGET_BUILD_VARIANT) \ |
Dan Cashman | 36ee91d | 2017-07-07 14:59:51 -0700 | [diff] [blame] | 8 | -D target_with_dexpreopt=$(WITH_DEXPREOPT) \ |
| 9 | -D target_arch=$(PRIVATE_TGT_ARCH) \ |
| 10 | -D target_with_asan=$(PRIVATE_TGT_WITH_ASAN) \ |
Steven Moreland | 763697d | 2017-11-09 11:24:56 -0800 | [diff] [blame] | 11 | -D target_full_treble=$(PRIVATE_SEPOLICY_SPLIT) \ |
Jaekyun Seok | e497145 | 2017-10-19 16:54:49 +0900 | [diff] [blame] | 12 | -D target_compatible_property=$(PRIVATE_COMPATIBLE_PROPERTY) \ |
Dan Cashman | 36ee91d | 2017-07-07 14:59:51 -0700 | [diff] [blame] | 13 | $(PRIVATE_TGT_RECOVERY) \ |
| 14 | -s $^ > $@ |
| 15 | endef |
| 16 | .KATI_READONLY := transform-policy-to-conf |