add unconfigured modules to OFF_MODS, and change APPS_ON to APPS_BASE

This commit is contained in:
Chris PeBenito 2006-03-06 15:20:12 +00:00
parent 72ed29b59d
commit 87e73c5f07

View File

@ -240,16 +240,24 @@ MODMOD := module
MODUNUSED := off MODUNUSED := off
# test for module overrides from command line # test for module overrides from command line
MOD_TEST = $(filter $(APPS_OFF), $(APPS_ON) $(APPS_MODS)) MOD_TEST = $(filter $(APPS_OFF), $(APPS_BASE) $(APPS_MODS))
MOD_TEST += $(filter $(APPS_MODS), $(APPS_ON)) MOD_TEST += $(filter $(APPS_MODS), $(APPS_BASE))
ifneq ($(strip $(MOD_TEST)),) ifneq ($(strip $(MOD_TEST)),)
$(error Applications must be on, module, or off, and not in more than one list! $(strip $(MOD_TEST)) found in multiple lists!) $(error Applications must be on, module, or off, and not in more than one list! $(strip $(MOD_TEST)) found in multiple lists!)
endif endif
# extract settings from modules.conf # extract settings from modules.conf
BASE_MODS := $(addsuffix .te,$(sort $(shell awk '/^[[:blank:]]*[[:alpha:]]/{ if ($$3 == "$(MODBASE)") print $$1 }' $(MOD_CONF) 2> /dev/null) $(APPS_ON))) BASE_MODS := $(addsuffix .te,$(sort $(shell awk '/^[[:blank:]]*[[:alpha:]]/{ if ($$3 == "$(MODBASE)") print $$1 }' $(MOD_CONF) 2> /dev/null)))
MOD_MODS := $(addsuffix .te,$(sort $(shell awk '/^[[:blank:]]*[[:alpha:]]/{ if ($$3 == "$(MODMOD)") print $$1 }' $(MOD_CONF) 2> /dev/null) $(APPS_MODS))) MOD_MODS := $(addsuffix .te,$(sort $(shell awk '/^[[:blank:]]*[[:alpha:]]/{ if ($$3 == "$(MODMOD)") print $$1 }' $(MOD_CONF) 2> /dev/null)))
OFF_MODS := $(addsuffix .te,$(sort $(shell awk '/^[[:blank:]]*[[:alpha:]]/{ if ($$3 == "$(MODUNUSED)") print $$1 }' $(MOD_CONF) 2> /dev/null) $(APPS_OFF))) OFF_MODS := $(addsuffix .te,$(sort $(shell awk '/^[[:blank:]]*[[:alpha:]]/{ if ($$3 == "$(MODUNUSED)") print $$1 }' $(MOD_CONF) 2> /dev/null)))
# add module overrides from command line
BASE_MODS += $(APPS_BASE)
MOD_MODS += $(APPS_MODS)
OFF_MODS += $(APPS_OFF)
# add modules not in modules.conf to the off list
OFF_MODS += $(filter-out $(BASE_MODS) $(MOD_MODS),$(notdir $(DETECTED_MODS)))
# filesystems to be used in labeling targets # filesystems to be used in labeling targets
FILESYSTEMS = $(shell mount | grep -v "context=" | egrep -v '\((|.*,)bind(,.*|)\)' | awk '/(ext[23]| xfs| jfs).*rw/{print $$3}';) FILESYSTEMS = $(shell mount | grep -v "context=" | egrep -v '\((|.*,)bind(,.*|)\)' | awk '/(ext[23]| xfs| jfs).*rw/{print $$3}';)