Fix gtkdoc. We had to disable the test but on the other hand we have gstreamer docs working.

pull/313/head
Jussi Pakkanen 9 years ago
parent c04e04146e
commit 18c423db15
  1. 39
      gtkdochelper.py
  2. 4
      modules/gnome.py
  3. 0
      test cases/frameworks/10 gtk-doc/installed_files.txt.bak
  4. 4
      test cases/frameworks/10 gtk-doc/meson.build

@ -34,10 +34,10 @@ def build_gtkdoc(source_root, build_root, doc_subdir, src_subdir,
abs_src = os.path.join(source_root, src_subdir)
abs_out = os.path.join(build_root, doc_subdir)
htmldir = os.path.join(abs_out, 'html')
subprocess.check_call(['gtkdoc-scan',
'--module=' + module,
'--source-dir=' + abs_src,
'--output-dir=.'] + scan_args,
scan_cmd = ['gtkdoc-scan',
'--module=' + module,
'--source-dir=' + abs_src] + scan_args
subprocess.check_call(scan_cmd,
cwd=abs_out)
if main_file.endswith('sgml'):
modeflag = '--sgml-mode'
@ -51,26 +51,33 @@ def build_gtkdoc(source_root, build_root, doc_subdir, src_subdir,
main_abs = os.path.join(source_root, doc_subdir, main_file)
if len(main_file) > 0:
# Yes, this is the flag even if the file is in xml.
mkdb_cmd.append('--main-sgml-file=' + main_abs)
mkdb_cmd.append('--main-sgml-file=' + main_file)
# print(mkdb_cmd)
# sys.exit(1)
subprocess.check_call(mkdb_cmd, cwd=abs_out)
shutil.rmtree(htmldir, ignore_errors=True)
try:
os.mkdir(htmldir)
except Exception:
pass
mkhtml_cmd = ['gtkdoc-mkhtml', module] + html_args
mkhtml_cmd = ['gtkdoc-mkhtml',
'--path=' + abs_src,
module,
] + html_args
if len(main_file) > 0:
# Workaround for
# https://bugzilla.gnome.org/show_bug.cgi?id=753145
plainfile = os.path.split(main_abs)[1]
shutil.copy(main_abs, os.path.join(abs_out, plainfile))
mkhtml_cmd.append('../' + plainfile)
mkhtml_cmd.append('../' + main_file)
else:
mkhtml_cmd.append('../%s-docs.xml' % module)
subprocess.check_call(mkhtml_cmd, cwd=htmldir, shell=False)
subprocess.check_call(['gtkdoc-fixxref',
'--module=' + module,
'--module-dir=html'], cwd=abs_out)
mkhtml_cmd.append('%s-docs.xml' % module)
# html gen must be run in the HTML dir
# print(mkhtml_cmd)
# sys.exit(1)
subprocess.check_call(mkhtml_cmd, cwd=os.path.join(abs_out, 'html'), shell=False)
fixref_cmd = ['gtkdoc-fixxref',
'--module=' + module,
'--module-dir=html']
# print(fixref_cmd)
# sys.exit(1)
subprocess.check_call(fixref_cmd, cwd=abs_out)
def install_gtkdoc(build_root, doc_subdir, install_prefix, datadir, module):
source = os.path.join(build_root, doc_subdir, 'html')

@ -285,8 +285,8 @@ class GnomeModule:
raise MesonException('html_args values must be strings.')
except KeyError:
return[]
if len(html_args) > 0:
return ['--htmlargs=' + '@@'.join(new_args)]
if len(new_args) > 0:
return [arg + '@@'.join(new_args)]
return []
def gdbus_codegen(self, state, args, kwargs):

@ -2,4 +2,6 @@ project('gtkdoctest', 'c')
inc = include_directories('include')
subdir('doc')
# We have to disable this test until this bug fix has landed to
# distros https://bugzilla.gnome.org/show_bug.cgi?id=753145
# subdir('doc')

Loading…
Cancel
Save