[PATCH iptables 7/7] build: suppress man-page listing in silent rules

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

 



Add an `AM_V_PRINTF` variable to control whether `printf` is called.

Normally `AM_V_*` variables work by prepending

  @echo blah;

to a whole rule to replace the usual output with something briefer.
Since, in this case, the aim is to suppress `printf` commands _within_ a
rule, `AM_V_PRINTF` works be prepending `:` to the `printf` command.

Signed-off-by: Jeremy Sowden <jeremy@xxxxxxxxxx>
---
 extensions/GNUmakefile.in | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/extensions/GNUmakefile.in b/extensions/GNUmakefile.in
index f41af7c1420d..24ec57f7d1cb 100644
--- a/extensions/GNUmakefile.in
+++ b/extensions/GNUmakefile.in
@@ -40,16 +40,19 @@ am__v_CC_0           = @echo "  CC      " $@;
 am__v_CCLD_0         = @echo "  CCLD    " $@;
 am__v_GEN_0          = @echo "  GEN     " $@;
 am__v_LN_0           = @echo "  LN      " $@;
+am__v_PRINTF_0       = :
 am__v_AR_            = ${am__v_AR_@AM_DEFAULT_V@}
 am__v_CC_            = ${am__v_CC_@AM_DEFAULT_V@}
 am__v_CCLD_          = ${am__v_CCLD_@AM_DEFAULT_V@}
 am__v_GEN_           = ${am__v_GEN_@AM_DEFAULT_V@}
 am__v_LN_            = ${am__v_LN_@AM_DEFAULT_V@}
+am__v_PRINTF_        = ${am__v_PRINTF_@AM_DEFAULT_V@}
 AM_V_AR              = ${am__v_AR_@AM_V@}
 AM_V_CC              = ${am__v_CC_@AM_V@}
 AM_V_CCLD            = ${am__v_CCLD_@AM_V@}
 AM_V_GEN             = ${am__v_GEN_@AM_V@}
 AM_V_LN              = ${am__v_LN_@AM_V@}
+AM_V_PRINTF          = ${am__v_PRINTF_@AM_V@}
 
 #
 #	Wildcard module list
@@ -221,6 +224,7 @@ ${initext_sources}: %.c: .%.dd
 #
 #	Manual pages
 #
+
 ex_matches = $(shell echo ${1} | LC_ALL=POSIX grep -Eo '\b[[:lower:][:digit:]_]+\b')
 ex_targets = $(shell echo ${1} | LC_ALL=POSIX grep -Eo '\b[[:upper:][:digit:]_]+\b')
 man_run    = \
@@ -228,19 +232,19 @@ man_run    = \
 	for ext in $(sort ${1}); do \
 		f="${srcdir}/libxt_$$ext.man"; \
 		if [ -f "$$f" ]; then \
-			printf "\t+ $$f" >&2; \
+			${AM_V_PRINTF} printf "\t+ $$f" >&2; \
 			echo ".SS $$ext"; \
 			cat "$$f" || exit $$?; \
 		fi; \
 		f="${srcdir}/libip6t_$$ext.man"; \
 		if [ -f "$$f" ]; then \
-			printf "\t+ $$f" >&2; \
+			${AM_V_PRINTF} printf "\t+ $$f" >&2; \
 			echo ".SS $$ext (IPv6-specific)"; \
 			cat "$$f" || exit $$?; \
 		fi; \
 		f="${srcdir}/libipt_$$ext.man"; \
 		if [ -f "$$f" ]; then \
-			printf "\t+ $$f" >&2; \
+			${AM_V_PRINTF} printf "\t+ $$f" >&2; \
 			echo ".SS $$ext (IPv4-specific)"; \
 			cat "$$f" || exit $$?; \
 		fi; \
-- 
2.43.0





[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux