diff --git a/Changelog b/Changelog index 6956ac92c..1f288f1f8 100644 --- a/Changelog +++ b/Changelog @@ -1,3 +1,4 @@ +- Add iferror.m4 rather generate it out of the Makefiles. - Definitions for open permisson on file and similar objects from Eric Paris. - Apt updates for ptys and logs, from Martin Orr. diff --git a/Makefile b/Makefile index 1af6b9b5d..ab508f392 100644 --- a/Makefile +++ b/Makefile @@ -101,6 +101,7 @@ setbools := $(AWK) -f $(support)/set_bools_tuns.awk get_type_attr_decl := $(SED) -r -f $(support)/get_type_attr_decl.sed comment_move_decl := $(SED) -r -f $(support)/comment_move_decl.sed gennetfilter := $(PYTHON) -E $(support)/gennetfilter.py +m4iferror := $(support)/iferror.m4 # use our own genhomedircon to make sure we have a known usable one, # so policycoreutils updates are not required (RHEL4) genhomedircon := $(PYTHON) -E $(support)/genhomedircon diff --git a/Rules.modular b/Rules.modular index e832d79ad..1b767b07c 100644 --- a/Rules.modular +++ b/Rules.modular @@ -136,11 +136,10 @@ $(tmpdir)/global_bools.conf: M4PARAM += -D self_contained_policy $(tmpdir)/global_bools.conf: $(m4support) $(tmpdir)/generated_definitions.conf $(globalbool) $(globaltun) $(verbose) $(M4) $(M4PARAM) $^ > $@ -$(tmpdir)/all_interfaces.conf: $(m4support) $(all_interfaces) +$(tmpdir)/all_interfaces.conf: $(m4support) $(all_interfaces) $(m4iferror) @test -d $(tmpdir) || mkdir -p $(tmpdir) - @echo "ifdef(\`__if_error',\`m4exit(1)')" > $(tmpdir)/iferror.m4 @echo "divert(-1)" > $@ - $(verbose) $(M4) $^ $(tmpdir)/iferror.m4 >> $(tmpdir)/$(@F).tmp + $(verbose) $(M4) $^ >> $(tmpdir)/$(@F).tmp $(verbose) $(SED) -e s/dollarsstar/\$$\*/g $(tmpdir)/$(@F).tmp >> $@ @echo "divert" >> $@ diff --git a/Rules.monolithic b/Rules.monolithic index 5c11c1316..a6b0d55f0 100644 --- a/Rules.monolithic +++ b/Rules.monolithic @@ -124,11 +124,10 @@ $(tmpdir)/generated_definitions.conf: $(all_te_files) $(tmpdir)/global_bools.conf: $(m4support) $(tmpdir)/generated_definitions.conf $(globalbool) $(globaltun) $(verbose) $(M4) $(M4PARAM) $^ > $@ -$(tmpdir)/all_interfaces.conf: $(m4support) $(all_interfaces) +$(tmpdir)/all_interfaces.conf: $(m4support) $(all_interfaces) $(m4iferror) @test -d $(tmpdir) || mkdir -p $(tmpdir) - @echo "ifdef(\`__if_error',\`m4exit(1)')" > $(tmpdir)/iferror.m4 @echo "divert(-1)" > $@ - $(verbose) $(M4) $^ $(tmpdir)/iferror.m4 >> $(tmpdir)/$(@F).tmp + $(verbose) $(M4) $^ >> $(tmpdir)/$(@F).tmp $(verbose) $(SED) -e s/dollarsstar/\$$\*/g $(tmpdir)/$(@F).tmp >> $@ @echo "divert" >> $@ diff --git a/support/iferror.m4 b/support/iferror.m4 new file mode 100644 index 000000000..a3f36f898 --- /dev/null +++ b/support/iferror.m4 @@ -0,0 +1 @@ +ifdef(`__if_error',`m4exit(1)')