gtkdoc: Run gtkdoc-scangobj command from build directory

All paths in CFLAGS are relative to build_root, so current directory
must be there we invoking gtkdoc-scangobj.

Closes: #3379
pull/3208/merge
Xavier Claessens 7 years ago committed by Jussi Pakkanen
parent 8d5361bb1d
commit c5cb65eb7c
  1. 2
      mesonbuild/modules/gnome.py
  2. 5
      mesonbuild/scripts/gtkdochelper.py

@ -870,6 +870,8 @@ This will become a hard error in the future.''')
for i in new_args: for i in new_args:
if expend_file_state and isinstance(i, mesonlib.File): if expend_file_state and isinstance(i, mesonlib.File):
i = i.absolute_path(expend_file_state.environment.get_source_dir(), expend_file_state.environment.get_build_dir()) i = i.absolute_path(expend_file_state.environment.get_source_dir(), expend_file_state.environment.get_build_dir())
elif expend_file_state and isinstance(i, str):
i = os.path.join(expend_file_state.environment.get_source_dir(), expend_file_state.subdir, i)
elif not isinstance(i, str): elif not isinstance(i, str):
raise MesonException(kwarg_name + ' values must be strings.') raise MesonException(kwarg_name + ' values must be strings.')
args.append(i) args.append(i)

@ -122,7 +122,8 @@ def build_gtkdoc(source_root, build_root, doc_subdir, src_subdirs,
'--module=' + module, '--module=' + module,
'--cflags=' + cflags, '--cflags=' + cflags,
'--ldflags=' + ldflags, '--ldflags=' + ldflags,
'--ld=' + ld] '--ld=' + ld,
'--output-dir=' + abs_out]
library_paths = [] library_paths = []
for ldflag in shlex.split(ldflags): for ldflag in shlex.split(ldflags):
@ -132,7 +133,7 @@ def build_gtkdoc(source_root, build_root, doc_subdir, src_subdirs,
library_paths.append(os.environ['LD_LIBRARY_PATH']) library_paths.append(os.environ['LD_LIBRARY_PATH'])
library_path = ':'.join(library_paths) library_path = ':'.join(library_paths)
gtkdoc_run_check(scanobjs_cmd, abs_out, library_path) gtkdoc_run_check(scanobjs_cmd, build_root, library_path)
# Make docbook files # Make docbook files
if mode == 'auto': if mode == 'auto':

Loading…
Cancel
Save