Skip to content
Snippets Groups Projects
Commit ebf3eaca authored by Tri Vo's avatar Tri Vo
Browse files

sepolicy: fix mac build

sed "-i" flag on Mac has different syntax than on Linux. Replace use of
sed with grep.

A simple fix like this should suffice for this case, but ideally, we
should maintain our own utils instead of using tools on the host
machine.

Fixes: 121235932
Test: m selinux_policy
Change-Id: I46c3bdb90bf7de48d2c942b15a65ce82ae3041c5
parent 3361ec43
No related branches found
No related tags found
No related merge requests found
......@@ -514,7 +514,8 @@ $(HOST_OUT_EXECUTABLES)/build_sepolicy $(HOST_OUT_EXECUTABLES)/secilc $(built_pl
-f $(PRIVATE_PLAT_CIL) -t $@
# Line markers (denoted by ;;) are malformed after above cmd. They are only
# used for debugging, so we remove them.
$(hide) sed -i '/;;/d' $@
$(hide) grep -v ';;' $@ > $@.tmp
$(hide) mv $@.tmp $@
# Combine plat_sepolicy.cil and product_sepolicy.cil to make sure that the
# latter doesn't accidentally depend on vendor/odm policies.
$(hide) $(HOST_OUT_EXECUTABLES)/secilc -m -M true -G -c $(POLICYVERS) \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment