From 396de5ff1dfbba6f307dc1514d7b3d355c66fbd2 Mon Sep 17 00:00:00 2001 From: Jeroen Roovers Date: Thu, 1 Sep 2016 12:14:03 +0200 Subject: [PATCH] Use $(AWK) not plain awk Since the awk scripts appear to use some GNU extensions, make sure we always use $(AWK). Fixes an issue where the system /usr/bin/awk may be another implementation, say mawk on a Ubuntu system. --- Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index e5d8583e1..eed901c18 100644 --- a/Makefile +++ b/Makefile @@ -293,9 +293,9 @@ cmdline_mods := $(addsuffix .te,$(APPS_MODS)) cmdline_off := $(addsuffix .te,$(APPS_OFF)) # extract settings from modules.conf -mod_conf_base := $(addsuffix .te,$(sort $(shell awk '/^[[:blank:]]*[[:alpha:]]/{ if ($$3 == "$(configbase)") print $$1 }' $(mod_conf) 2> /dev/null))) -mod_conf_mods := $(addsuffix .te,$(sort $(shell awk '/^[[:blank:]]*[[:alpha:]]/{ if ($$3 == "$(configmod)") print $$1 }' $(mod_conf) 2> /dev/null))) -mod_conf_off := $(addsuffix .te,$(sort $(shell awk '/^[[:blank:]]*[[:alpha:]]/{ if ($$3 == "$(configoff)") print $$1 }' $(mod_conf) 2> /dev/null))) +mod_conf_base := $(addsuffix .te,$(sort $(shell $(AWK) '/^[[:blank:]]*[[:alpha:]]/{ if ($$3 == "$(configbase)") print $$1 }' $(mod_conf) 2> /dev/null))) +mod_conf_mods := $(addsuffix .te,$(sort $(shell $(AWK) '/^[[:blank:]]*[[:alpha:]]/{ if ($$3 == "$(configmod)") print $$1 }' $(mod_conf) 2> /dev/null))) +mod_conf_off := $(addsuffix .te,$(sort $(shell $(AWK) '/^[[:blank:]]*[[:alpha:]]/{ if ($$3 == "$(configoff)") print $$1 }' $(mod_conf) 2> /dev/null))) base_mods := $(cmdline_base) mod_mods := $(cmdline_mods) @@ -309,7 +309,7 @@ off_mods += $(filter-out $(cmdline_off) $(cmdline_base) $(cmdline_mods), $(mod_c off_mods += $(filter-out $(base_mods) $(mod_mods) $(off_mods),$(notdir $(detected_mods))) # filesystems to be used in labeling targets -filesystems = $(shell mount | grep -v "context=" | egrep -v '\((|.*,)bind(,.*|)\)' | awk '/(ext[234]|btrfs| xfs| jfs).*rw/{print $$3}';) +filesystems = $(shell mount | grep -v "context=" | egrep -v '\((|.*,)bind(,.*|)\)' | $(AWK) '/(ext[234]|btrfs| xfs| jfs).*rw/{print $$3}';) fs_names := "btrfs ext2 ext3 ext4 xfs jfs" ########################################