$(RM) *.gc?? */*.gc?? test/*/*.gc??
$(RM) lcov.info lcov
+@if ENABLE_COVERAGE
# coverage testing
coverage: all test
$(RM) lcov
lcov -t "test" -o lcov.info -c -d address -d config -d email -d mutt
-genhtml -o lcov lcov.info -f
lcov -l lcov.info
+@endif
##############################################################################
# include generated dependency files
include po/Makefile
include contrib/Makefile
include doc/Makefile
+@if ENABLE_UNIT_TESTS
include test/Makefile
+@endif
# vim: set ts=8 noexpandtab:
define BUGS_ADDRESS "neomutt-devel@neomutt.org"
# Subdirectories that contain additional Makefile.autosetup files
-set subdirs {po doc contrib test}
+set subdirs {po doc contrib}
###############################################################################
###############################################################################
with-tokyocabinet:path => "Location of TokyoCabinet"
# System
with-sysroot:path => "Target system root"
-# Coverage testing
- lcov=0 => "Enable Coverage Testing"
+# Testing
+ testing=0 => "Enable Unit Testing"
+ coverage=0 => "Enable Coverage Testing"
# Enable all options
everything=0 => "Enable all options"
}
if {1} {
# Keep sorted, please.
foreach opt {
- bdb doc everything fmemopen full-doc gdbm gnutls gpgme gss
- homespool idn idn2 inotify kyotocabinet lcov lmdb locales-fix lua mixmaster nls
- notmuch pgp qdbm sasl smime ssl tokyocabinet
+ bdb coverage doc everything fmemopen full-doc gdbm gnutls gpgme gss
+ homespool idn idn2 inotify kyotocabinet lmdb locales-fix lua mixmaster nls
+ notmuch pgp qdbm sasl smime ssl testing tokyocabinet
} {
define want-$opt [opt-bool $opt]
}
###############################################################################
# Coverage Testing
-if {[get-define want-lcov]} {
+if {[get-define want-coverage]} {
+ define ENABLE_COVERAGE
define-append CFLAGS -fprofile-arcs -ftest-coverage
define-append LDFLAGS -fprofile-arcs -ftest-coverage
}
+###############################################################################
+# Unit Testing
+if {[get-define want-testing]} {
+ define ENABLE_UNIT_TESTS
+ lappend subdirs test
+}
+
###############################################################################
# Lua
if {[get-define want-lua]} {