mu/Makefile.meson

67 lines
1.9 KiB
Makefile
Raw Normal View History

## Copyright (C) 2008-2022 Dirk-Jan C. Binnema <djcb@djcbsoftware.nl>
##
## 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
## the Free Software Foundation; either version 3 of the License, or
## (at your option) any later version.
##
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with this program; if not, write to the Free Software Foundation,
## Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
# Makefile with some useful targets for meson/ninja
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) $(MESON_FLAGS) $(BUILDDIR)
check: test
2022-02-19 23:38:13 +01:00
test: all
$(MESON) test -C $(BUILDDIR)
test-verbose: all
$(MESON) test --verbose -C $(BUILDDIR)
2022-02-26 09:08:48 +01:00
test-verbose-if-fail: all
@cd $(BUILDDIR); $(MESON) test || $(MESON) test --verbose
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
install: $(BUILDDIR)
@cd $(BUILDDIR); $(MESON) install
clean:
@test -d $(BUILDDIR) && $(NINJA) -C $(BUILDDIR) clean
HTMLPATH=${BUILDDIR}/mu4e/mu4e
mu4e-doc-html:
@mkdir -p ${HTMLPATH} && cp mu4e/texinfo-klare.css ${HTMLPATH}
@makeinfo --html --css-ref=texinfo-klare.css -o ${HTMLPATH} mu4e/mu4e.texi