* [PATCH iptables 0/7] Autoools silent-rules fixes
@ 2023-12-14 12:59 Jeremy Sowden
2023-12-14 12:59 ` [PATCH iptables 1/7] build: format `AM_CPPFLAGS` variables Jeremy Sowden
` (6 more replies)
0 siblings, 7 replies; 11+ messages in thread
From: Jeremy Sowden @ 2023-12-14 12:59 UTC (permalink / raw)
To: Netfilter Devel
The build system defines variables similar to the ones automake provides
to control the verbosity of the build. However, the iptables implemen-
tation is only partially effective and was written fifteen years ago.
This patch-set brings the variable definitions in line with the current
automake recommendations and fixes some bugs.
Patch 1 contains some unrelated formatting changes.
Patches 2 & 3 remove some unused variables.
Patch 4 brings the remaining ones in line with automake.
Patch 5 adds a new variable for `ln`.
Patches 6 & 7 fix some problems with the man-page rules.
Jeremy Sowden (7):
build: format `AM_CPPFLAGS` variables
build: remove obsolete `AM_LIBTOOL_SILENT` variable
build: remove unused `AM_VERBOSE_CXX*` variables
build: use standard automake verbosity variables
build: add an automake verbosity variable for `ln`
build: replace `echo -e` with `printf`
build: suppress man-page listing in silent rules
extensions/GNUmakefile.in | 79 ++++++++++++++++++++++++---------------
iptables/Makefile.am | 15 ++++++--
2 files changed, 60 insertions(+), 34 deletions(-)
--
2.43.0
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH iptables 1/7] build: format `AM_CPPFLAGS` variables
2023-12-14 12:59 [PATCH iptables 0/7] Autoools silent-rules fixes Jeremy Sowden
@ 2023-12-14 12:59 ` Jeremy Sowden
2023-12-14 12:59 ` [PATCH iptables 2/7] build: remove obsolete `AM_LIBTOOL_SILENT` variable Jeremy Sowden
` (5 subsequent siblings)
6 siblings, 0 replies; 11+ messages in thread
From: Jeremy Sowden @ 2023-12-14 12:59 UTC (permalink / raw)
To: Netfilter Devel
Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
---
extensions/GNUmakefile.in | 10 +++++++++-
iptables/Makefile.am | 9 ++++++++-
2 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/extensions/GNUmakefile.in b/extensions/GNUmakefile.in
index e289adf06547..40bcec7999ae 100644
--- a/extensions/GNUmakefile.in
+++ b/extensions/GNUmakefile.in
@@ -22,7 +22,15 @@ regular_CPPFLAGS = @regular_CPPFLAGS@
kinclude_CPPFLAGS = @kinclude_CPPFLAGS@
AM_CFLAGS = ${regular_CFLAGS}
-AM_CPPFLAGS = ${regular_CPPFLAGS} -I${top_builddir}/include -I${top_builddir} -I${top_srcdir}/include -I${top_srcdir} ${kinclude_CPPFLAGS} ${CPPFLAGS} @libnetfilter_conntrack_CFLAGS@ @libnftnl_CFLAGS@
+AM_CPPFLAGS = ${regular_CPPFLAGS} \
+ -I${top_builddir}/include \
+ -I${top_builddir} \
+ -I${top_srcdir}/include \
+ -I${top_srcdir} \
+ ${kinclude_CPPFLAGS} \
+ ${CPPFLAGS} \
+ @libnetfilter_conntrack_CFLAGS@ \
+ @libnftnl_CFLAGS@
AM_DEPFLAGS = -Wp,-MMD,$(@D)/.$(@F).d,-MT,$@
AM_LDFLAGS = @noundef_LDFLAGS@ @regular_LDFLAGS@
diff --git a/iptables/Makefile.am b/iptables/Makefile.am
index 0f8b430c2021..31d4b48624cb 100644
--- a/iptables/Makefile.am
+++ b/iptables/Makefile.am
@@ -1,7 +1,14 @@
# -*- Makefile -*-
AM_CFLAGS = ${regular_CFLAGS}
-AM_CPPFLAGS = ${regular_CPPFLAGS} -I${top_builddir}/include -I${top_srcdir}/include -I${top_srcdir} ${kinclude_CPPFLAGS} ${libmnl_CFLAGS} ${libnftnl_CFLAGS} ${libnetfilter_conntrack_CFLAGS}
+AM_CPPFLAGS = ${regular_CPPFLAGS} \
+ -I${top_builddir}/include \
+ -I${top_srcdir}/include \
+ -I${top_srcdir} \
+ ${kinclude_CPPFLAGS} \
+ ${libmnl_CFLAGS} \
+ ${libnftnl_CFLAGS} \
+ ${libnetfilter_conntrack_CFLAGS}
AM_LDFLAGS = ${regular_LDFLAGS}
BUILT_SOURCES =
--
2.43.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH iptables 2/7] build: remove obsolete `AM_LIBTOOL_SILENT` variable
2023-12-14 12:59 [PATCH iptables 0/7] Autoools silent-rules fixes Jeremy Sowden
2023-12-14 12:59 ` [PATCH iptables 1/7] build: format `AM_CPPFLAGS` variables Jeremy Sowden
@ 2023-12-14 12:59 ` Jeremy Sowden
2023-12-14 12:59 ` [PATCH iptables 3/7] build: remove unused `AM_VERBOSE_CXX*` variables Jeremy Sowden
` (4 subsequent siblings)
6 siblings, 0 replies; 11+ messages in thread
From: Jeremy Sowden @ 2023-12-14 12:59 UTC (permalink / raw)
To: Netfilter Devel
It doesn't do anything, so get rid of it.
Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
---
extensions/GNUmakefile.in | 1 -
1 file changed, 1 deletion(-)
diff --git a/extensions/GNUmakefile.in b/extensions/GNUmakefile.in
index 40bcec7999ae..53011fc8c2bb 100644
--- a/extensions/GNUmakefile.in
+++ b/extensions/GNUmakefile.in
@@ -35,7 +35,6 @@ AM_DEPFLAGS = -Wp,-MMD,$(@D)/.$(@F).d,-MT,$@
AM_LDFLAGS = @noundef_LDFLAGS@ @regular_LDFLAGS@
ifeq (${V},)
-AM_LIBTOOL_SILENT = --silent
AM_VERBOSE_CC = @echo " CC " $@;
AM_VERBOSE_CCLD = @echo " CCLD " $@;
AM_VERBOSE_CXX = @echo " CXX " $@;
--
2.43.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH iptables 3/7] build: remove unused `AM_VERBOSE_CXX*` variables
2023-12-14 12:59 [PATCH iptables 0/7] Autoools silent-rules fixes Jeremy Sowden
2023-12-14 12:59 ` [PATCH iptables 1/7] build: format `AM_CPPFLAGS` variables Jeremy Sowden
2023-12-14 12:59 ` [PATCH iptables 2/7] build: remove obsolete `AM_LIBTOOL_SILENT` variable Jeremy Sowden
@ 2023-12-14 12:59 ` Jeremy Sowden
2023-12-14 12:59 ` [PATCH iptables 4/7] build: use standard automake verbosity variables Jeremy Sowden
` (3 subsequent siblings)
6 siblings, 0 replies; 11+ messages in thread
From: Jeremy Sowden @ 2023-12-14 12:59 UTC (permalink / raw)
To: Netfilter Devel
There is no C++, so these variables are not required.
Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
---
extensions/GNUmakefile.in | 2 --
1 file changed, 2 deletions(-)
diff --git a/extensions/GNUmakefile.in b/extensions/GNUmakefile.in
index 53011fc8c2bb..51b18a59a580 100644
--- a/extensions/GNUmakefile.in
+++ b/extensions/GNUmakefile.in
@@ -37,8 +37,6 @@ AM_LDFLAGS = @noundef_LDFLAGS@ @regular_LDFLAGS@
ifeq (${V},)
AM_VERBOSE_CC = @echo " CC " $@;
AM_VERBOSE_CCLD = @echo " CCLD " $@;
-AM_VERBOSE_CXX = @echo " CXX " $@;
-AM_VERBOSE_CXXLD = @echo " CXXLD " $@;
AM_VERBOSE_AR = @echo " AR " $@;
AM_VERBOSE_GEN = @echo " GEN " $@;
endif
--
2.43.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH iptables 4/7] build: use standard automake verbosity variables
2023-12-14 12:59 [PATCH iptables 0/7] Autoools silent-rules fixes Jeremy Sowden
` (2 preceding siblings ...)
2023-12-14 12:59 ` [PATCH iptables 3/7] build: remove unused `AM_VERBOSE_CXX*` variables Jeremy Sowden
@ 2023-12-14 12:59 ` Jeremy Sowden
2023-12-14 12:59 ` [PATCH iptables 5/7] build: add an automake verbosity variable for `ln` Jeremy Sowden
` (2 subsequent siblings)
6 siblings, 0 replies; 11+ messages in thread
From: Jeremy Sowden @ 2023-12-14 12:59 UTC (permalink / raw)
To: Netfilter Devel
The previous implementation ignored the default verbosity defined by
configure, and controlled by --{enable,disable}-silent-rules, and
treated V="" as V=0. Instead, follow the guide-lines given in the
automake manual.
Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
---
extensions/GNUmakefile.in | 41 +++++++++++++++++++++++----------------
iptables/Makefile.am | 6 +++---
2 files changed, 27 insertions(+), 20 deletions(-)
diff --git a/extensions/GNUmakefile.in b/extensions/GNUmakefile.in
index 51b18a59a580..f91ebf5e4e6e 100644
--- a/extensions/GNUmakefile.in
+++ b/extensions/GNUmakefile.in
@@ -34,12 +34,19 @@ AM_CPPFLAGS = ${regular_CPPFLAGS} \
AM_DEPFLAGS = -Wp,-MMD,$(@D)/.$(@F).d,-MT,$@
AM_LDFLAGS = @noundef_LDFLAGS@ @regular_LDFLAGS@
-ifeq (${V},)
-AM_VERBOSE_CC = @echo " CC " $@;
-AM_VERBOSE_CCLD = @echo " CCLD " $@;
-AM_VERBOSE_AR = @echo " AR " $@;
-AM_VERBOSE_GEN = @echo " GEN " $@;
-endif
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+am__v_AR_0 = @echo " AR " $@;
+am__v_CC_0 = @echo " CC " $@;
+am__v_CCLD_0 = @echo " CCLD " $@;
+am__v_GEN_0 = @echo " GEN " $@;
+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_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@}
#
# Wildcard module list
@@ -118,7 +125,7 @@ clean:
distclean: clean
init%.o: init%.c
- ${AM_VERBOSE_CC} ${CC} ${AM_CPPFLAGS} ${AM_DEPFLAGS} ${AM_CFLAGS} -D_INIT=$*_init ${CFLAGS} -o $@ -c $<;
+ ${AM_V_CC} ${CC} ${AM_CPPFLAGS} ${AM_DEPFLAGS} ${AM_CFLAGS} -D_INIT=$*_init ${CFLAGS} -o $@ -c $<;
-include .*.d
@@ -127,10 +134,10 @@ init%.o: init%.c
# Shared libraries
#
lib%.so: lib%.oo
- ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} ${LDFLAGS} -shared -o $@ $< -L../libxtables/.libs -lxtables ${$*_LIBADD};
+ ${AM_V_CCLD} ${CCLD} ${AM_LDFLAGS} ${LDFLAGS} -shared -o $@ $< -L../libxtables/.libs -lxtables ${$*_LIBADD};
lib%.oo: ${srcdir}/lib%.c
- ${AM_VERBOSE_CC} ${CC} ${AM_CPPFLAGS} ${AM_DEPFLAGS} ${AM_CFLAGS} -D_INIT=lib$*_init -DPIC -fPIC ${CFLAGS} -o $@ -c $<;
+ ${AM_V_CC} ${CC} ${AM_CPPFLAGS} ${AM_DEPFLAGS} ${AM_CFLAGS} -D_INIT=lib$*_init -DPIC -fPIC ${CFLAGS} -o $@ -c $<;
libxt_NOTRACK.so: libxt_CT.so
ln -fs $< $@
@@ -158,22 +165,22 @@ xt_connlabel_LIBADD = @libnetfilter_conntrack_LIBS@
# handling code in the Makefiles.
#
lib%.o: ${srcdir}/lib%.c
- ${AM_VERBOSE_CC} ${CC} ${AM_CPPFLAGS} ${AM_DEPFLAGS} ${AM_CFLAGS} -DNO_SHARED_LIBS=1 -D_INIT=lib$*_init ${CFLAGS} -o $@ -c $<;
+ ${AM_V_CC} ${CC} ${AM_CPPFLAGS} ${AM_DEPFLAGS} ${AM_CFLAGS} -DNO_SHARED_LIBS=1 -D_INIT=lib$*_init ${CFLAGS} -o $@ -c $<;
libext.a: initext.o ${libext_objs}
- ${AM_VERBOSE_AR} ${AR} crs $@ $^;
+ ${AM_V_AR} ${AR} crs $@ $^;
libext_ebt.a: initextb.o ${libext_ebt_objs}
- ${AM_VERBOSE_AR} ${AR} crs $@ $^;
+ ${AM_V_AR} ${AR} crs $@ $^;
libext_arpt.a: initexta.o ${libext_arpt_objs}
- ${AM_VERBOSE_AR} ${AR} crs $@ $^;
+ ${AM_V_AR} ${AR} crs $@ $^;
libext4.a: initext4.o ${libext4_objs}
- ${AM_VERBOSE_AR} ${AR} crs $@ $^;
+ ${AM_V_AR} ${AR} crs $@ $^;
libext6.a: initext6.o ${libext6_objs}
- ${AM_VERBOSE_AR} ${AR} crs $@ $^;
+ ${AM_V_AR} ${AR} crs $@ $^;
initext_func := $(addprefix xt_,${pfx_build_mod})
initextb_func := $(addprefix ebt_,${pfb_build_mod})
@@ -191,7 +198,7 @@ ${initext_depfiles}: FORCE
rm -f $@.tmp;
${initext_sources}: %.c: .%.dd
- ${AM_VERBOSE_GEN}
+ ${AM_V_GEN}
@( \
initext_func="$(value $(basename $@)_func)"; \
funcname="init_extensions$(patsubst initext%.c,%,$@)"; \
@@ -214,7 +221,7 @@ ${initext_sources}: %.c: .%.dd
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 = \
- ${AM_VERBOSE_GEN} \
+ ${AM_V_GEN} \
for ext in $(sort ${1}); do \
f="${srcdir}/libxt_$$ext.man"; \
if [ -f "$$f" ]; then \
diff --git a/iptables/Makefile.am b/iptables/Makefile.am
index 31d4b48624cb..2007cd10260b 100644
--- a/iptables/Makefile.am
+++ b/iptables/Makefile.am
@@ -114,15 +114,15 @@ x_sbin_links = iptables-nft iptables-nft-restore iptables-nft-save \
endif
iptables-extensions.8: iptables-extensions.8.tmpl ../extensions/matches.man ../extensions/targets.man
- ${AM_VERBOSE_GEN} sed \
+ ${AM_V_GEN} sed \
-e '/@MATCH@/ r ../extensions/matches.man' \
-e '/@TARGET@/ r ../extensions/targets.man' $< >$@;
${xlate_man_links}:
- ${AM_VERBOSE_GEN} echo '.so man8/xtables-translate.8' >$@
+ ${AM_V_GEN} echo '.so man8/xtables-translate.8' >$@
ip6tables.8 ip6tables-apply.8 ip6tables-restore.8 ip6tables-save.8:
- ${AM_VERBOSE_GEN} echo "$@" | sed 's|^ip6|.so man8/ip|' >$@
+ ${AM_V_GEN} echo "$@" | sed 's|^ip6|.so man8/ip|' >$@
pkgconfig_DATA = xtables.pc
--
2.43.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH iptables 5/7] build: add an automake verbosity variable for `ln`
2023-12-14 12:59 [PATCH iptables 0/7] Autoools silent-rules fixes Jeremy Sowden
` (3 preceding siblings ...)
2023-12-14 12:59 ` [PATCH iptables 4/7] build: use standard automake verbosity variables Jeremy Sowden
@ 2023-12-14 12:59 ` Jeremy Sowden
2023-12-14 12:59 ` [PATCH iptables 6/7] build: replace `echo -e` with `printf` Jeremy Sowden
2023-12-14 12:59 ` [PATCH iptables 7/7] build: suppress man-page listing in silent rules Jeremy Sowden
6 siblings, 0 replies; 11+ messages in thread
From: Jeremy Sowden @ 2023-12-14 12:59 UTC (permalink / raw)
To: Netfilter Devel
Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
---
extensions/GNUmakefile.in | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/extensions/GNUmakefile.in b/extensions/GNUmakefile.in
index f91ebf5e4e6e..dfa58c3b9e8b 100644
--- a/extensions/GNUmakefile.in
+++ b/extensions/GNUmakefile.in
@@ -39,14 +39,17 @@ am__v_AR_0 = @echo " AR " $@;
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_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_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@}
#
# Wildcard module list
@@ -140,17 +143,17 @@ lib%.oo: ${srcdir}/lib%.c
${AM_V_CC} ${CC} ${AM_CPPFLAGS} ${AM_DEPFLAGS} ${AM_CFLAGS} -D_INIT=lib$*_init -DPIC -fPIC ${CFLAGS} -o $@ -c $<;
libxt_NOTRACK.so: libxt_CT.so
- ln -fs $< $@
+ ${AM_V_LN} ln -fs $< $@
libxt_state.so: libxt_conntrack.so
- ln -fs $< $@
+ ${AM_V_LN} ln -fs $< $@
libxt_REDIRECT.so: libxt_NAT.so
- ln -fs $< $@
+ ${AM_V_LN} ln -fs $< $@
libxt_MASQUERADE.so: libxt_NAT.so
- ln -fs $< $@
+ ${AM_V_LN} ln -fs $< $@
libxt_SNAT.so: libxt_NAT.so
- ln -fs $< $@
+ ${AM_V_LN} ln -fs $< $@
libxt_DNAT.so: libxt_NAT.so
- ln -fs $< $@
+ ${AM_V_LN} ln -fs $< $@
# Need the LIBADDs in iptables/Makefile.am too for libxtables_la_LIBADD
xt_RATEEST_LIBADD = -lm
--
2.43.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH iptables 6/7] build: replace `echo -e` with `printf`
2023-12-14 12:59 [PATCH iptables 0/7] Autoools silent-rules fixes Jeremy Sowden
` (4 preceding siblings ...)
2023-12-14 12:59 ` [PATCH iptables 5/7] build: add an automake verbosity variable for `ln` Jeremy Sowden
@ 2023-12-14 12:59 ` Jeremy Sowden
2023-12-14 14:44 ` Jeremy Sowden
2023-12-14 12:59 ` [PATCH iptables 7/7] build: suppress man-page listing in silent rules Jeremy Sowden
6 siblings, 1 reply; 11+ messages in thread
From: Jeremy Sowden @ 2023-12-14 12:59 UTC (permalink / raw)
To: Netfilter Devel
`echo -e` is not portable and we can end up with:
GEN matches.man
-e + ./libxt_addrtype.man
-e + ./libip6t_ah.man
-e + ./libipt_ah.man
-e + ./libxt_bpf.man
-e + ./libxt_cgroup.man
-e + ./libxt_cluster.man
-e + ./libxt_comment.man
-e + ./libxt_connbytes.man
-e + ./libxt_connlabel.man
-e + ./libxt_connlimit.man
-e + ./libxt_connmark.man
-e + ./libxt_conntrack.man
[...]
Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
---
extensions/GNUmakefile.in | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/extensions/GNUmakefile.in b/extensions/GNUmakefile.in
index dfa58c3b9e8b..f41af7c1420d 100644
--- a/extensions/GNUmakefile.in
+++ b/extensions/GNUmakefile.in
@@ -228,19 +228,19 @@ man_run = \
for ext in $(sort ${1}); do \
f="${srcdir}/libxt_$$ext.man"; \
if [ -f "$$f" ]; then \
- echo -e "\t+ $$f" >&2; \
+ printf "\t+ $$f" >&2; \
echo ".SS $$ext"; \
cat "$$f" || exit $$?; \
fi; \
f="${srcdir}/libip6t_$$ext.man"; \
if [ -f "$$f" ]; then \
- echo -e "\t+ $$f" >&2; \
+ printf "\t+ $$f" >&2; \
echo ".SS $$ext (IPv6-specific)"; \
cat "$$f" || exit $$?; \
fi; \
f="${srcdir}/libipt_$$ext.man"; \
if [ -f "$$f" ]; then \
- echo -e "\t+ $$f" >&2; \
+ printf "\t+ $$f" >&2; \
echo ".SS $$ext (IPv4-specific)"; \
cat "$$f" || exit $$?; \
fi; \
--
2.43.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH iptables 7/7] build: suppress man-page listing in silent rules
2023-12-14 12:59 [PATCH iptables 0/7] Autoools silent-rules fixes Jeremy Sowden
` (5 preceding siblings ...)
2023-12-14 12:59 ` [PATCH iptables 6/7] build: replace `echo -e` with `printf` Jeremy Sowden
@ 2023-12-14 12:59 ` Jeremy Sowden
2023-12-14 14:32 ` Jan Engelhardt
6 siblings, 1 reply; 11+ messages in thread
From: Jeremy Sowden @ 2023-12-14 12:59 UTC (permalink / raw)
To: Netfilter Devel
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@azazel.net>
---
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
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH iptables 7/7] build: suppress man-page listing in silent rules
2023-12-14 12:59 ` [PATCH iptables 7/7] build: suppress man-page listing in silent rules Jeremy Sowden
@ 2023-12-14 14:32 ` Jan Engelhardt
2023-12-14 15:21 ` Jeremy Sowden
0 siblings, 1 reply; 11+ messages in thread
From: Jan Engelhardt @ 2023-12-14 14:32 UTC (permalink / raw)
To: Jeremy Sowden; +Cc: Netfilter Devel
On Thursday 2023-12-14 13:59, Jeremy Sowden wrote:
>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.
>@@ -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; \
I believe I was the author of this "for" block.
The intent of V=0 is to hide long build commands and show only the
output name. That works for most people most of the time. It did not
for me in this very build step. ${1}, i.e. the sections, are
dependent on configure options like --disable-ipv4/--disable-ipv6, so
I felt it made sense not only to print the output name (as V=0 does)
but also the source names—but still not the verbose build command.
With that original goal in mind, silencing echo/printf inside this
recipe, for the usecase of V=0, is incorrect.
[Patches 1 to 6 are fine by me.]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH iptables 6/7] build: replace `echo -e` with `printf`
2023-12-14 12:59 ` [PATCH iptables 6/7] build: replace `echo -e` with `printf` Jeremy Sowden
@ 2023-12-14 14:44 ` Jeremy Sowden
0 siblings, 0 replies; 11+ messages in thread
From: Jeremy Sowden @ 2023-12-14 14:44 UTC (permalink / raw)
To: Netfilter Devel
[-- Attachment #1: Type: text/plain, Size: 1776 bytes --]
On 2023-12-14, at 12:59:21 +0000, Jeremy Sowden wrote:
> `echo -e` is not portable and we can end up with:
>
> GEN matches.man
> -e + ./libxt_addrtype.man
> -e + ./libip6t_ah.man
> -e + ./libipt_ah.man
> -e + ./libxt_bpf.man
> -e + ./libxt_cgroup.man
> -e + ./libxt_cluster.man
> -e + ./libxt_comment.man
> -e + ./libxt_connbytes.man
> -e + ./libxt_connlabel.man
> -e + ./libxt_connlimit.man
> -e + ./libxt_connmark.man
> -e + ./libxt_conntrack.man
> [...]
>
> Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
> ---
> extensions/GNUmakefile.in | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/extensions/GNUmakefile.in b/extensions/GNUmakefile.in
> index dfa58c3b9e8b..f41af7c1420d 100644
> --- a/extensions/GNUmakefile.in
> +++ b/extensions/GNUmakefile.in
> @@ -228,19 +228,19 @@ man_run = \
> for ext in $(sort ${1}); do \
> f="${srcdir}/libxt_$$ext.man"; \
> if [ -f "$$f" ]; then \
> - echo -e "\t+ $$f" >&2; \
> + printf "\t+ $$f" >&2; \
> echo ".SS $$ext"; \
> cat "$$f" || exit $$?; \
> fi; \
> f="${srcdir}/libip6t_$$ext.man"; \
> if [ -f "$$f" ]; then \
> - echo -e "\t+ $$f" >&2; \
> + printf "\t+ $$f" >&2; \
> echo ".SS $$ext (IPv6-specific)"; \
> cat "$$f" || exit $$?; \
> fi; \
> f="${srcdir}/libipt_$$ext.man"; \
> if [ -f "$$f" ]; then \
> - echo -e "\t+ $$f" >&2; \
> + printf "\t+ $$f" >&2; \
> echo ".SS $$ext (IPv4-specific)"; \
> cat "$$f" || exit $$?; \
> fi; \
> --
> 2.43.0
>
>
Just noticed that there should be newlines in the printf commands. Will
resend.
J.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH iptables 7/7] build: suppress man-page listing in silent rules
2023-12-14 14:32 ` Jan Engelhardt
@ 2023-12-14 15:21 ` Jeremy Sowden
0 siblings, 0 replies; 11+ messages in thread
From: Jeremy Sowden @ 2023-12-14 15:21 UTC (permalink / raw)
To: Jan Engelhardt; +Cc: Netfilter Devel
[-- Attachment #1: Type: text/plain, Size: 1395 bytes --]
On 2023-12-14, at 15:32:26 +0100, Jan Engelhardt wrote:
> On Thursday 2023-12-14 13:59, Jeremy Sowden wrote:
> >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.
>
> >@@ -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; \
>
> I believe I was the author of this "for" block.
Indeed you were.
> The intent of V=0 is to hide long build commands and show only the
> output name. That works for most people most of the time. It did not
> for me in this very build step. ${1}, i.e. the sections, are
> dependent on configure options like --disable-ipv4/--disable-ipv6, so
> I felt it made sense not only to print the output name (as V=0 does)
> but also the source names—but still not the verbose build command.
>
> With that original goal in mind, silencing echo/printf inside this
> recipe, for the usecase of V=0, is incorrect.
Ah, I see. Let's leave it as it is then.
J.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2023-12-14 15:21 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-14 12:59 [PATCH iptables 0/7] Autoools silent-rules fixes Jeremy Sowden
2023-12-14 12:59 ` [PATCH iptables 1/7] build: format `AM_CPPFLAGS` variables Jeremy Sowden
2023-12-14 12:59 ` [PATCH iptables 2/7] build: remove obsolete `AM_LIBTOOL_SILENT` variable Jeremy Sowden
2023-12-14 12:59 ` [PATCH iptables 3/7] build: remove unused `AM_VERBOSE_CXX*` variables Jeremy Sowden
2023-12-14 12:59 ` [PATCH iptables 4/7] build: use standard automake verbosity variables Jeremy Sowden
2023-12-14 12:59 ` [PATCH iptables 5/7] build: add an automake verbosity variable for `ln` Jeremy Sowden
2023-12-14 12:59 ` [PATCH iptables 6/7] build: replace `echo -e` with `printf` Jeremy Sowden
2023-12-14 14:44 ` Jeremy Sowden
2023-12-14 12:59 ` [PATCH iptables 7/7] build: suppress man-page listing in silent rules Jeremy Sowden
2023-12-14 14:32 ` Jan Engelhardt
2023-12-14 15:21 ` Jeremy Sowden
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.