From 8cd9693231392bcc7b68799d3ed1060298dbb439 Mon Sep 17 00:00:00 2001 From: Zhu Zihao Date: Sat, 6 Aug 2022 09:37:51 +0800 Subject: [PATCH] mu4e: Enable autoload generation in meson. --- mu4e/meson.build | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/mu4e/meson.build b/mu4e/meson.build index 27b676b4..94ef1455 100644 --- a/mu4e/meson.build +++ b/mu4e/meson.build @@ -89,6 +89,23 @@ foreach src : mu4e_srcs '--funcall', 'batch-byte-compile', '@INPUT@']) endforeach +target_name = 'mu4e-autoloads.el' +target_path = join_paths(meson.current_build_dir(), target_name) +target_var = '(setq generated-autoload-file "' + target_path + '")' + +custom_target('mu4e_autoloads_el', + build_by_default: true, + input: src, + output: target_name, + install_dir: mu4e_lispdir, + install: true, + command: [emacs, + '--no-init-file', + '--batch', + '--eval', target_var, + '--funcall', 'batch-update-autoloads', + meson.current_source_dir()]) + # also install the sources and the config install_data(mu4e_srcs, install_dir: mu4e_lispdir)