1
0
mirror of https://github.com/djcb/mu.git synced 2024-06-26 07:29:17 +02:00

build: support MU_HACKER for debug builds

When env var MU_HACKER is set, do a debug build.
This commit is contained in:
Dirk-Jan C. Binnema 2022-12-12 23:51:31 +02:00
parent bdb494135d
commit 8e15f9571a

View File

@ -26,6 +26,11 @@ ifneq ($(V),0)
VERBOSE=--verbose VERBOSE=--verbose
endif endif
# when MU_HACKER is set, do a debug build
ifneq (${MU_HACKER},)
MESON_FLAGS:=$(MESON_FLAGS) '-Dbuildtype=debug'
endif
.PHONY: all .PHONY: all
.PHONY: check test test-verbose-if-fail test-valgrind test-helgrind .PHONY: check test test-verbose-if-fail test-valgrind test-helgrind
@ -39,15 +44,15 @@ endif
# 1. build with clang, and the thread-sanitizer # 1. build with clang, and the thread-sanitizer
# make clean all MESON_FLAGS="-Db_sanitize=thread" CXX=clang++ CC=clang # make clean all MESON_FLAGS="-Db_sanitize=thread" CXX=clang++ CC=clang
all: $(BUILDDIR) all: $(BUILDDIR)
$(NINJA) -C $(BUILDDIR) $(VERBOSE) @$(NINJA) -C $(BUILDDIR) $(VERBOSE)
$(BUILDDIR): $(BUILDDIR):
$(MESON) $(MESON_FLAGS) $(BUILDDIR) @$(MESON) $(MESON_FLAGS) $(BUILDDIR)
check: test check: test
test: all test: all
$(MESON) test $(VERBOSE) -C $(BUILDDIR) @$(MESON) test $(VERBOSE) -C $(BUILDDIR)
install: $(BUILDDIR) install: $(BUILDDIR)