Skip to contentSkip to conversation

A couple of build fixes

PATCH In review Jeremy Sowden 2 participants 5 messages Mar 9, 2025 – Mar 10, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover A couple of build fixes

The first of these fixes the building of libxt_ACCOUNT.so and libxt_pknock.so. I sent this once before, at the beginning of December, but it did not elicit a response.

The second updates Makefile.iptrules.in to clean up some cpp dependency files.

Jeremy Sowden (2):
build: fix inclusion of Makefile.extra
build: clean .*.oo.d cpp dependency files

 Makefile.iptrules.in           | 2 +-
 extensions/ACCOUNT/Makefile.am | 2 +-
 extensions/Makefile.am         | 2 +-
 extensions/pknock/Makefile.am  | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)
Signature · 1 line
2.47.2
#1 lore raw

PATCH 1/2 build: fix inclusion of Makefile.extra

Commit 08a16d90ceae ("build: use $(top_srcdir) when including Makefile.extra") replaces hard-coded relative paths used to include Makefile.extra with variables. However, despite the commit message, the variables are enclosed with braces, not parentheses, and it transpires that automake does not support the use of braces in this context. As a result, Makefile.extra is not included, and the libxt_ACCOUNT.so and libxt_pknock.so extensions are not built.

Use parentheses instead.

Fixes 08a16d90ceae ("build: use `$(top_srcdir)` when including Makefile.extra")
---
 extensions/ACCOUNT/Makefile.am | 2 +-
 extensions/Makefile.am         | 2 +-
 extensions/pknock/Makefile.am  | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
extensions/ACCOUNT/Makefile.am +1 -1
index 2514386f00b8..473a739f981a 100644
@@ -3,7 +3,7 @@
 AM_CPPFLAGS = ${regular_CPPFLAGS} -I${abs_top_srcdir}/extensions
 AM_CFLAGS   = ${regular_CFLAGS} ${libxtables_CFLAGS}
 
-include ${top_srcdir}/Makefile.extra
+include $(top_srcdir)/Makefile.extra
 
 sbin_PROGRAMS = iptaccount
 iptaccount_LDADD = libxt_ACCOUNT_cl.la
extensions/Makefile.am +1 -1
index 8f0aeb5666da..b99712dfcd38 100644
@@ -26,4 +26,4 @@ install-exec-local: modules_install
 
 clean-local: clean_modules
 
-include ${top_srcdir}/Makefile.extra
+include $(top_srcdir)/Makefile.extra
extensions/pknock/Makefile.am +1 -1
index 1ca5f91025b7..5fcae4794230 100644
@@ -3,7 +3,7 @@
 AM_CPPFLAGS = ${regular_CPPFLAGS} -I${abs_top_srcdir}/extensions
 AM_CFLAGS   = ${regular_CFLAGS} ${libxtables_CFLAGS}
 
-include ${top_srcdir}/Makefile.extra
+include $(top_srcdir)/Makefile.extra
 
 sbin_PROGRAMS = pknlusr
 dist_man_MANS = pknlusr.8
Signature · 1 line
2.47.2
#2 lore raw

PATCH 2/2 build: clean `.*.oo.d` cpp dependency files

In reply to Jeremy Sowden

The %.oo recipe in Makefile.iptrules.in creates corresponding .%.oo.d dependency files which are not cleaned up. Add them to the files that are removed by the clean target.

---
 Makefile.iptrules.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Makefile.iptrules.in +1 -1
index 7e5816451736..016f0bec5f7c 100644
@@ -47,7 +47,7 @@ install: ${targets}
 
 clean:
 	@for i in ${subdirs_list}; do ${MAKE} -C $$i $@ || exit $$?; done;
-	rm -f *.oo *.so;
+	rm -f *.oo .*.oo.d *.so;
 
 lib%.so: lib%.oo
 	${AM_V_CCLD}${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ $< ${libxtables_LIBS} ${LDLIBS};
Signature · 1 line
2.47.2
#3 lore raw
In reply to Jeremy Sowden
Quoted 2 lines · Jeremy Sowden

The first of these fixes the building of libxt_ACCOUNT.so and libxt_pknock.so. I sent this once before, at the beginning of December

Indeed you did, and I wanted to investigate why automake would not accept {} in that spot, but I guess I got distracted.

Applied now.

#4 lore raw
Quoted 9 lines · Jan Engelhardt
Quoted 3 lines · Jeremy Sowden

The first of these fixes the building of libxt_ACCOUNT.so and libxt_pknock.so. I sent this once before, at the beginning of December

Indeed you did, and I wanted to investigate why automake would not accept {} in that spot, but I guess I got distracted.

Applied now.

Thanks!

J.