mirror of https://github.com/djcb/mu.git
build: update Makefile.meson with some useful targets
For testing.
This commit is contained in:
parent
fe2b1693c1
commit
d2e6cfdf70
|
@ -1,4 +1,4 @@
|
||||||
## Copyright (C) 2008-2021 Dirk-Jan C. Binnema <djcb@djcbsoftware.nl>
|
## Copyright (C) 2008-2022 Dirk-Jan C. Binnema <djcb@djcbsoftware.nl>
|
||||||
##
|
##
|
||||||
## This program is free software; you can redistribute it and/or modify
|
## This program is free software; you can redistribute it and/or modify
|
||||||
## it under the terms of the GNU General Public License as published by
|
## it under the terms of the GNU General Public License as published by
|
||||||
|
@ -20,11 +20,18 @@ NINJA ?= ninja
|
||||||
BUILDDIR ?= $(CURDIR)/build
|
BUILDDIR ?= $(CURDIR)/build
|
||||||
MESON ?= meson
|
MESON ?= meson
|
||||||
|
|
||||||
|
|
||||||
|
# MESON_FLAGS, e.g. "-Dreadline=enabled"
|
||||||
|
|
||||||
|
# examples:
|
||||||
|
# 1. build with clang, and the thread-sanitizer
|
||||||
|
# make clean all MESON_FLAGS="-Db_sanitize=thread" CXX=clang++ CC=clang
|
||||||
|
|
||||||
all: $(BUILDDIR)
|
all: $(BUILDDIR)
|
||||||
$(NINJA) -C $(BUILDDIR)
|
$(NINJA) -C $(BUILDDIR)
|
||||||
|
|
||||||
$(BUILDDIR):
|
$(BUILDDIR):
|
||||||
$(MESON) $(BUILDDIR)
|
$(MESON) $(MESON_FLAGS) $(BUILDDIR)
|
||||||
|
|
||||||
check: test
|
check: test
|
||||||
|
|
||||||
|
@ -34,6 +41,10 @@ test: $(BUILDDIR)
|
||||||
test-valgrind: $(BUILDDIR)
|
test-valgrind: $(BUILDDIR)
|
||||||
@cd $(BUILDDIR); $(MESON) test --wrap='valgrind --leak-check=full --error-exitcode=1'
|
@cd $(BUILDDIR); $(MESON) test --wrap='valgrind --leak-check=full --error-exitcode=1'
|
||||||
|
|
||||||
|
test-helgrind: $(BUILDDIR)
|
||||||
|
@cd $(BUILDDIR); $(MESON) test --wrap='valgrind --tool=helgrind --error-exitcode=1'
|
||||||
|
|
||||||
|
|
||||||
dist: $(BUILDDIR)
|
dist: $(BUILDDIR)
|
||||||
@cd $(BUILDDIR); $(MESON) dist
|
@cd $(BUILDDIR); $(MESON) dist
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue