From e36f34dc20324b777b55031bfb55a3682a72a4b1 Mon Sep 17 00:00:00 2001 From: Daniel Wagner Date: Mon, 19 May 2025 12:17:38 +0200 Subject: [PATCH 1/3] 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 eb4283d283..ac4cd0fa68 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 c0e460161ba441107f276212d8920cf911adeb4a Mon Sep 17 00:00:00 2001 From: Daniel Wagner Date: Mon, 19 May 2025 13:45:04 +0200 Subject: [PATCH 2/3] build: always use meson commands Always use the meson commands to configure or build the project. Signed-off-by: Daniel Wagner --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index ac4cd0fa68..58dce7be4c 100644 --- a/Makefile +++ b/Makefile @@ -55,7 +55,7 @@ test-strict: ${NAME} .PHONY: rpm rpm: - meson ${BUILD-DIR} \ + meson setup ${BUILD-DIR} \ -Dudevrulesdir=$(shell rpm --eval '%{_udevrulesdir}') \ -Dsystemddir=$(shell rpm --eval '%{_unitdir}') \ -Ddocs=man -Ddocs-build=true @@ -63,8 +63,8 @@ rpm: .PHONY: debug debug: - meson ${BUILD-DIR} --buildtype=debug - ninja -C ${BUILD-DIR} + meson setup ${BUILD-DIR} --buildtype=debug + meson compile -C ${BUILD-DIR} .PHONY: static static: From c7fc8dad2ca391d10cef0706171559fb372bd039 Mon Sep 17 00:00:00 2001 From: Daniel Wagner Date: Mon, 19 May 2025 13:46:11 +0200 Subject: [PATCH 3/3] build: fix the static build The static build fails due several missconfiguraitons. Update the build target. Signed-off-by: Daniel Wagner --- Makefile | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 58dce7be4c..b52143b773 100644 --- a/Makefile +++ b/Makefile @@ -68,8 +68,12 @@ debug: .PHONY: static static: - meson ${BUILD-DIR} --buildtype=release \ - --default-library=static -Dc_link_args="-static" \ + meson setup ${BUILD-DIR} --buildtype=release \ --wrap-mode=forcefallback \ - -Dlibnvme:tests=false -Dlibnvme:keyutils=disabled - ninja -C ${BUILD-DIR} + --default-library=static \ + -Dc_link_args="-static" \ + -Dlibnvme:keyutils=disabled \ + -Dlibnvme:liburing=disabled \ + -Dlibnvme:python=disabled \ + -Dlibnvme:openssl=disabled + meson compile -C ${BUILD-DIR}