[PATCH] docs: fix docs output path with meson 0.60.0

Daniel P. Berrangé posted 1 patch 2 years, 5 months ago
Test syntax-check failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20211025183654.543157-1-berrange@redhat.com
docs/meson.build | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
[PATCH] docs: fix docs output path with meson 0.60.0
Posted by Daniel P. Berrangé 2 years, 5 months ago
The meson 0.60.0 release introduced a bug with the '/' operator when
using an empty path component. '/foo' / ''  will now result in '/foo'
not '/foo/'

  https://github.com/mesonbuild/meson/issues/9450

This breaks libvirt because xsltproc requires the trailing '/' on the
output directory path. Fortunately the explicit 'join_paths' function
is not affected by the regression

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---

Pushed as a CI / build fix

 docs/meson.build | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/docs/meson.build b/docs/meson.build
index cbc138fa1f..fb6e0029d0 100644
--- a/docs/meson.build
+++ b/docs/meson.build
@@ -1,7 +1,9 @@
 docs_html_dir = docdir / 'html'
 
 # xsltproc requires that the -o path ends with '/'
-docs_builddir = meson.current_build_dir() / ''
+# Not using '/' operator due to bug in meson 0.60.0
+# https://github.com/mesonbuild/meson/issues/9450
+docs_builddir = join_paths(meson.current_build_dir(), '')
 
 docs_assets = [
   'android-chrome-192x192.png',
-- 
2.31.1