From 95182f156e32c25afd8d74e402745770940f13b0 Mon Sep 17 00:00:00 2001 From: Robin Jarry Date: Thu, 5 Dec 2024 14:40:10 +0100 Subject: [PATCH] mk: add short target to build with debug options Add a debug target that will force BUILDTYPE=debug and SANITIZE=address. Signed-off-by: Robin Jarry --- GNUmakefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/GNUmakefile b/GNUmakefile index 3b2fb5e6..ee0debb2 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -16,6 +16,11 @@ endif all: $(BUILDDIR)/build.ninja $Q ninja -C $(BUILDDIR) $(ninja_opts) +.PHONY: debug +debug: BUILDTYPE = debug +debug: SANITIZE = address +debug: all + .PHONY: unit-tests unit-tests: $(BUILDDIR)/build.ninja $Q ninja -C $(BUILDDIR) test $(ninja_opts) @@ -39,7 +44,7 @@ clean: install: $(BUILDDIR)/build.ninja $Q meson install -C $(BUILDDIR) --skip-subprojects -meson_opts := --buildtype=$(BUILDTYPE) --werror --warnlevel=2 -Db_sanitize=$(SANITIZE) +meson_opts = --buildtype=$(BUILDTYPE) --werror --warnlevel=2 -Db_sanitize=$(SANITIZE) meson_opts += $(MESON_EXTRA_OPTS) $(BUILDDIR)/build.ninja: