2022-02-26 13:14:27 +01:00
|
|
|
## Copyright (C) 2022 Dirk-Jan C. Binnema <djcb@djcbsoftware.nl>
|
2021-02-11 23:49:35 +01:00
|
|
|
##
|
|
|
|
## 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.
|
|
|
|
|
2022-05-29 00:09:53 +02:00
|
|
|
|
|
|
|
# generate some build data for use in mu4e
|
2021-02-11 23:49:35 +01:00
|
|
|
mu4e_meta = configure_file(
|
2022-05-29 00:09:53 +02:00
|
|
|
input: 'mu4e-config.el.in',
|
|
|
|
output: 'mu4e-config.el',
|
|
|
|
install: true,
|
2022-07-02 11:18:51 +02:00
|
|
|
install_dir: mu4e_lispdir,
|
2022-02-26 13:14:27 +01:00
|
|
|
configuration: {
|
2021-02-11 23:49:35 +01:00
|
|
|
'VERSION' : meson.project_version(),
|
2021-08-28 10:25:05 +02:00
|
|
|
'MU_DOC_DIR' : join_paths(datadir, 'doc', 'mu'),
|
2021-02-11 23:49:35 +01:00
|
|
|
})
|
|
|
|
|
2023-08-23 02:04:31 +02:00
|
|
|
mu4e_pkg_desc = configure_file(
|
|
|
|
input: 'mu4e-pkg.el.in',
|
|
|
|
output: 'mu4e-pkg.el',
|
|
|
|
install: true,
|
|
|
|
install_dir: mu4e_lispdir,
|
|
|
|
configuration: {
|
|
|
|
'VERSION' : meson.project_version(),
|
|
|
|
'EMACS_MIN_VERSION' : emacs_min_version,
|
|
|
|
})
|
|
|
|
|
2022-05-29 00:09:53 +02:00
|
|
|
mu4e_srcs=[
|
2021-02-11 23:49:35 +01:00
|
|
|
'mu4e-actions.el',
|
2021-08-29 16:33:08 +02:00
|
|
|
'mu4e-bookmarks.el',
|
2021-02-11 23:49:35 +01:00
|
|
|
'mu4e-compose.el',
|
2021-08-30 17:27:04 +02:00
|
|
|
'mu4e-contacts.el',
|
2021-02-11 23:49:35 +01:00
|
|
|
'mu4e-context.el',
|
|
|
|
'mu4e-contrib.el',
|
|
|
|
'mu4e-draft.el',
|
2021-08-29 16:33:08 +02:00
|
|
|
'mu4e-folders.el',
|
2021-02-11 23:49:35 +01:00
|
|
|
'mu4e.el',
|
|
|
|
'mu4e-headers.el',
|
2021-08-28 13:53:32 +02:00
|
|
|
'mu4e-helpers.el',
|
2021-02-11 23:49:35 +01:00
|
|
|
'mu4e-icalendar.el',
|
|
|
|
'mu4e-lists.el',
|
|
|
|
'mu4e-main.el',
|
|
|
|
'mu4e-mark.el',
|
|
|
|
'mu4e-message.el',
|
2023-07-16 09:44:57 +02:00
|
|
|
'mu4e-mime-parts.el',
|
2023-01-07 09:28:15 +01:00
|
|
|
'mu4e-modeline.el',
|
2023-01-15 11:19:23 +01:00
|
|
|
'mu4e-notification.el',
|
2022-08-20 13:24:24 +02:00
|
|
|
'mu4e-obsolete.el',
|
2021-02-11 23:49:35 +01:00
|
|
|
'mu4e-org.el',
|
2023-01-09 22:58:10 +01:00
|
|
|
'mu4e-query-items.el',
|
2021-08-30 17:27:04 +02:00
|
|
|
'mu4e-search.el',
|
2021-08-29 18:53:53 +02:00
|
|
|
'mu4e-server.el',
|
2021-02-11 23:49:35 +01:00
|
|
|
'mu4e-speedbar.el',
|
2023-04-20 17:08:43 +02:00
|
|
|
'mu4e-thread.el',
|
2021-08-29 16:33:08 +02:00
|
|
|
'mu4e-update.el',
|
2021-02-11 23:49:35 +01:00
|
|
|
'mu4e-vars.el',
|
2022-12-03 09:24:18 +01:00
|
|
|
'mu4e-view.el',
|
|
|
|
'mu4e-window.el'
|
2021-02-11 23:49:35 +01:00
|
|
|
]
|
|
|
|
|
2022-05-29 00:09:53 +02:00
|
|
|
# note, we cannot compile mu4e-config.el without incurring
|
|
|
|
# WARNING: Source item
|
|
|
|
# '[...]/build/mu4e/mu4e-meta.el' cannot be converted to File object, because
|
|
|
|
# it is a generated file. This will become a hard error in the future.
|
|
|
|
#
|
|
|
|
#... so let's not do that!
|
2021-08-28 10:25:05 +02:00
|
|
|
|
2022-02-26 13:14:27 +01:00
|
|
|
# hack-around for native compile issue: copy sources to builddir.
|
|
|
|
# see: https://debbugs.gnu.org/db/47/47987.html
|
2022-05-29 00:09:53 +02:00
|
|
|
foreach src : mu4e_srcs
|
2023-02-15 05:46:00 +01:00
|
|
|
configure_file(input: src, output:'@BASENAME@.el', copy:true,
|
|
|
|
install_mode: 'r--r--r--')
|
2021-10-21 18:23:47 +02:00
|
|
|
endforeach
|
|
|
|
|
2022-05-29 00:09:53 +02:00
|
|
|
foreach src : mu4e_srcs
|
2021-10-21 18:23:47 +02:00
|
|
|
target_name= '@BASENAME@.elc'
|
|
|
|
target_path = join_paths(meson.current_build_dir(), target_name)
|
|
|
|
target_func = '(setq byte-compile-dest-file-function(lambda(_) "' + target_path + '"))'
|
|
|
|
|
2023-01-03 22:08:49 +01:00
|
|
|
# todo: depfile.
|
|
|
|
|
2021-02-11 23:49:35 +01:00
|
|
|
custom_target(src.underscorify() + '_el',
|
2022-06-28 22:28:02 +02:00
|
|
|
build_by_default: true,
|
|
|
|
input: src,
|
|
|
|
output: target_name,
|
2022-07-02 11:18:51 +02:00
|
|
|
install_dir: mu4e_lispdir,
|
2021-08-28 10:25:05 +02:00
|
|
|
install: true,
|
2023-01-03 23:19:47 +01:00
|
|
|
# rebuild all if any changed.
|
|
|
|
depend_files: mu4e_srcs,
|
2022-06-28 22:28:02 +02:00
|
|
|
command: [emacs,
|
|
|
|
'--no-init-file',
|
|
|
|
'--batch',
|
|
|
|
'--directory', meson.current_build_dir(),
|
|
|
|
'--directory', meson.current_source_dir(),
|
2023-01-03 22:08:49 +01:00
|
|
|
'--eval', '(setq load-prefer-newer t)',
|
2023-01-11 21:32:09 +01:00
|
|
|
# we don't need warnings for items that have become
|
|
|
|
# obsolete _after_ our last supported emacs release.
|
|
|
|
'--eval', '(setq byte-compile-warnings \'(not obsolete))',
|
2023-01-03 22:08:49 +01:00
|
|
|
'--eval', target_func,
|
2022-06-28 22:28:02 +02:00
|
|
|
'--funcall', 'batch-byte-compile', '@INPUT@'])
|
2021-02-11 23:49:35 +01:00
|
|
|
endforeach
|
|
|
|
|
2022-05-29 00:09:53 +02:00
|
|
|
# also install the sources and the config
|
2022-07-02 11:18:51 +02:00
|
|
|
install_data(mu4e_srcs, install_dir: mu4e_lispdir)
|
2021-02-11 23:49:35 +01:00
|
|
|
|
2022-03-26 21:00:56 +01:00
|
|
|
# install mu4e-about.org
|
|
|
|
install_data('mu4e-about.org', install_dir : join_paths(datadir, 'doc', 'mu'))
|
|
|
|
|
2021-02-11 23:49:35 +01:00
|
|
|
if makeinfo.found()
|
2022-06-28 22:28:02 +02:00
|
|
|
|
|
|
|
fulldate = run_command('date', '+%d %B %Y', check:true).stdout().strip()
|
|
|
|
monthdate = run_command('date', '+%B %Y', check:true).stdout().strip()
|
|
|
|
version_texi_data = configuration_data({
|
|
|
|
'fulldate' : fulldate,
|
|
|
|
'monthdate' : monthdate,
|
|
|
|
'version' : meson.project_version(),
|
|
|
|
})
|
|
|
|
version_texi = configure_file(
|
|
|
|
input: 'version.texi.in',
|
|
|
|
output: 'version.texi',
|
2022-06-30 20:34:29 +02:00
|
|
|
configuration: version_texi_data)
|
2022-06-28 22:28:02 +02:00
|
|
|
|
2021-02-11 23:49:35 +01:00
|
|
|
custom_target('mu4e_info',
|
2022-06-28 22:28:02 +02:00
|
|
|
input: 'mu4e.texi',
|
|
|
|
output: 'mu4e.info',
|
|
|
|
install_dir: infodir,
|
|
|
|
install: true,
|
|
|
|
command: [makeinfo,
|
|
|
|
'-o', join_paths(meson.current_build_dir(), 'mu4e.info'),
|
|
|
|
join_paths(meson.current_source_dir(), 'mu4e.texi'),
|
|
|
|
'-I', join_paths(meson.current_build_dir(), '..')])
|
2022-06-30 20:34:29 +02:00
|
|
|
if install_info.found()
|
|
|
|
meson.add_install_script(install_info_script, 'share/info', 'mu4e.info')
|
|
|
|
endif
|
2021-02-11 23:49:35 +01:00
|
|
|
endif
|