iptables: use autoconf to process .in man pages
PATCH 1/1 iptables: use autoconf to process .in man pages
This fixes a bug in iptables.8 and ip6tables.8 where @PACKAGE_VERSION@ was not processed in the VERSION section. It also simplifies the Makefile by avoiding some sed commands.
---
Yea, I don't know how I feel about having a .in.in, but it seems to work well enough.
configure.ac | 2 ++
iptables/.gitignore | 1 +
iptables/Makefile.am | 9 +--------
iptables/ip6tables.8.in | 2 +-
.../{iptables-extensions.8.in => iptables-extensions.8.in.in} | 2 +-
iptables/iptables.8.in | 2 +-
6 files changed, 7 insertions(+), 11 deletions(-)
rename iptables/{iptables-extensions.8.in => iptables-extensions.8.in.in} (94%)configure.ac +2 -0
@@ -127,6 +127,8 @@ AC_SUBST([libxtables_vmajor]) AC_CONFIG_FILES([Makefile extensions/GNUmakefile include/Makefile iptables/Makefile iptables/xtables.pc + iptables/iptables.8 iptables/ip6tables.8 + iptables/iptables-extensions.8.in libipq/Makefile libipq/libipq.pc libiptc/Makefile libiptc/libiptc.pc libiptc/libip4tc.pc libiptc/libip6tc.pc
iptables/.gitignore +1 -0
@@ -6,6 +6,7 @@ /iptables /iptables.8 /iptables-extensions.8 +/iptables-extensions.8.in /iptables-save /iptables-restore /iptables-static
iptables/Makefile.am +1 -8
@@ -38,15 +38,8 @@ if ENABLE_IPV6 v6_sbin_links = ip6tables ip6tables-restore ip6tables-save endif -iptables.8: ${srcdir}/iptables.8.in - ${AM_VERBOSE_GEN} sed -e 's/@PACKAGE_AND_VERSION@/${PACKAGE} ${PACKAGE_VERSION}/g' $< >$@; - -ip6tables.8: ${srcdir}/ip6tables.8.in - ${AM_VERBOSE_GEN} sed -e 's/@PACKAGE_AND_VERSION@/${PACKAGE} ${PACKAGE_VERSION}/g' $< >$@; - iptables-extensions.8: ${srcdir}/iptables-extensions.8.in ../extensions/matches.man ../extensions/targets.man - ${AM_VERBOSE_GEN} sed -e \ - 's/@PACKAGE_AND_VERSION@/${PACKAGE} ${PACKAGE_VERSION}/g' \ + ${AM_VERBOSE_GEN} sed \ -e '/@MATCH@/ r ../extensions/matches.man' \ -e '/@TARGET@/ r ../extensions/targets.man' $< >$@;
iptables/ip6tables.8.in +1 -1
@@ -1,4 +1,4 @@ -.TH IP6TABLES 8 "" "@PACKAGE_AND_VERSION@" "@PACKAGE_AND_VERSION@" +.TH IP6TABLES 8 "" "@PACKAGE_STRING@" "@PACKAGE_STRING@" .\" .\" Man page written by Andras Kis-Szabo <[email protected]> .\" It is based on iptables man page.
iptables/iptables-extensions.8.in.in renamed from iptables/iptables-extensions.8.in +1 -1
@@ -1,4 +1,4 @@ -.TH iptables-extensions 8 "" "@PACKAGE_AND_VERSION@" "@PACKAGE_AND_VERSION@" +.TH iptables-extensions 8 "" "@PACKAGE_STRING@" "@PACKAGE_STRING@" .SH NAME iptables-extensions \(em list of extensions in the standard iptables distribution .SH SYNOPSIS
iptables/iptables.8.in +1 -1
@@ -1,4 +1,4 @@ -.TH IPTABLES 8 "" "@PACKAGE_AND_VERSION@" "@PACKAGE_AND_VERSION@" +.TH IPTABLES 8 "" "@PACKAGE_STRING@" "@PACKAGE_STRING@" .\" .\" Man page written by Herve Eychenne <[email protected]> (May 1999) .\" It is based on ipchains page.
Signature · 1 line
1.8.1.5
Quoted 3 lines · Andy Spencer
This fixes a bug in iptables.8 and ip6tables.8 where @PACKAGE_VERSION@ was not processed in the VERSION section. It also simplifies the
Makefileby avoiding some sed commands.
Applied, thanks Andy.
Quoted 3 lines
---
Yea, I don't know how I feel about having a .in.in, but it seems to work well enough.
I renamed the .in.in to .tmpl.in. After the the package version is set, we got a template file which is later on populated with the extensions. Just comestic change to avoid that.