mu4e: get rid of load-prefer-newer t

This triggered what I think is a bug/limitation in emacs; move the
source files to the build dir _after_ byte-compiling so we don't need
load-prefer-newer to avoid build warnings.

Fixes #2565.
This commit is contained in:
Dirk-Jan C. Binnema 2023-10-04 20:26:23 +03:00
parent 4d11abd1ca
commit 1bc9d6b515
1 changed files with 19 additions and 19 deletions

View File

@ -76,24 +76,6 @@ mu4e_srcs=[
#
#... 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_srcs
configure_file(input: src, output:'@BASENAME@.el', copy:true,
install_mode: 'r--r--r--')
endforeach
# this depends on the above hack: all mu4e elisp files needs to be in builddir
mu4e_autoloads = configure_file(
output: 'mu4e-autoloads.el',
install: true,
install_dir: mu4e_lispdir,
command: [emacs,
'--no-init-file',
'--batch',
'--load', 'package',
'--eval', '(package-generate-autoloads "mu4e" "' + meson.current_build_dir() + '" )'])
foreach src : mu4e_srcs
target_name= '@BASENAME@.elc'
target_path = join_paths(meson.current_build_dir(), target_name)
@ -114,7 +96,6 @@ foreach src : mu4e_srcs
'--batch',
'--directory', meson.current_build_dir(),
'--directory', meson.current_source_dir(),
'--eval', '(setq load-prefer-newer t)',
# we don't need warnings for items that have become
# obsolete _after_ our last supported emacs release.
'--eval', '(setq byte-compile-warnings \'(not obsolete))',
@ -122,6 +103,25 @@ foreach src : mu4e_srcs
'--funcall', 'batch-byte-compile', '@INPUT@'])
endforeach
# hack-around for native compile issue: copy sources to builddir.
# see: https://debbugs.gnu.org/db/47/47987.html
foreach src : mu4e_srcs
configure_file(input: src, output:'@BASENAME@.el', copy:true,
install_mode: 'r--r--r--')
endforeach
# this depends on the above hack: all mu4e elisp files needs to be in builddir
mu4e_autoloads = configure_file(
output: 'mu4e-autoloads.el',
install: true,
install_dir: mu4e_lispdir,
command: [emacs,
'--no-init-file',
'--batch',
'--load', 'package',
'--eval', '(package-generate-autoloads "mu4e" "' +
meson.current_build_dir() + '" )'])
# also install the sources and the config
install_data(mu4e_srcs, install_dir: mu4e_lispdir)