summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre Le Marre <dev@wismill.eu>2023-06-27 20:31:01 +0200
committerWismill <dev@wismill.eu>2023-06-30 17:14:59 +0200
commit37fdd87c82da02325061129618cc088a8311a8e0 (patch)
tree700b1f97b5c5ab7be8c6449f34cf6ef7afcdaa0d
parentfc25e0f0f7f99dcecb382ebce3a66c7cc72fc463 (diff)
downloadlibxkbcommon-37fdd87c82da02325061129618cc088a8311a8e0.tar.gz
libxkbcommon-37fdd87c82da02325061129618cc088a8311a8e0.tar.bz2
libxkbcommon-37fdd87c82da02325061129618cc088a8311a8e0.zip
Add a meson flag to make cool URIs optional
The script `ensure-stable-doc-urls.py` relies on the Doxygen output files names. These may change between Doxygen versions, although the Doxygen developers intend stability. Since the script is useful mainly for the online documentation of xkbcommon, make the target `doc-cool-uris` optional.
-rw-r--r--meson.build30
-rw-r--r--meson_options.txt6
2 files changed, 22 insertions, 14 deletions
diff --git a/meson.build b/meson.build
index 2cd1ee7..6a79093 100644
--- a/meson.build
+++ b/meson.build
@@ -833,20 +833,22 @@ You can disable the documentation with -Denable-docs=false.''')
install_dir: docdir,
build_by_default: true,
)
- ensure_stable_urls = find_program('scripts'/'ensure-stable-doc-urls.py')
- custom_target(
- 'doc-cool-uris',
- input: [doc_gen, 'doc'/'cool-uris.yaml'],
- output: 'html-xtra',
- command: [
- ensure_stable_urls,
- 'generate-redirections',
- meson.current_source_dir()/'doc'/'cool-uris.yaml',
- meson.current_build_dir()/'html'
- ],
- install: false,
- build_by_default: true,
- )
+ if get_option('enable-cool-uris')
+ ensure_stable_urls = find_program('scripts'/'ensure-stable-doc-urls.py')
+ custom_target(
+ 'doc-cool-uris',
+ input: [doc_gen, 'doc'/'cool-uris.yaml'],
+ output: 'html-xtra',
+ command: [
+ ensure_stable_urls,
+ 'generate-redirections',
+ meson.current_source_dir()/'doc'/'cool-uris.yaml',
+ meson.current_build_dir()/'html'
+ ],
+ install: false,
+ build_by_default: true,
+ )
+ endif
endif
configure_file(output: 'config.h', configuration: configh_data)
diff --git a/meson_options.txt b/meson_options.txt
index 69850b8..924d1f7 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -62,6 +62,12 @@ option(
description: 'Enable building the documentation',
)
option(
+ 'enable-cool-uris',
+ type: 'boolean',
+ value: false,
+ description: 'Enable creating redirections to maintain stable documentation pages',
+)
+option(
'enable-wayland',
type: 'boolean',
value: true,