* [PATCH xtables-addons 0/5] Autoools silent-rules fixes
@ 2023-08-18 12:38 Jeremy Sowden
2023-08-18 12:38 ` [PATCH xtables-addons 1/5] build: use `$(top_srcdir)` when including Makefile.extra Jeremy Sowden
` (4 more replies)
0 siblings, 5 replies; 7+ messages in thread
From: Jeremy Sowden @ 2023-08-18 12:38 UTC (permalink / raw)
To: Netfilter Devel
The build system attempts to extend and make use of the `AM_V_*`
variables that automake provides to control the verbosity of the build.
However, there are bugs in the implementation which render it only
partially effective. This patch-set updates some of the variable
definitions and fixes the bugs.
The first patch is an unrelated `include` tweak.
Jeremy Sowden (5):
build: use `$(top_srcdir)` when including Makefile.extra
build: replace `AM_V_silent` with `AM_V_at`
build: update `AM_V_*` definitions to match autotools
build: don't hard-code `AM_DEFAULT_VERBOSITY` in Makefile.iptrules
build: define `AM_V_GEN` where it is needed
Makefile.iptrules.in | 24 +++++++++---------------
Makefile.mans.in | 5 +++++
extensions/ACCOUNT/Makefile.am | 2 +-
extensions/Makefile.am | 8 ++++----
extensions/pknock/Makefile.am | 2 +-
5 files changed, 20 insertions(+), 21 deletions(-)
--
2.40.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH xtables-addons 1/5] build: use `$(top_srcdir)` when including Makefile.extra
2023-08-18 12:38 [PATCH xtables-addons 0/5] Autoools silent-rules fixes Jeremy Sowden
@ 2023-08-18 12:38 ` Jeremy Sowden
2023-08-18 12:38 ` [PATCH xtables-addons 2/5] build: replace `AM_V_silent` with `AM_V_at` Jeremy Sowden
` (3 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Jeremy Sowden @ 2023-08-18 12:38 UTC (permalink / raw)
To: Netfilter Devel
It's less fragile than using hard-coded relative paths.
Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
---
extensions/ACCOUNT/Makefile.am | 2 +-
extensions/Makefile.am | 2 +-
extensions/pknock/Makefile.am | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/extensions/ACCOUNT/Makefile.am b/extensions/ACCOUNT/Makefile.am
index 65a956697b20..473a739f981a 100644
--- a/extensions/ACCOUNT/Makefile.am
+++ b/extensions/ACCOUNT/Makefile.am
@@ -3,7 +3,7 @@
AM_CPPFLAGS = ${regular_CPPFLAGS} -I${abs_top_srcdir}/extensions
AM_CFLAGS = ${regular_CFLAGS} ${libxtables_CFLAGS}
-include ../../Makefile.extra
+include $(top_srcdir)/Makefile.extra
sbin_PROGRAMS = iptaccount
iptaccount_LDADD = libxt_ACCOUNT_cl.la
diff --git a/extensions/Makefile.am b/extensions/Makefile.am
index a487fd8c141a..eebb82fd2f22 100644
--- a/extensions/Makefile.am
+++ b/extensions/Makefile.am
@@ -26,4 +26,4 @@ install-exec-local: modules_install
clean-local: clean_modules
-include ../Makefile.extra
+include $(top_srcdir)/Makefile.extra
diff --git a/extensions/pknock/Makefile.am b/extensions/pknock/Makefile.am
index 35528709aa15..5fcae4794230 100644
--- a/extensions/pknock/Makefile.am
+++ b/extensions/pknock/Makefile.am
@@ -3,7 +3,7 @@
AM_CPPFLAGS = ${regular_CPPFLAGS} -I${abs_top_srcdir}/extensions
AM_CFLAGS = ${regular_CFLAGS} ${libxtables_CFLAGS}
-include ../../Makefile.extra
+include $(top_srcdir)/Makefile.extra
sbin_PROGRAMS = pknlusr
dist_man_MANS = pknlusr.8
--
2.40.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH xtables-addons 2/5] build: replace `AM_V_silent` with `AM_V_at`
2023-08-18 12:38 [PATCH xtables-addons 0/5] Autoools silent-rules fixes Jeremy Sowden
2023-08-18 12:38 ` [PATCH xtables-addons 1/5] build: use `$(top_srcdir)` when including Makefile.extra Jeremy Sowden
@ 2023-08-18 12:38 ` Jeremy Sowden
2023-08-18 12:38 ` [PATCH xtables-addons 3/5] build: update `AM_V_*` definitions to match autotools Jeremy Sowden
` (2 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Jeremy Sowden @ 2023-08-18 12:38 UTC (permalink / raw)
To: Netfilter Devel
`AM_V_silent` was buggy and defined in the wrong place. Replace it with
`AM_V_at`, which is provided by automake for the same purpose.
Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
---
Makefile.iptrules.in | 3 ---
extensions/Makefile.am | 6 +++---
2 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/Makefile.iptrules.in b/Makefile.iptrules.in
index fcac8856283d..f2f202ada360 100644
--- a/Makefile.iptrules.in
+++ b/Makefile.iptrules.in
@@ -21,15 +21,12 @@ AM_DEFAULT_VERBOSITY = 0
am__v_CC_0 = @echo " CC " $@;
am__v_CCLD_0 = @echo " CCLD " $@;
am__v_GEN_0 = @echo " GEN " $@;
-am__v_SILENT_0 = @
am__v_CC_ = ${am__v_CC_${AM_DEFAULT_VERBOSITY}}
am__v_CCLD_ = ${am__v_CCLD_${AM_DEFAULT_VERBOSITY}}
am__v_GEN_ = ${am__v_GEN_${AM_DEFAULT_VERBOSITY}}
-am__v_SILENT_ = ${am__v_SILENT_${AM_DEFAULT_VERBOSITY}}
AM_V_CC = ${am__v_CC_${V}}
AM_V_CCLD = ${am__v_CCLD_${V}}
AM_V_GEN = ${am__v_GEN_${V}}
-AM_V_silent = ${am__v_GEN_${V}}
include ${XA_TOPSRCDIR}/mconfig
-include ${XA_TOPSRCDIR}/mconfig.*
diff --git a/extensions/Makefile.am b/extensions/Makefile.am
index eebb82fd2f22..b99712dfcd38 100644
--- a/extensions/Makefile.am
+++ b/extensions/Makefile.am
@@ -12,13 +12,13 @@ _kcall = -C ${kbuilddir} M=${abs_srcdir}
modules:
@echo -n "Xtables-addons ${PACKAGE_VERSION} - Linux "
@if [ -n "${kbuilddir}" ]; then ${MAKE} ${_kcall} --no-print-directory -s kernelrelease; fi;
- ${AM_V_silent}if [ -n "${kbuilddir}" ]; then ${MAKE} ${_kcall} modules; fi;
+ ${AM_V_at}if [ -n "${kbuilddir}" ]; then ${MAKE} ${_kcall} modules; fi;
modules_install:
- ${AM_V_silent}if [ -n "${kbuilddir}" ]; then ${MAKE} ${_kcall} INSTALL_MOD_PATH=${DESTDIR} ext-mod-dir='$${INSTALL_MOD_DIR}' modules_install; fi;
+ ${AM_V_at}if [ -n "${kbuilddir}" ]; then ${MAKE} ${_kcall} INSTALL_MOD_PATH=${DESTDIR} ext-mod-dir='$${INSTALL_MOD_DIR}' modules_install; fi;
clean_modules:
- ${AM_V_silent}if [ -n "${kbuilddir}" ]; then ${MAKE} ${_kcall} clean; fi;
+ ${AM_V_at}if [ -n "${kbuilddir}" ]; then ${MAKE} ${_kcall} clean; fi;
all-local: modules
--
2.40.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH xtables-addons 3/5] build: update `AM_V_*` definitions to match autotools
2023-08-18 12:38 [PATCH xtables-addons 0/5] Autoools silent-rules fixes Jeremy Sowden
2023-08-18 12:38 ` [PATCH xtables-addons 1/5] build: use `$(top_srcdir)` when including Makefile.extra Jeremy Sowden
2023-08-18 12:38 ` [PATCH xtables-addons 2/5] build: replace `AM_V_silent` with `AM_V_at` Jeremy Sowden
@ 2023-08-18 12:38 ` Jeremy Sowden
2023-08-18 14:52 ` Jan Engelhardt
2023-08-18 12:38 ` [PATCH xtables-addons 4/5] build: don't hard-code `AM_DEFAULT_VERBOSITY` in Makefile.iptrules Jeremy Sowden
2023-08-18 12:38 ` [PATCH xtables-addons 5/5] build: define `AM_V_GEN` where it is needed Jeremy Sowden
4 siblings, 1 reply; 7+ messages in thread
From: Jeremy Sowden @ 2023-08-18 12:38 UTC (permalink / raw)
To: Netfilter Devel
Follow the automake documentation and use autoconf substitution variables.
Add a couple of extra trailing spaces to match the definitions generated by automake.
Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
---
Makefile.iptrules.in | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/Makefile.iptrules.in b/Makefile.iptrules.in
index f2f202ada360..28feeb477e35 100644
--- a/Makefile.iptrules.in
+++ b/Makefile.iptrules.in
@@ -18,15 +18,15 @@ libxtables_LIBS = @libxtables_LIBS@
AM_DEPFLAGS = -Wp,-MMD,$(@D)/.$(@F).d,-MT,$@
AM_DEFAULT_VERBOSITY = 0
-am__v_CC_0 = @echo " CC " $@;
-am__v_CCLD_0 = @echo " CCLD " $@;
-am__v_GEN_0 = @echo " GEN " $@;
-am__v_CC_ = ${am__v_CC_${AM_DEFAULT_VERBOSITY}}
-am__v_CCLD_ = ${am__v_CCLD_${AM_DEFAULT_VERBOSITY}}
-am__v_GEN_ = ${am__v_GEN_${AM_DEFAULT_VERBOSITY}}
-AM_V_CC = ${am__v_CC_${V}}
-AM_V_CCLD = ${am__v_CCLD_${V}}
-AM_V_GEN = ${am__v_GEN_${V}}
+am__v_CC_0 = @echo " CC " $@;
+am__v_CCLD_0 = @echo " CCLD " $@;
+am__v_GEN_0 = @echo " GEN " $@;
+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_CC = ${am__v_CC_@AM_V@}
+AM_V_CCLD = ${am__v_CCLD_@AM_V@}
+AM_V_GEN = ${am__v_GEN_@AM_V@}
include ${XA_TOPSRCDIR}/mconfig
-include ${XA_TOPSRCDIR}/mconfig.*
--
2.40.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH xtables-addons 4/5] build: don't hard-code `AM_DEFAULT_VERBOSITY` in Makefile.iptrules
2023-08-18 12:38 [PATCH xtables-addons 0/5] Autoools silent-rules fixes Jeremy Sowden
` (2 preceding siblings ...)
2023-08-18 12:38 ` [PATCH xtables-addons 3/5] build: update `AM_V_*` definitions to match autotools Jeremy Sowden
@ 2023-08-18 12:38 ` Jeremy Sowden
2023-08-18 12:38 ` [PATCH xtables-addons 5/5] build: define `AM_V_GEN` where it is needed Jeremy Sowden
4 siblings, 0 replies; 7+ messages in thread
From: Jeremy Sowden @ 2023-08-18 12:38 UTC (permalink / raw)
To: Netfilter Devel
Currently it is set to zero, which means that the default in
Makefile.iptrules is not consistent with that in the other Makefiles,
and passing `--disable-silent-rules` to configure cannot be used to
change it.
Set it to `@AM_DEFAULT_VERBOSITY@` instead, which will be expanded to the
appropriate default value.
Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
---
Makefile.iptrules.in | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Makefile.iptrules.in b/Makefile.iptrules.in
index 28feeb477e35..b0588d45f026 100644
--- a/Makefile.iptrules.in
+++ b/Makefile.iptrules.in
@@ -15,9 +15,9 @@ LDFLAGS = @LDFLAGS@
libxtables_CFLAGS = @libxtables_CFLAGS@
libxtables_LIBS = @libxtables_LIBS@
-AM_DEPFLAGS = -Wp,-MMD,$(@D)/.$(@F).d,-MT,$@
+AM_DEPFLAGS = -Wp,-MMD,$(@D)/.$(@F).d,-MT,$@
-AM_DEFAULT_VERBOSITY = 0
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
am__v_CC_0 = @echo " CC " $@;
am__v_CCLD_0 = @echo " CCLD " $@;
am__v_GEN_0 = @echo " GEN " $@;
--
2.40.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH xtables-addons 5/5] build: define `AM_V_GEN` where it is needed
2023-08-18 12:38 [PATCH xtables-addons 0/5] Autoools silent-rules fixes Jeremy Sowden
` (3 preceding siblings ...)
2023-08-18 12:38 ` [PATCH xtables-addons 4/5] build: don't hard-code `AM_DEFAULT_VERBOSITY` in Makefile.iptrules Jeremy Sowden
@ 2023-08-18 12:38 ` Jeremy Sowden
4 siblings, 0 replies; 7+ messages in thread
From: Jeremy Sowden @ 2023-08-18 12:38 UTC (permalink / raw)
To: Netfilter Devel
`AM_V_GEN` is used when generating the man-pages. Defining it in
Makefile.iptrules is of no use. Move the definition to the appropriate
Makefile.
Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
---
Makefile.iptrules.in | 3 ---
Makefile.mans.in | 5 +++++
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/Makefile.iptrules.in b/Makefile.iptrules.in
index b0588d45f026..7e5816451736 100644
--- a/Makefile.iptrules.in
+++ b/Makefile.iptrules.in
@@ -20,13 +20,10 @@ AM_DEPFLAGS = -Wp,-MMD,$(@D)/.$(@F).d,-MT,$@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
am__v_CC_0 = @echo " CC " $@;
am__v_CCLD_0 = @echo " CCLD " $@;
-am__v_GEN_0 = @echo " GEN " $@;
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_CC = ${am__v_CC_@AM_V@}
AM_V_CCLD = ${am__v_CCLD_@AM_V@}
-AM_V_GEN = ${am__v_GEN_@AM_V@}
include ${XA_TOPSRCDIR}/mconfig
-include ${XA_TOPSRCDIR}/mconfig.*
diff --git a/Makefile.mans.in b/Makefile.mans.in
index 63424f7d558a..60459cb98c83 100644
--- a/Makefile.mans.in
+++ b/Makefile.mans.in
@@ -8,6 +8,11 @@ wcman_targets := $(shell find "${srcdir}/extensions" -name 'libxt_[A-Z]*.man' -p
wlist_matches := $(patsubst ${srcdir}/libxt_%.man,%,${wcman_matches})
wlist_targets := $(patsubst ${srcdir}/libxt_%.man,%,${wcman_targets})
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_ = ${am__v_GEN_@AM_DEFAULT_V@}
+AM_V_GEN = ${am__v_GEN_@AM_V@}
+
.PHONY: FORCE
FORCE:
--
2.40.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH xtables-addons 3/5] build: update `AM_V_*` definitions to match autotools
2023-08-18 12:38 ` [PATCH xtables-addons 3/5] build: update `AM_V_*` definitions to match autotools Jeremy Sowden
@ 2023-08-18 14:52 ` Jan Engelhardt
0 siblings, 0 replies; 7+ messages in thread
From: Jan Engelhardt @ 2023-08-18 14:52 UTC (permalink / raw)
To: Jeremy Sowden; +Cc: Netfilter Devel
On Friday 2023-08-18 14:38, Jeremy Sowden wrote:
>Follow the automake documentation and use autoconf substitution variables.
>
>Add a couple of extra trailing spaces to match the definitions generated by automake.
Ha! xt-a had a 6-wide label because that's what automake did at the time.
Seems that changed in automake.git#94121099cfe42ca944eaff6805a5404ee0234060 .
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2023-08-18 14:54 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-18 12:38 [PATCH xtables-addons 0/5] Autoools silent-rules fixes Jeremy Sowden
2023-08-18 12:38 ` [PATCH xtables-addons 1/5] build: use `$(top_srcdir)` when including Makefile.extra Jeremy Sowden
2023-08-18 12:38 ` [PATCH xtables-addons 2/5] build: replace `AM_V_silent` with `AM_V_at` Jeremy Sowden
2023-08-18 12:38 ` [PATCH xtables-addons 3/5] build: update `AM_V_*` definitions to match autotools Jeremy Sowden
2023-08-18 14:52 ` Jan Engelhardt
2023-08-18 12:38 ` [PATCH xtables-addons 4/5] build: don't hard-code `AM_DEFAULT_VERBOSITY` in Makefile.iptrules Jeremy Sowden
2023-08-18 12:38 ` [PATCH xtables-addons 5/5] build: define `AM_V_GEN` where it is needed Jeremy Sowden
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).