[PATCH] fix "manpages: do not include v4-only modules in ip6tables manpage"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



previous commit tries to skip v4-only module manpages
by searching for NFPROTO_IPV(4|6) -- in the man page itself.

Searching the .c file instead is not sufficient:
- there is at least one page (libxt_policy) without a libxt_*c
- there are targets/modules which use family AF_UNSPEC.

Signed-off-by: Florian Westphal <fw@xxxxxxxxx>
---
 extensions/GNUmakefile.in |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/extensions/GNUmakefile.in b/extensions/GNUmakefile.in
index 8d7f21d..44a6d02 100644
--- a/extensions/GNUmakefile.in
+++ b/extensions/GNUmakefile.in
@@ -161,10 +161,13 @@ man_run    = \
 	${AM_VERBOSE_GEN} \
 	for ext in $(1); do \
 		f="${srcdir}/libxt_$$ext.man"; \
-		if [ -f "$$f" ] && grep -q "$(3)" "$$f"; then \
-			echo ".SS $$ext"; \
-			cat "$$f"; \
-			continue; \
+		if [ -f "$$f" ] ; then \
+			cfile="${srcdir}/libxt_$$ext.c"; \
+			if [ ! -f "$$cfile" ] || grep -q "\(_UNSPEC\|$(3)\)" "$$cfile"; then \
+				echo ".SS $$ext"; \
+				cat "$$f"; \
+				continue; \
+			fi; \
 		fi; \
 		f="${srcdir}/lib$(2)t_$$ext.man"; \
 		if [ -f "$$f" ]; then \
-- 
1.6.0.6

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux