fix makefile to only rebuild modules.conf and tunables.conf explicitly

This commit is contained in:
Chris PeBenito 2005-06-14 15:54:55 +00:00
parent e75f78666c
commit d2d6c8ce17
1 changed files with 12 additions and 10 deletions

View File

@ -205,10 +205,10 @@ reload tmp/load: $(LOADPATH) $(FCPATH)
# #
policy.conf: $(POLICY_SECTIONS) policy.conf: $(POLICY_SECTIONS)
@echo "Creating $(NAME) policy.conf" @echo "Creating $(NAME) policy.conf"
# checkpolicy can use the #line directives provided by -s for error reporting: # checkpolicy can use the #line directives provided by -s for error reporting:
$(QUIET) m4 $(M4PARAM) -s $^ > tmp/$@.tmp $(QUIET) m4 $(M4PARAM) -s $^ > tmp/$@.tmp
$(QUIET) sed -e /^portcon/d -e /^nodecon/d -e /^netifcon/d < tmp/$@.tmp > $@ $(QUIET) sed -e /^portcon/d -e /^nodecon/d -e /^netifcon/d < tmp/$@.tmp > $@
# the ordering of these ocontexts matters: # the ordering of these ocontexts matters:
$(QUIET) grep ^portcon tmp/$@.tmp >> $@ || true $(QUIET) grep ^portcon tmp/$@.tmp >> $@ || true
$(QUIET) grep ^netifcon tmp/$@.tmp >> $@ || true $(QUIET) grep ^netifcon tmp/$@.tmp >> $@ || true
$(QUIET) grep ^nodecon tmp/$@.tmp >> $@ || true $(QUIET) grep ^nodecon tmp/$@.tmp >> $@ || true
@ -217,8 +217,8 @@ tmp/pre_te_files.conf: $(PRE_TE_FILES)
@test -d tmp || mkdir -p tmp @test -d tmp || mkdir -p tmp
$(QUIET) cat $^ > $@ $(QUIET) cat $^ > $@
tmp/generated_definitions.conf: $(ALL_LAYERS) $(ALL_TE_FILES) $(TUNABLES) tmp/generated_definitions.conf: $(ALL_LAYERS) $(ALL_TE_FILES)
# per-userdomain templates: # per-userdomain templates:
@test -d tmp || mkdir -p tmp @test -d tmp || mkdir -p tmp
$(QUIET) echo "define(\`per_userdomain_templates',\`" > $@ $(QUIET) echo "define(\`per_userdomain_templates',\`" > $@
$(QUIET) for i in $(patsubst %.te,%,$(notdir $(ALL_MODULES))); do \ $(QUIET) for i in $(patsubst %.te,%,$(notdir $(ALL_MODULES))); do \
@ -226,7 +226,7 @@ tmp/generated_definitions.conf: $(ALL_LAYERS) $(ALL_TE_FILES) $(TUNABLES)
>> $@ ;\ >> $@ ;\
done done
$(QUIET) echo "')" >> $@ $(QUIET) echo "')" >> $@
# define foo.te # define foo.te
$(QUIET) for i in $(notdir $(ALL_MODULES)); do \ $(QUIET) for i in $(notdir $(ALL_MODULES)); do \
echo "define(\`$$i')" >> $@ ;\ echo "define(\`$$i')" >> $@ ;\
done done
@ -265,7 +265,7 @@ $(MODDIR)/kernel/corenetwork.if: $(MODDIR)/kernel/corenetwork.if.m4 $(MODDIR)/ke
@echo "#" >> $@ @echo "#" >> $@
$(QUIET) cat $(MODDIR)/kernel/corenetwork.if.in >> $@ $(QUIET) cat $(MODDIR)/kernel/corenetwork.if.in >> $@
$(QUIET) egrep "^[[:blank:]]*network_(interface|node|port)\(.*\)" $(@:.if=.te).in \ $(QUIET) egrep "^[[:blank:]]*network_(interface|node|port)\(.*\)" $(@:.if=.te).in \
| m4 $(M4PARAM) -D monolithic_policy $(M4SUPPORT) $(MODDIR)/kernel/corenetwork.if.m4 - \ | m4 $(M4PARAM) $(M4SUPPORT) $(MODDIR)/kernel/corenetwork.if.m4 - \
| sed -e 's/dollarsone/\$$1/g' -e 's/dollarszero/\$$0/g' >> $@ | sed -e 's/dollarsone/\$$1/g' -e 's/dollarszero/\$$0/g' >> $@
$(QUIET) echo "## </module>" >> $@ $(QUIET) echo "## </module>" >> $@
@ -274,7 +274,7 @@ $(MODDIR)/kernel/corenetwork.te: $(MODDIR)/kernel/corenetwork.te.m4 $(MODDIR)/ke
@echo "# This is a generated file! Instead of modifying this file, the" >> $@ @echo "# This is a generated file! Instead of modifying this file, the" >> $@
@echo "# $(notdir $@).in or $(notdir $@).m4 file should be modified." >> $@ @echo "# $(notdir $@).in or $(notdir $@).m4 file should be modified." >> $@
@echo "#" >> $@ @echo "#" >> $@
$(QUIET) m4 $(M4PARAM) -D monolithic_policy $(M4SUPPORT) $^ \ $(QUIET) m4 $(M4PARAM) $(M4SUPPORT) $^ \
| sed -e 's/dollarsone/\$$1/g' -e 's/dollarszero/\$$0/g' >> $@ | sed -e 's/dollarsone/\$$1/g' -e 's/dollarszero/\$$0/g' >> $@
######################################## ########################################
@ -339,7 +339,9 @@ relabel: $(FC) $(SETFILES)
# #
# Create config files # Create config files
# #
conf $(MOD_DISABLE) $(TUNABLES): $(POLXML) conf: $(MOD_DISABLE) $(TUNABLES) $(GENERATED_TE) $(GENERATED_IF) $(GENERATED_FC)
$(MOD_DISABLE) $(TUNABLES): $(POLXML)
@echo "Creating $(MOD_DISABLE) and $(TUNABLES)" @echo "Creating $(MOD_DISABLE) and $(TUNABLES)"
$(QUIET) cd $(DOCS) && ../$(GENDOC) -t ../$(TUNABLES) -m ../$(MOD_DISABLE) -x ../$(POLXML) $(QUIET) cd $(DOCS) && ../$(GENDOC) -t ../$(TUNABLES) -m ../$(MOD_DISABLE) -x ../$(POLXML)
@ -348,10 +350,10 @@ conf $(MOD_DISABLE) $(TUNABLES): $(POLXML)
# Documentation generation # Documentation generation
# #
# no dependencies here, because we don't want to rebuild # minimal dependencies here, because we don't want to rebuild
# this and its dependents every time the dependencies # this and its dependents every time the dependencies
# change # change
$(POLXML): $(GENERATED_IF) $(POLXML): $(ALL_INTERFACES)
@echo "Creating $@" @echo "Creating $@"
@mkdir -p tmp @mkdir -p tmp
$(QUIET) echo '<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>' > $@ $(QUIET) echo '<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>' > $@