From b267ee8560039f25aa6b1f2f1561d9c6b2418d60 Mon Sep 17 00:00:00 2001 From: Daniel Wagner Date: Mon, 19 May 2025 12:38:59 +0200 Subject: [PATCH 1/2] build: make 'clean' target an alias for 'purge' Autotools and many handwritten Makefiles only provide a 'clean' target, which typically removes everything. However, the 'clean' target here does not fully do this, leaving some artifacts behind after it is run. This leads to confusion when, after cleaning, the build step still doesn't reflect configuration changes such as newly installed libraries. Therefore, update the 'clean' target to behave like the 'purge' step. Signed-off-by: Daniel Wagner --- Makefile | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index a7c3268d4..4d9d6255f 100644 --- a/Makefile +++ b/Makefile @@ -24,17 +24,14 @@ ${NAME}: ${BUILD-DIR} .PHONY: clean clean: -ifneq ("$(wildcard ${BUILD-DIR})","") - meson compile --clean -C ${BUILD-DIR} -endif - -.PHONY: purge -purge: ifneq ("$(wildcard ${BUILD-DIR})","") rm -rf ${BUILD-DIR} meson subprojects purge --confirm endif +.PHONY: purge +purge: clean + .PHONY: install install: ${NAME} meson install -C ${BUILD-DIR} --skip-subprojects From c0acb39aed957e4a120dbfa32188b7e14bae8c8f Mon Sep 17 00:00:00 2001 From: Daniel Wagner Date: Mon, 19 May 2025 13:16:34 +0200 Subject: [PATCH 2/2] build: disable netdb test for static builds The linker test doesn't include the default library configuration thus it will not fail for a static build. Add an explicit static build test. Signed-off-by: Daniel Wagner --- meson.build | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 1ba07f1ad..4eeb2c0d2 100644 --- a/meson.build +++ b/meson.build @@ -216,9 +216,10 @@ conf.set10( description: 'Is linux/mctp.h include-able?' ) -conf.set( - 'HAVE_NETDB', - cc.links( +is_static = get_option('default_library') == 'static' +have_netdb = false +if not is_static + have_netdb = cc.links( '''#include #include #include @@ -228,9 +229,15 @@ conf.set( } ''', name: 'netdb', - ), + ) +endif + +conf.set( + 'HAVE_NETDB', + have_netdb, description: 'Is network address and service translation available' ) + dl_dep = dependency('dl', required: false) conf.set( 'HAVE_LIBC_DLSYM',