diff --git a/Makefile.meson b/Makefile.meson index 7e069b88..326c051e 100644 --- a/Makefile.meson +++ b/Makefile.meson @@ -1,4 +1,4 @@ -## Copyright (C) 2008-2021 Dirk-Jan C. Binnema +## Copyright (C) 2008-2022 Dirk-Jan C. Binnema ## ## 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 @@ -20,11 +20,18 @@ NINJA ?= ninja BUILDDIR ?= $(CURDIR)/build 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) $(NINJA) -C $(BUILDDIR) $(BUILDDIR): - $(MESON) $(BUILDDIR) + $(MESON) $(MESON_FLAGS) $(BUILDDIR) check: test @@ -34,6 +41,10 @@ test: $(BUILDDIR) test-valgrind: $(BUILDDIR) @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) @cd $(BUILDDIR); $(MESON) dist