diff options
| author | Dirk-Jan C. Binnema <djcb@djcbsoftware.nl> | 2022-07-02 12:18:51 +0300 |
|---|---|---|
| committer | Dirk-Jan C. Binnema <djcb@djcbsoftware.nl> | 2022-07-02 12:18:51 +0300 |
| commit | 8f1d83e4b267ce07f7d153787ca0f7de1a4535ac (patch) | |
| tree | 68f725b977df3d809fdd8c60b3e5d8cd28e66580 | |
| parent | a423a8bbcc34b3c3e394008020b0475e426a1f3f (diff) | |
build: add 'lispdir' option
Add lispdir option for installing mu4e in a custom directory, which what
some pre-meson users tended to do with --lispdir.
Passing '-Dlispdir=/tmp/foo/bar' causes the mu4e files to be installed
in /tmp/foo/bar/mu4e.
Should help for issue #2287.
| -rw-r--r-- | meson.build | 16 | ||||
| -rw-r--r-- | meson_options.txt | 4 | ||||
| -rw-r--r-- | mu4e/meson.build | 8 |
3 files changed, 19 insertions, 9 deletions
diff --git a/meson.build b/meson.build index 20496bb..661290e 100644 --- a/meson.build +++ b/meson.build @@ -31,10 +31,18 @@ project('mu', ['c', 'cpp'], # installation paths prefixdir = get_option('prefix') -bindir = join_paths(prefixdir, get_option('bindir')) -datadir = join_paths(prefixdir, get_option('datadir')) -mandir = join_paths(prefixdir, get_option('mandir')) -infodir = join_paths(prefixdir, get_option('infodir')) +bindir = prefixdir / get_option('bindir') +datadir = prefixdir / get_option('datadir') +mandir = prefixdir / get_option('mandir') +infodir = prefixdir / get_option('infodir') + +# allow for configuring lispdir, as with autotools. +# default to <p +if get_option('lispdir') == '' + mu4e_lispdir= datadir / join_paths('emacs', 'site-lisp', 'mu4e') +else + mu4e_lispdir= get_option('lispdir') / 'mu4e' +endif ################################################################################ # compilers / flags diff --git a/meson_options.txt b/meson_options.txt index 416fe1a..587b479 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -29,3 +29,7 @@ option('emacs', type: 'string', value: 'emacs', description: 'name/path of the emacs executable') + +option('lispdir', + type: 'string', + description: 'path under which to install emacs-lisp files') diff --git a/mu4e/meson.build b/mu4e/meson.build index 0431e4f..27b676b 100644 --- a/mu4e/meson.build +++ b/mu4e/meson.build @@ -14,15 +14,13 @@ ## 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-config.el.in', output: 'mu4e-config.el', install: true, - install_dir: lispdir, + install_dir: mu4e_lispdir, configuration: { 'VERSION' : meson.project_version(), # project_build_root() with meson >= 0.56 @@ -79,7 +77,7 @@ foreach src : mu4e_srcs build_by_default: true, input: src, output: target_name, - install_dir: lispdir, + install_dir: mu4e_lispdir, install: true, command: [emacs, '--no-init-file', @@ -92,7 +90,7 @@ foreach src : mu4e_srcs endforeach # also install the sources and the config -install_data(mu4e_srcs, install_dir: lispdir) +install_data(mu4e_srcs, install_dir: mu4e_lispdir) # install mu4e-about.org install_data('mu4e-about.org', install_dir : join_paths(datadir, 'doc', 'mu')) |
