[PATCH libinput] meson: point users to disabled documentation when dot/doxygen is missing
Peter Hutterer
peter.hutterer at who-t.net
Mon Mar 19 05:04:56 UTC 2018
Especially dot is hard to find for some users, so provide the solution to
their problems right there in the error message.
And because users are likely to just copy/paste, remove the disable-libwacom
option. Save them from themselves...
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
doc/building.dox | 5 ++++-
meson.build | 11 +++++++++--
2 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/doc/building.dox b/doc/building.dox
index 8e302e0d..ef7793b0 100644
--- a/doc/building.dox
+++ b/doc/building.dox
@@ -28,9 +28,12 @@ $> sudo udevadm hwdb --update
Additional options may also be specified. For example:
@code
-$> meson --prefix=/usr -Ddocumentation=false -Dlibwacom=false builddir/
+$> meson --prefix=/usr -Ddocumentation=false builddir/
@endcode
+We recommend that users disable the documentation, it's not usually required
+for testing and reduces the number of dependencies needed.
+
The ```prefix``` or other options can be changed later with the
```mesonconf``` command. For example:
@code
diff --git a/meson.build b/meson.build
index 58ef31a4..fcd3d8c4 100644
--- a/meson.build
+++ b/meson.build
@@ -254,7 +254,15 @@ meson.add_install_script('src/libinput-restore-selinux-context.sh',
############ documentation ############
if get_option('documentation')
- doxygen = find_program('doxygen')
+ doxygen = find_program('doxygen', required : false)
+ if not doxygen.found()
+ error('Program "doxygen" not found or not executable. Try building with -Ddocumentation=false')
+ endif
+ dot = find_program('dot', required : false)
+ if not dot.found()
+ error('Program "dot" not found or not executable. Try building with -Ddocumentation=false')
+ endif
+
doxygen_version_cmd = run_command(doxygen.path(), '--version')
if doxygen_version_cmd.returncode() != 0
error('Command "doxygen --version" failed.')
@@ -263,7 +271,6 @@ if get_option('documentation')
if doxygen_version.version_compare('< 1.8.3')
error('doxygen needs to be at least version 1.8.3 (have @0@)'.format(doxygen_version))
endif
- dot = find_program('dot')
grep = find_program('grep')
dot_version_cmd = run_command(dot.path(), '-V')
if dot_version_cmd.returncode() != 0
--
2.14.3
More information about the wayland-devel
mailing list