build: use install-info when installing mu4e/guile

So the docs can be found.
This commit is contained in:
Dirk-Jan C. Binnema 2022-06-30 21:34:29 +03:00
parent 99eb3bb674
commit 5e3e2cf28e
4 changed files with 31 additions and 5 deletions

View File

@ -0,0 +1,10 @@
#!/bin/sh
infodir=$1
infofile=$2
# Meson post-install script to update info metadata
install-info --info-dir ${MESON_INSTALL_DESTDIR_PREFIX}/${infodir} \
${MESON_INSTALL_DESTDIR_PREFIX}/${infodir}/${infofile}
gzip --force ${MESON_INSTALL_DESTDIR_PREFIX}/${infodir}/${infofile}

View File

@ -85,6 +85,12 @@ if makeinfo.found()
'-o', join_paths(meson.current_build_dir(), 'mu-guile.info'),
join_paths(meson.current_source_dir(), 'mu-guile.texi'),
'-I', join_paths(meson.current_build_dir(), '..')])
if install_info.found()
meson.add_install_script(install_info_script, 'share/info', 'mu-guile.info')
endif
endif
guile_scm_dir=join_paths(datadir, 'guile', 'site', '3.0', 'mu')

View File

@ -117,11 +117,11 @@ gmime_dep = dependency('gmime-3.0', version: '>= 3.2')
xapian_dep = dependency('xapian-core', version:'>= 1.4')
thread_dep = dependency('threads')
awk=find_program(['gawk', 'awk'])
gzip=find_program('gzip')
# soft dependencies
guile_dep = dependency('guile-3.0', required: get_option('guile'))
awk=find_program(['gawk', 'awk'])
# soft dependencies
# emacs -- needed for mu4e compilation
@ -134,6 +134,14 @@ endif
makeinfo=find_program(['makeinfo'], required:false)
if not makeinfo.found()
message('makeinfo (texinfo) not found; not building info documentation')
else
install_info=find_program(['install-info'], required:false)
if not install_info.found()
message('install-info not found')
else
install_info_script=join_paths(meson.current_source_dir(), 'build-aux',
'meson-install-info.sh')
endif
endif
# readline. annoyingly, macos has an incompatible libedit claiming to be

View File

@ -109,8 +109,7 @@ if makeinfo.found()
version_texi = configure_file(
input: 'version.texi.in',
output: 'version.texi',
configuration: version_texi_data
)
configuration: version_texi_data)
custom_target('mu4e_info',
input: 'mu4e.texi',
@ -121,4 +120,7 @@ if makeinfo.found()
'-o', join_paths(meson.current_build_dir(), 'mu4e.info'),
join_paths(meson.current_source_dir(), 'mu4e.texi'),
'-I', join_paths(meson.current_build_dir(), '..')])
if install_info.found()
meson.add_install_script(install_info_script, 'share/info', 'mu4e.info')
endif
endif