From 4e312c19e693a69b0650ce6c8a8903163c959996 Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Tue, 11 May 2021 09:18:47 -0400 Subject: gnome: Fix gtkdoc generation install_scripts used to replace @BUILD_ROOT@ and @SOURCE_ROOT@ but it was not documented and got removed in Meson 0.58.0. gnome.gtkdoc() was relying on that behaviour, but it has always been broken in the case the source or build directory contains spaces. Fix this by changing get_include_args() to substitue paths directly which will then get escaped correctly. Add a unit test that builds GObject documentation which is where this issue has been spotted. Fixes: #8744 --- mesonbuild/modules/hotdoc.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'mesonbuild/modules/hotdoc.py') diff --git a/mesonbuild/modules/hotdoc.py b/mesonbuild/modules/hotdoc.py index bf8cd229c..89a5d938e 100644 --- a/mesonbuild/modules/hotdoc.py +++ b/mesonbuild/modules/hotdoc.py @@ -22,7 +22,6 @@ from mesonbuild import mlog, build from mesonbuild.coredata import MesonException from . import ModuleReturnValue from . import ExtensionModule -from . import get_include_args from ..dependencies import Dependency, InternalDependency from ..interpreterbase import FeatureNew, InvalidArguments, noPosargs, noKwargs from ..interpreter import CustomTargetHolder @@ -191,7 +190,7 @@ class HotdocTargetBuilder: for dep in mesonlib.listify(ensure_list(deps)): dep = getattr(dep, "held_object", dep) if isinstance(dep, InternalDependency): - inc_args = get_include_args(dep.include_directories) + inc_args = self.state.get_include_args(dep.include_directories) cflags.update([self.replace_dirs_in_string(x) for x in inc_args]) cflags.update(self.process_dependencies(dep.libraries)) -- cgit v1.2.3