From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 6668C6DE0F86 for ; Sat, 11 Jan 2020 08:41:00 -0800 (PST) Authentication-Results: arlo.cworth.org; dkim=pass (2048-bit key; unprotected) header.d=nikula-org.20150623.gappssmtp.com header.i=@nikula-org.20150623.gappssmtp.com header.b="gn9fi6Wx"; dkim-atps=neutral X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.285 X-Spam-Level: X-Spam-Status: No, score=-0.285 tagged_above=-999 required=5 tests=[AWL=-0.285, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8oxQFRM6DgJz for ; Sat, 11 Jan 2020 08:40:58 -0800 (PST) Received: from mail-lj1-f181.google.com (mail-lj1-f181.google.com [209.85.208.181]) by arlo.cworth.org (Postfix) with ESMTPS id B4EB56DE0F72 for ; Sat, 11 Jan 2020 08:40:57 -0800 (PST) Received: by mail-lj1-f181.google.com with SMTP id r19so5378481ljg.3 for ; Sat, 11 Jan 2020 08:40:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nikula-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=keKzuzRqCsCMFeOJll6UqVRcdfvXnEELP9z10H5BsJQ=; b=gn9fi6WxnYfwOJDx58P5Spp4gn3H9Ltw13/WRimrLKxw2zRrxNVfYpvch0siLNKZ5Q 3j0UDvUVV/0/mpXXWRoPdytgkP21t05mO/GsfFTWJHLUnSuDDkBAOInt7i2S+TaD8Oo8 DxYp08mHD+sFk/EO7PyyCFQ7QGDKADRvc0vVn8CYQVZ7jvGoAcDjdmH/RSBujytgmvgN XXYzBshMA5/5zoI7tFSdZ9VF2h6YBnsys21/97UcH7gelWoHXeoa+slDgJzg03floxFc dwhJATC+X7YxEG1RHcaz+72wz8ZNGODOX57zoZM4pNbWMILZ8w8XV4nowedFCeiqKMH8 DEUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=keKzuzRqCsCMFeOJll6UqVRcdfvXnEELP9z10H5BsJQ=; b=iHJ637eeRp3ho3qzLVbwxyQEqIKdhMfW325WdE8KP1TfODk0xF/9gj1ofkhstg85Qa OT0pqgcqyWhRo12le3dzOruJ85rbE4nEjQIW9YnID0TlT9hHsk6jkXrBe4OPmXfZTQFO hC1yTGzEmN4QXJtZYAyhGv5KYNHVo2JvrW0PMw/Tj0y5/dKUs37ES5RtRvXuwIiOPPGV mboIn00QAhB7csuHb2L/3Hl4VupRY66whSCMp8iQaTyLBKmfIWPhpmriZuuFT0hQBz5f XNZ3kbHFK+7BQE4/Q3cNl76kU6hXqhdBM1P9Cft237sdtDfG0dCDKbuu/B/FHyadjQNb QTKA== X-Gm-Message-State: APjAAAWZSogl2xL5XFKJRX/N+JyyWFwfZwW4BUQy23K8O443yIS2PKNI ZsaXyrsuwxq0JD6h29upQDkaJKxLCjH9Og== X-Google-Smtp-Source: APXvYqxijjWUO+o17l9KZo4g2ZjFrvYyC3O3v8+BJsgnDF1S7B8i5ada8WYQPR3I0kkyESQdtYnT4w== X-Received: by 2002:a2e:7518:: with SMTP id q24mr6184421ljc.119.1578760854873; Sat, 11 Jan 2020 08:40:54 -0800 (PST) Received: from localhost (176-93-198-40.bb.dnainternet.fi. [176.93.198.40]) by smtp.gmail.com with ESMTPSA id o10sm3000312lfn.20.2020.01.11.08.40.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 Jan 2020 08:40:53 -0800 (PST) From: Jani Nikula To: notmuch@notmuchmail.org Subject: [RFC PATCH] build: add meson build system Date: Sat, 11 Jan 2020 18:40:49 +0200 Message-Id: <20200111164049.8237-1-jani@nikula.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jan 2020 16:41:00 -0000 Add initial support for configuring and building notmuch using the Meson Build System [1]. The "home-brew" configure script in notmuch has grown rather complicated, although the goal was originally to avoid the complexity of using autotools. Since then, meson has emerged as a viable option for replacing autotools and make. The benefits compared to the current configure are most evident in the feature tests. Many things that require tens of lines of shell and/or C feature test code are simple one-liners in meson. Some self-explanatory examples: - dep_gmime = dependency('gmime-3.0', version: '>=3.0.3') - cmd_python = find_program('python3', 'python', 'python2') - have_d_type = cc.has_member('struct dirent', 'd_type', prefix: '#include ') Additionally, meson provides basic install targets automatically, as well as a test runner with built-in parallelization. This is a draft patch adding basic configure, build and test support for the binaries. Everything else is left out for now. It would be a considerable amount of work to convert everything, and I don't expect it to be possible in one go anyway. If there's interest in adding meson support, it would have to happen gradually, side-by-side with the current system, with a reasonably long transition period. But there's no point in going beyond the patch at hand if folks decide the focus should remain on the current system. [1] https://mesonbuild.com/ --- compat/config.h.in | 11 +++ compat/meson.build | 169 ++++++++++++++++++++++++++++++++++ lib/meson.build | 36 ++++++++ meson.build | 77 ++++++++++++++++ parse-time-string/meson.build | 4 + sh.config.in | 31 +++++++ test/meson.build | 133 ++++++++++++++++++++++++++ util/meson.build | 19 ++++ 8 files changed, 480 insertions(+) create mode 100644 compat/config.h.in create mode 100644 compat/meson.build create mode 100644 lib/meson.build create mode 100644 meson.build create mode 100644 parse-time-string/meson.build create mode 100644 sh.config.in create mode 100644 test/meson.build create mode 100644 util/meson.build diff --git a/compat/config.h.in b/compat/config.h.in new file mode 100644 index 000000000000..22269a84c8a4 --- /dev/null +++ b/compat/config.h.in @@ -0,0 +1,11 @@ +#define HAVE_CANONICALIZE_FILE_NAME @HAVE_CANONICALIZE_FILE_NAME@ +#define HAVE_D_TYPE @HAVE_D_TYPE@ +#define HAVE_GETLINE @HAVE_GETLINE@ +#define HAVE_STRCASESTR @HAVE_STRCASESTR@ +#define HAVE_STRSEP @HAVE_STRSEP@ +#define HAVE_TIMEGM @HAVE_TIMEGM@ +#define HAVE_XAPIAN_COMPACT @HAVE_XAPIAN_COMPACT@ +#define HAVE_XAPIAN_DB_RETRY_LOCK @HAVE_XAPIAN_DB_RETRY_LOCK@ +#define HAVE_XAPIAN_FIELD_PROCESSOR @HAVE_XAPIAN_FIELD_PROCESSOR@ +#define STD_ASCTIME @STD_ASCTIME@ +#define STD_GETPWUID @STD_GETPWUID@ diff --git a/compat/meson.build b/compat/meson.build new file mode 100644 index 000000000000..ed79bd2ec83c --- /dev/null +++ b/compat/meson.build @@ -0,0 +1,169 @@ +notmuch_compat_srcs = [ +] + +config = configuration_data() + +config.set_quoted('NOTMUCH_SRCDIR', meson.source_root()) + +# FIXME: this differs from the legacy build +config.set('PLATFORM', build_machine.system()) + +cc = meson.get_compiler('c') +cxx = meson.get_compiler('cpp') + +have_canonicalize_file_name = cc.has_function('canonicalize_file_name', + prefix: '#include ', + args: '-D_GNU_SOURCE') +config.set10('HAVE_CANONICALIZE_FILE_NAME', have_canonicalize_file_name) +if not have_canonicalize_file_name + notmuch_compat_srcs += 'canonicalize_file_name.c' +endif + +have_getline = cc.has_function('getline', prefix: '''#include +#include +''') +config.set10('HAVE_GETLINE', have_getline) +if not have_getline + notmuch_compat_srcs += [ 'getline.c', 'getdelim.c' ] +endif + +have_strcasestr = cc.has_function('strcasestr', prefix: '#include ', + args: '-D_GNU_SOURCE') +config.set10('HAVE_STRCASESTR', have_strcasestr) +if not have_strcasestr + notmuch_compat_srcs += 'strcasestr.c' +endif + +have_strsep = cc.has_function('strsep', prefix: '#include ') +config.set10('HAVE_STRSEP', have_strsep) +if not have_strsep + notmuch_compat_srcs += 'strsep.c' +endif + +have_timegm = cc.has_function('timegm', prefix: '#include ') +config.set10('HAVE_TIMEGM', have_timegm) +if not have_timegm + notmuch_compat_srcs += 'timegm.c' +endif + +have_d_type = cc.has_member('struct dirent', 'd_type', + prefix: '#include ') +config.set10('HAVE_D_TYPE', have_d_type) + +getpwuid_code = ''' +#include +#include +int main() +{ + struct passwd passwd, *ignored; + getpwuid_r (0, &passwd, NULL, 0, &ignored); +} +''' +std_getpwuid = cc.compiles(getpwuid_code, name: 'standard getpwuid_r') +config.set10('STD_GETPWUID', std_getpwuid) + +asctime_code = ''' +#include +#include +int main() +{ + struct tm tm; + asctime_r (&tm, NULL); +} +''' +std_asctime = cc.compiles(asctime_code, name: 'standard asctime_r') +config.set10('STD_ASCTIME', std_asctime) + +xapian_compact_code = ''' +#include +class TestCompactor : public Xapian::Compactor { }; +''' +have_xapian_compact = cxx.compiles(xapian_compact_code, name: 'Xapian compact', + dependencies: dep_xapian) +config.set10('HAVE_XAPIAN_COMPACT', have_xapian_compact) + +xapian_field_processor_code = ''' +#include +class TitleFieldProcessor : public Xapian::FieldProcessor { }; +''' +have_xapian_field_processor = cxx.compiles(xapian_field_processor_code, + name: 'Xapian field processor', + dependencies: dep_xapian) +config.set10('HAVE_XAPIAN_FIELD_PROCESSOR', have_xapian_field_processor) + +xapian_db_retry_lock_code = ''' +#include +int flag = Xapian::DB_RETRY_LOCK; +''' +have_xapian_db_retry_lock = cxx.compiles(xapian_db_retry_lock_code, + name: 'Xapian retry lock', + dependencies: dep_xapian) +config.set10('HAVE_XAPIAN_DB_RETRY_LOCK', have_xapian_db_retry_lock) + +default_xapian_backend_code = ''' +#include +#include +#include + +#define TESTDB "test.db" +int main(void) { + int i; + struct { + const char *file; + const char *name; + } backends[] = { + { TESTDB "/iamglass", "glass" }, + { TESTDB "/iamchert", "chert" }, + { TESTDB "/iamflint", "flint" }, + { NULL, "unknown" }, + }; + + Xapian::WritableDatabase db("test.db", Xapian::DB_CREATE_OR_OPEN); + + for (i = 0; backends[i].file && access(backends[i].file, R_OK); i++) + ; + + printf("%s", backends[i].name); +} + +''' +default_xapian_backend = cxx.run(default_xapian_backend_code, + name: 'Xapian default backend', + dependencies: dep_xapian) +message('Default Xapian backend: ' + default_xapian_backend.stdout()) +config.set('DEFAULT_XAPIAN_BACKEND', default_xapian_backend.stdout()) + +configure_inc = include_directories('../lib') +libnotmuch_version_major = cc.get_define('LIBNOTMUCH_MAJOR_VERSION', + prefix: '#include ', + include_directories: configure_inc) +libnotmuch_version_minor = cc.get_define('LIBNOTMUCH_MINOR_VERSION', + prefix: '#include ', + include_directories: configure_inc) +libnotmuch_version_micro = cc.get_define('LIBNOTMUCH_MICRO_VERSION', + prefix: '#include ', + include_directories: configure_inc) +libnotmuch_version = libnotmuch_version_major + '.' + libnotmuch_version_minor + '.' + libnotmuch_version_micro + + +config.set_quoted('PYTHON', cmd_python.path()) + +config.set('GMIME_MAJOR', dep_gmime.version().split('.')[0]) + +if cmd_ruby.found() + ruby_dev = run_command(cmd_ruby.path(), ['-e', 'require \'mkmf\'']) + have_ruby_dev = ruby_dev.returncode() == 0 +else + have_ruby_dev = false +endif +config.set10('HAVE_RUBY_DEV', have_ruby_dev) + + +configure_file(input: 'config.h.in', + output: 'config.h', + configuration: config) + +inc_compat = include_directories('.') + +lib_compat = static_library('notmuch-compat', + notmuch_compat_srcs) diff --git a/lib/meson.build b/lib/meson.build new file mode 100644 index 000000000000..82c920cfab81 --- /dev/null +++ b/lib/meson.build @@ -0,0 +1,36 @@ +libnotmuch_srcs = [ + 'add-message.cc', + 'built-with.c', + 'config.cc', + 'database.cc', + 'directory.cc', + 'filenames.c', + 'index.cc', + 'indexopts.c', + 'message-file.c', + 'message-id.c', + 'message-property.cc', + 'message.cc', + 'messages.c', + 'parse-time-vrp.cc', + 'query-fp.cc', + 'query.cc', + 'regexp-fields.cc', + 'sha1.c', + 'string-list.c', + 'string-map.c', + 'tags.c', + 'thread-fp.cc', + 'thread.cc', +] + +inc_lib = include_directories('.') + +lib_notmuch = both_libraries('notmuch', libnotmuch_srcs, + include_directories: [inc_compat, + inc_util, + inc_parse_time], + link_with: [lib_compat, lib_util, lib_parse_time], + dependencies: [dep_gmime, dep_glib, dep_xapian, dep_talloc], + version: libnotmuch_version, + install: true) diff --git a/meson.build b/meson.build new file mode 100644 index 000000000000..6a924a684cad --- /dev/null +++ b/meson.build @@ -0,0 +1,77 @@ +project('notmuch', + ['c', 'cpp'], + license: 'GPLv3+', + meson_version: '>=0.49.2') + +dep_xapian = dependency('xapian-core') +dep_gmime = dependency('gmime-3.0', version: '>=3.0.3') +dep_glib = dependency('glib-2.0', version: '>=2.22') +dep_zlib = dependency('zlib', version: '>=1.2.5.2') +dep_talloc = dependency('talloc') +dep_valgrind = dependency('valgrind', required: false) +dep_bash_completion = dependency('bash-completion', version: '>=1.90', + required: false) +cmd_python = find_program('python3', 'python', 'python2') +cmd_doxygen = find_program('doxygen', required: false) +cmd_ruby = find_program('ruby', required: false) +cmd_sphinx = find_program('sphinx-build', required: false) +cmd_emacs = find_program('emacs', required: false) +cmd_desktop_file_install = find_program('desktop-file-install', required: false) + +add_global_arguments('-Wno-deprecated-declarations', language: ['c', 'cpp']) + +add_project_arguments('-D_GNU_SOURCE', language: ['c', 'cpp']) +add_project_arguments('-include', 'config.h', language: ['c', 'cpp']) + +inc_cli = include_directories('.') + +subdir('compat') +subdir('parse-time-string') +subdir('util') +subdir('lib') +subdir('test') + +notmuch_client_srcs = [ + 'command-line-arguments.c', + 'debugger.c', + 'gmime-filter-reply.c', + 'hooks.c', + 'mime-node.c', + 'notmuch-compact.c', + 'notmuch-config.c', + 'notmuch-count.c', + 'notmuch-dump.c', + 'notmuch-insert.c', + 'notmuch-new.c', + 'notmuch-reindex.c', + 'notmuch-reply.c', + 'notmuch-restore.c', + 'notmuch-search.c', + 'notmuch-setup.c', + 'notmuch-show.c', + 'notmuch-tag.c', + 'notmuch-time.c', + 'notmuch.c', + 'query-string.c', + 'sprinter-json.c', + 'sprinter-sexp.c', + 'sprinter-text.c', + 'status.c', + 'tag-util.c', +] + +executable('notmuch', notmuch_client_srcs, + include_directories: [inc_util, inc_compat, inc_lib], + dependencies: [dep_gmime, dep_zlib, dep_glib, dep_talloc], + link_with: [lib_compat, lib_util, lib_parse_time, lib_notmuch.get_static_lib()], + install: true) + +executable('notmuch-shared', notmuch_client_srcs, + include_directories: [inc_util, inc_compat, inc_lib], + dependencies: [dep_gmime, dep_zlib, dep_glib, dep_talloc], + link_with: [lib_compat, lib_util, lib_parse_time, lib_notmuch], + install: true) + +configure_file(input: 'sh.config.in', + output: 'sh.config', + configuration: config) diff --git a/parse-time-string/meson.build b/parse-time-string/meson.build new file mode 100644 index 000000000000..30c938d0a118 --- /dev/null +++ b/parse-time-string/meson.build @@ -0,0 +1,4 @@ +inc_parse_time = include_directories('.') +lib_parse_time = static_library('parse-time-string', + 'parse-time-string.c', + include_directories: inc_compat) diff --git a/sh.config.in b/sh.config.in new file mode 100644 index 000000000000..8ec4ed314aaf --- /dev/null +++ b/sh.config.in @@ -0,0 +1,31 @@ +NOTMUCH_SRCDIR=@NOTMUCH_SRCDIR@ + +# Whether the Xapian version in use supports compaction +NOTMUCH_HAVE_XAPIAN_COMPACT=@HAVE_XAPIAN_COMPACT@ + +# Whether the Xapian version in use supports field processors +NOTMUCH_HAVE_XAPIAN_FIELD_PROCESSOR=@HAVE_XAPIAN_FIELD_PROCESSOR@ + +# Whether the Xapian version in use supports lock retry +NOTMUCH_HAVE_XAPIAN_DB_RETRY_LOCK=@HAVE_XAPIAN_DB_RETRY_LOCK@ + +# Which backend will Xapian use by default? +NOTMUCH_DEFAULT_XAPIAN_BACKEND=@DEFAULT_XAPIAN_BACKEND@ + +# do we have man pages? +NOTMUCH_HAVE_MAN=1 + +# Name of python interpreter +NOTMUCH_PYTHON=@PYTHON@ + +# Are the ruby development files (and ruby) available? If not skip +# building/testing ruby bindings. +NOTMUCH_HAVE_RUBY_DEV=@HAVE_RUBY_DEV@ + +# Major version of gmime +NOTMUCH_GMIME_MAJOR=@GMIME_MAJOR@ + +# Platform we are run on +PLATFORM=Linux + +NOTMUCH_PLATFORM=@PLATFORM@ diff --git a/test/meson.build b/test/meson.build new file mode 100644 index 000000000000..e7a3c3e9c21f --- /dev/null +++ b/test/meson.build @@ -0,0 +1,133 @@ + +executable('arg-test', ['arg-test.c', '../command-line-arguments.c'], + include_directories: [inc_compat, inc_util, inc_cli], + link_with: [lib_compat, lib_util], + dependencies: dep_talloc) +executable('hex-xcode', ['hex-xcode.c', '../command-line-arguments.c'], + include_directories: [inc_compat, inc_util, inc_cli], + link_with: [lib_compat, lib_util], + dependencies: [dep_talloc, dep_gmime]) +executable('random-corpus', ['random-corpus.c', + 'database-test.c', + '../notmuch-config.c', + '../status.c', + '../command-line-arguments.c'], + include_directories: [inc_compat, inc_util, inc_cli, inc_lib], + link_with: [lib_compat, lib_util, lib_parse_time, lib_notmuch], + dependencies: [dep_talloc, dep_gmime]) +executable('smtp-dummy', ['smtp-dummy.c'], + include_directories: [inc_compat, inc_util], + link_with: [lib_compat, lib_util]) +executable('symbol-test', ['symbol-test.cc'], + include_directories: [inc_compat, inc_util], + link_with: [lib_compat, lib_util, lib_notmuch], + dependencies: dep_xapian) +executable('parse-time', ['parse-time.c'], + include_directories: [inc_compat, inc_util, inc_parse_time], + link_with: [lib_compat, lib_util, lib_parse_time]) +executable('make-db-version', ['make-db-version.cc'], + include_directories: [inc_compat, inc_util], + link_with: [lib_compat, lib_util], + dependencies: dep_xapian) +executable('ghost-report', ['ghost-report.cc'], + include_directories: [inc_compat, inc_util], + link_with: [lib_compat, lib_util], + dependencies: dep_xapian) + +build_dir = meson.current_build_dir() + +tests = [ + 'T000-basic.sh', + 'T010-help-test.sh', + 'T020-compact.sh', + 'T030-config.sh', + 'T040-setup.sh', + 'T050-new.sh', + 'T060-count.sh', + 'T070-insert.sh', + 'T080-search.sh', + 'T090-search-output.sh', + 'T095-address.sh', + 'T100-search-by-folder.sh', + 'T110-search-position-overlap-bug.sh', + 'T120-search-insufficient-from-quoting.sh', + 'T130-search-limiting.sh', + 'T140-excludes.sh', + 'T150-tagging.sh', + 'T160-json.sh', + 'T170-sexp.sh', + 'T180-text.sh', + 'T190-multipart.sh', + 'T200-thread-naming.sh', + 'T205-author-naming.sh', + 'T210-raw.sh', + 'T220-reply.sh', + 'T230-reply-to-sender.sh', + 'T240-dump-restore.sh', + 'T250-uuencode.sh', + 'T260-thread-order.sh', + 'T270-author-order.sh', + 'T280-from-guessing.sh', + 'T290-long-id.sh', + 'T300-encoding.sh', + 'T310-emacs.sh', + 'T320-emacs-large-search-buffer.sh', + 'T330-emacs-subject-to-filename.sh', + 'T340-maildir-sync.sh', + 'T350-crypto.sh', + 'T351-pgpmime-mangling.sh', + 'T355-smime.sh', + 'T356-protected-headers.sh', + 'T357-index-decryption.sh', + 'T358-emacs-protected-headers.sh', + 'T360-symbol-hiding.sh', + 'T370-search-folder-coherence.sh', + 'T380-atomicity.sh', + 'T390-python.sh', + 'T391-python-cffi.sh', + 'T395-ruby.sh', + 'T400-hooks.sh', + 'T410-argument-parsing.sh', + 'T420-emacs-test-functions.sh', + 'T430-emacs-address-cleaning.sh', + 'T440-emacs-hello.sh', + 'T450-emacs-show.sh', + 'T455-emacs-charsets.sh', + 'T460-emacs-tree.sh', + 'T470-missing-headers.sh', + 'T480-hex-escaping.sh', + 'T490-parse-time-string.sh', + 'T500-search-date.sh', + 'T510-thread-replies.sh', + 'T520-show.sh', + 'T530-upgrade.sh', + 'T550-db-features.sh', + 'T560-lib-error.sh', + 'T570-revision-tracking.sh', + 'T580-thread-search.sh', + 'T585-thread-subquery.sh', + 'T590-libconfig.sh', + 'T590-thread-breakage.sh', + 'T600-named-queries.sh', + 'T610-message-property.sh', + 'T620-lock.sh', + 'T630-emacs-draft.sh', + 'T640-database-modified.sh', + 'T650-regexp-query.sh', + 'T660-bad-date.sh', + 'T670-duplicate-mid.sh', + 'T680-html-indexing.sh', + 'T690-command-line-args.sh', + 'T700-reindex.sh', + 'T710-message-id.sh', + 'T720-emacs-attachment-warnings.sh', + 'T720-lib-lifetime.sh', + 'T730-emacs-forwarding.sh', + 'T740-body.sh', + 'T750-gzip.sh', + 'T750-user-header.sh', +] + +foreach test: tests + test(test, find_program(test), workdir: build_dir) +endforeach diff --git a/util/meson.build b/util/meson.build new file mode 100644 index 000000000000..95a960b12411 --- /dev/null +++ b/util/meson.build @@ -0,0 +1,19 @@ +notmuch_util_srcs = [ + 'crypto.c', + 'error_util.c', + 'gmime-extra.c', + 'hex-escape.c', + 'repair.c', + 'string-util.c', + 'talloc-extra.c', + 'unicode-util.c', + 'util.c', + 'xutil.c', + 'zlib-extra.c', +] + +inc_util = include_directories('.') + +lib_util = static_library('notmuch-util', notmuch_util_srcs, + include_directories: [inc_compat, inc_util], + dependencies: dep_gmime) -- 2.20.1