make dupe interface and templates a fatal error.

This commit is contained in:
Chris PeBenito 2006-05-02 14:34:32 +00:00
parent b6cc2f91f4
commit 5706facdf2
4 changed files with 9 additions and 4 deletions

View File

@ -1,3 +1,4 @@
- Make duplicate template and interface declarations a fatal error.
- Patch to stabilize modules.conf `make conf` output, from Erich Schubert.
- Move xconsole_device_t from devices to xserver since it is
not actually a device, it is a named pipe.

View File

@ -142,8 +142,10 @@ ifeq ($(ALL_INTERFACES),)
$(error No enabled modules! $(notdir $(MOD_CONF)) may need to be generated by using "make conf")
endif
@test -d $(TMPDIR) || mkdir -p $(TMPDIR)
@echo "ifdef(\`__if_error',\`m4exit(1)')" > $(TMPDIR)/iferror.m4
@echo "divert(-1)" > $@
$(verbose) $(M4) $^ | $(SED) -e s/dollarsstar/\$$\*/g >> $@
$(verbose) $(M4) $^ $(TMPDIR)/iferror.m4 >> $(TMPDIR)/$(@F).tmp
$(verbose) $(SED) -e s/dollarsstar/\$$\*/g $(TMPDIR)/$(@F).tmp >> $@
@echo "divert" >> $@
$(TMPDIR)/rolemap.conf: M4PARAM += -D self_contained_policy

View File

@ -123,8 +123,10 @@ ifeq ($(ALL_INTERFACES),)
$(error No enabled modules! $(notdir $(MOD_CONF)) may need to be generated by using "make conf")
endif
@test -d $(TMPDIR) || mkdir -p $(TMPDIR)
@echo "ifdef(\`__if_error',\`m4exit(1)')" > $(TMPDIR)/iferror.m4
@echo "divert(-1)" > $@
$(verbose) $(M4) $^ | $(SED) -e s/dollarsstar/\$$\*/g >> $@
$(verbose) $(M4) $^ $(TMPDIR)/iferror.m4 >> $(TMPDIR)/$(@F).tmp
$(verbose) $(SED) -e s/dollarsstar/\$$\*/g $(TMPDIR)/$(@F).tmp >> $@
@echo "divert" >> $@
$(TMPDIR)/rolemap.conf: $(ROLEMAP)

View File

@ -50,7 +50,7 @@ define(`policy_m4_comment',`
# template(name,rules)
#
define(`template',` dnl
ifdef(`$1',`errprint(__file__:__line__`: duplicate definition of $1(). Original definition on '$1. __endline__)',`define(`$1',__line__)') dnl
ifdef(`$1',`errprint(__file__:__line__`: duplicate definition of $1(). Original definition on '$1. __endline__) define(`__if_error')',`define(`$1',__line__)') dnl
`define(`$1',` dnl
define(`policy_temp',incr(policy_call_depth)) dnl
pushdef(`policy_call_depth',policy_temp) dnl
@ -71,7 +71,7 @@ define(`template',` dnl
# interface(name,rules)
#
define(`interface',` dnl
ifdef(`$1',`errprint(__file__:__line__`: duplicate definition of $1(). Original definition on '$1. __endline__)',`define(`$1',__line__)') dnl
ifdef(`$1',`errprint(__file__:__line__`: duplicate definition of $1(). Original definition on '$1. __endline__) define(`__if_error')',`define(`$1',__line__)') dnl
`define(`$1',` dnl
define(`policy_temp',incr(policy_call_depth)) dnl
pushdef(`policy_call_depth',policy_temp) dnl