diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2021-07-24 11:09:25 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2021-07-24 11:12:10 +0000 |
| commit | 7c686208a18f93ec1f955c289045251af5ef6056 (patch) | |
| tree | 5db4a760b5cb5abec55701c4594e62682d06b31b | |
| parent | Merge branch 'csd-title' (diff) | |
meson: add -Ddocs=disabled|enabled|auto command line option
When enabled (the default, if scdoc is found), we build and install
the man pages, example foot.ini, readme, changelog and license files.
| -rw-r--r-- | CHANGELOG.md | 1 | ||||
| -rw-r--r-- | INSTALL.md | 6 | ||||
| -rw-r--r-- | meson.build | 15 | ||||
| -rw-r--r-- | meson_options.txt | 2 |
4 files changed, 18 insertions, 6 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 84d333f9..1857c631 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -34,6 +34,7 @@ * Window title in the CSDs (https://codeberg.org/dnkl/foot/issues/638). +* `-Ddocs=disabled|enabled|auto` meson command line option. ### Changed @@ -64,7 +64,7 @@ In addition to the dev variant of the packages above, you need: * ninja * wayland protocols * ncurses (needed to generate terminfo) -* scdoc (for man page generation) +* scdoc (for man page generation, not needed if documentation is disabled) * llvm (for PGO builds with Clang) * [tllist](https://codeberg.org/dnkl/tllist) [^1] @@ -130,11 +130,15 @@ Available compile-time options: | Option | Type | Default | Description | Extra dependencies | |-------------------------------|---------|-----------------------|---------------------------------------|--------------------| +| `-Ddocs` | feature | `auto` | Builds and install documentation | scdoc | | `-Dime` | bool | `true` | Enables IME support | None | | `-Dgrapheme-clustering` | feature | `auto` | Enables grapheme clustering | libutf8proc | | `-Dterminfo` | feature | `auto` | Build terminfo files | `tic` (ncurses) | | `-Dterminfo-install-location` | string | `${datadir}/terminfo` | Where to install the terminfo files | None | +Documentation includes the man pages, the example `foot.ini`, readme, +changelog and license files. + The two `terminfo` options are related, but control different aspects of how the terminfo files are built, installed and used. diff --git a/meson.build b/meson.build index 09d86ff7..4d0b8f13 100644 --- a/meson.build +++ b/meson.build @@ -239,19 +239,24 @@ else endif install_data( - 'LICENSE', 'README.md', 'CHANGELOG.md', - install_dir: join_paths(get_option('datadir'), 'doc', 'foot')) -install_data( 'foot.desktop', 'foot-server.desktop', install_dir: join_paths(get_option('datadir'), 'applications')) -install_data('foot.ini', install_dir: join_paths(get_option('datadir'), 'foot')) + +scdoc = dependency('scdoc', native: true, required: get_option('docs')) +if scdoc.found() + install_data( + 'LICENSE', 'README.md', 'CHANGELOG.md', + install_dir: join_paths(get_option('datadir'), 'doc', 'foot')) + install_data('foot.ini', install_dir: join_paths(get_option('datadir'), 'foot')) + subdir('doc') +endif subdir('completions') -subdir('doc') subdir('icons') summary( { + 'Documentation': scdoc.found(), 'IME': get_option('ime'), 'Grapheme clustering': utf8proc.found(), 'Terminfo': tic.found(), diff --git a/meson_options.txt b/meson_options.txt index 57b5721a..c8273155 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1,3 +1,5 @@ +option('docs', type: 'feature', description: 'Build and install documentation (man pages, example foot.ini, readme, changelog, license etc).') + option('ime', type: 'boolean', value: true, description: 'IME (Input Method Editor) support') option('grapheme-clustering', type: 'feature', |
