mirror of https://github.com/djcb/mu.git
build: support MU_HACKER for debug builds
When env var MU_HACKER is set, do a debug build.
This commit is contained in:
parent
bdb494135d
commit
8e15f9571a
17
Makefile
17
Makefile
|
@ -26,6 +26,11 @@ ifneq ($(V),0)
|
|||
VERBOSE=--verbose
|
||||
endif
|
||||
|
||||
# when MU_HACKER is set, do a debug build
|
||||
ifneq (${MU_HACKER},)
|
||||
MESON_FLAGS:=$(MESON_FLAGS) '-Dbuildtype=debug'
|
||||
endif
|
||||
|
||||
|
||||
.PHONY: all
|
||||
.PHONY: check test test-verbose-if-fail test-valgrind test-helgrind
|
||||
|
@ -39,15 +44,15 @@ endif
|
|||
# 1. build with clang, and the thread-sanitizer
|
||||
# make clean all MESON_FLAGS="-Db_sanitize=thread" CXX=clang++ CC=clang
|
||||
all: $(BUILDDIR)
|
||||
$(NINJA) -C $(BUILDDIR) $(VERBOSE)
|
||||
@$(NINJA) -C $(BUILDDIR) $(VERBOSE)
|
||||
|
||||
$(BUILDDIR):
|
||||
$(MESON) $(MESON_FLAGS) $(BUILDDIR)
|
||||
@$(MESON) $(MESON_FLAGS) $(BUILDDIR)
|
||||
|
||||
check: test
|
||||
|
||||
test: all
|
||||
$(MESON) test $(VERBOSE) -C $(BUILDDIR)
|
||||
@$(MESON) test $(VERBOSE) -C $(BUILDDIR)
|
||||
|
||||
|
||||
install: $(BUILDDIR)
|
||||
|
@ -73,9 +78,9 @@ test-valgrind: $(BUILDDIR)
|
|||
# we do _not_ pass helgrind; but this seems to be a false-alarm
|
||||
# https://gitlab.gnome.org/GNOME/glib/-/issues/2662
|
||||
# test-helgrind: $(BUILDDIR)
|
||||
# @cd $(BUILDDIR); TEST=HELGRIND $(MESON) test \
|
||||
# --wrap='valgrind --tool=helgrind --error-exitcode=1' \
|
||||
# --timeout-multiplier 100
|
||||
# @cd $(BUILDDIR); TEST=HELGRIND $(MESON) test \
|
||||
# --wrap='valgrind --tool=helgrind --error-exitcode=1' \
|
||||
# --timeout-multiplier 100
|
||||
|
||||
benchmark: $(BUILDDIR)
|
||||
$(NINJA) -C $(BUILDDIR) benchmark
|
||||
|
|
Loading…
Reference in New Issue