diff options
| author | Dirk-Jan C. Binnema <djcb@djcbsoftware.nl> | 2022-05-29 01:09:53 +0300 |
|---|---|---|
| committer | Dirk-Jan C. Binnema <djcb@djcbsoftware.nl> | 2022-05-29 11:10:58 +0300 |
| commit | cf0f72e4a48ac7029d7f6758b182d4bb559f8f49 (patch) | |
| tree | 0b056d8457e02502173f834a92c6abd5a34bbc1b /mu4e/meson.build | |
| parent | b1ff292bbb3d1be6ff2c15e901acc5d2b49e1163 (diff) | |
mu4e: use mu4e-config instead of mu4e-meta
All these changes to avoid:
,----
| mu4e/meson.build:92: WARNING: Source item '/home/djcb/Sources/mu/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
`----
This is because we want to byte-compile a file we just before generated using
configure_file. This does not seem like a crazy thing, but meson threatens with
breaking the build at some point in the future.
So instead, we decide _not_ to compile this (very boring) file. But, users may
still have an older mu4e-meta.elc lying around, leading to confusion.
So, let's rename that file and we're golden.
Diffstat (limited to 'mu4e/meson.build')
| -rw-r--r-- | mu4e/meson.build | 39 |
1 files changed, 19 insertions, 20 deletions
diff --git a/mu4e/meson.build b/mu4e/meson.build index c32d63c..6369dc2 100644 --- a/mu4e/meson.build +++ b/mu4e/meson.build @@ -14,9 +14,15 @@ ## along with this program; if not, write to the Free Software Foundation, ## Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# where the lisp goes +lispdir = join_paths(datadir, 'emacs', 'site-lisp', 'mu4e') + +# generate some build data for use in mu4e mu4e_meta = configure_file( - input: 'mu4e-meta.el.in', - output: 'mu4e-meta.el', + input: 'mu4e-config.el.in', + output: 'mu4e-config.el', + install: true, + install_dir: lispdir, configuration: { 'VERSION' : meson.project_version(), # project_build_root() with meson >= 0.56 @@ -24,7 +30,7 @@ mu4e_meta = configure_file( 'MU_DOC_DIR' : join_paths(datadir, 'doc', 'mu'), }) -mu4e_plain_srcs=[ +mu4e_srcs=[ 'mu4e-actions.el', 'mu4e-bookmarks.el', 'mu4e-compose.el', @@ -51,27 +57,20 @@ mu4e_plain_srcs=[ 'obsolete/org-mu4e.el', ] -mu4e_gen_srcs=[ - join_paths(meson.current_build_dir(), 'mu4e-meta.el'), -] - -mu4e_all_srcs = mu4e_plain_srcs -mu4e_all_srcs += mu4e_gen_srcs +# 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! # hack-around for native compile issue: copy sources to builddir. # see: https://debbugs.gnu.org/db/47/47987.html -foreach src : mu4e_plain_srcs +foreach src : mu4e_srcs configure_file(input: src, output:'@BASENAME@.el', copy:true) endforeach - -# XXX: this yields a warning: mu4e/meson.build:86: 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. -# unsure how to best avoid that. - -lispdir = join_paths(datadir, 'emacs', 'site-lisp', 'mu4e') -foreach src : mu4e_all_srcs +foreach src : mu4e_srcs 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 + '"))' @@ -92,8 +91,8 @@ foreach src : mu4e_all_srcs '--funcall', 'batch-byte-compile', '@INPUT@']) endforeach -# also install the sources. -install_data(mu4e_all_srcs, install_dir: lispdir) +# also install the sources and the config +install_data(mu4e_srcs, install_dir: lispdir) # install mu4e-about.org install_data('mu4e-about.org', install_dir : join_paths(datadir, 'doc', 'mu')) |
