mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-07-03 09:23:24 +00:00
devel-docs, meson: g-ir-doc option to generate introspected API docs.
Similar to the --enable-g-ir-doc option I just added on autotools. Also separate this option from gtk-doc as it is unrelated (not everything under devel-docs is related to gtk-doc!).
This commit is contained in:
parent
4b39217181
commit
eae3d47e32
4 changed files with 127 additions and 121 deletions
|
@ -1,5 +1,3 @@
|
|||
if gir_doc_tool.found() and yelp_build.found()
|
||||
|
||||
# XXX meson does not allow building into subdir:
|
||||
# https://github.com/mesonbuild/meson/issues/2320
|
||||
# Otherwise I could use '-o', '@OUTDIR@' into following commands if
|
||||
|
@ -10,10 +8,12 @@ if gir_doc_tool.found() and yelp_build.found()
|
|||
output: [ 'html-dirs' ],
|
||||
command: [
|
||||
'mkdir', '-p',
|
||||
'@OUTDIR@' + '/pages/Python/GimpUi-' + gimp_api_version,
|
||||
'@OUTDIR@' + '/pages/Python/Gimp-' + gimp_api_version,
|
||||
'@OUTDIR@' + '/html/Python/GimpUi-' + gimp_api_version,
|
||||
'@OUTDIR@' + '/html/Python/Gimp-' + gimp_api_version
|
||||
],
|
||||
build_by_default: false)
|
||||
build_by_default: true)
|
||||
|
||||
# XXX `output` is bogus. g-ir-doc-tool produces a lot of output,
|
||||
# basically one page per public symbol, which is more than 1000 so
|
||||
|
@ -34,10 +34,10 @@ if gir_doc_tool.found() and yelp_build.found()
|
|||
'-I', prefix / 'share/gir-1.0/',
|
||||
'-I', meson.build_root() / 'libgimp',
|
||||
'--language=Python',
|
||||
'-o', '@OUTDIR@' + '/html/Python/Gimp-' + gimp_api_version,
|
||||
'-o', '@OUTDIR@' + '/pages/Python/Gimp-' + gimp_api_version,
|
||||
'@INPUT@'
|
||||
],
|
||||
build_by_default: false)
|
||||
build_by_default: true)
|
||||
|
||||
## Gimp Module ##
|
||||
|
||||
|
@ -46,10 +46,10 @@ if gir_doc_tool.found() and yelp_build.found()
|
|||
output: [ 'Gimp-python-cache' ],
|
||||
command: [
|
||||
yelp_build, 'cache',
|
||||
'-o', '@OUTDIR@' + '/html/Python/Gimp-' + gimp_api_version + '/index.cache',
|
||||
'@OUTDIR@' + '/html/Python/Gimp-' + gimp_api_version,
|
||||
'-o', '@OUTDIR@' + '/pages/Python/Gimp-' + gimp_api_version + '/index.cache',
|
||||
'@OUTDIR@' + '/pages/Python/Gimp-' + gimp_api_version,
|
||||
],
|
||||
build_by_default: false)
|
||||
build_by_default: true)
|
||||
|
||||
gir_html_python = custom_target('g-ir-Gimp-python-html',
|
||||
input: [ gir_cache_python ],
|
||||
|
@ -65,8 +65,9 @@ if gir_doc_tool.found() and yelp_build.found()
|
|||
command: [
|
||||
'yelp-build', 'html',
|
||||
'-o', '@OUTDIR@' + '/html/Python/Gimp-' + gimp_api_version,
|
||||
'@OUTDIR@' + '/html/Python/Gimp-' + gimp_api_version,
|
||||
])
|
||||
'@OUTDIR@' + '/pages/Python/Gimp-' + gimp_api_version,
|
||||
],
|
||||
build_by_default: true)
|
||||
|
||||
## GimpUi module ##
|
||||
|
||||
|
@ -79,20 +80,20 @@ if gir_doc_tool.found() and yelp_build.found()
|
|||
'-I', prefix / 'share/gir-1.0/',
|
||||
'-I', meson.build_root() / 'libgimp',
|
||||
'--language=Python',
|
||||
'-o', '@OUTDIR@' + '/html/Python/GimpUi-' + gimp_api_version,
|
||||
'-o', '@OUTDIR@' + '/pages/Python/GimpUi-' + gimp_api_version,
|
||||
'@INPUT@'
|
||||
],
|
||||
build_by_default: false)
|
||||
build_by_default: true)
|
||||
|
||||
gir_cache_python = custom_target('g-ir-GimpUi-python-cache',
|
||||
input: [ gir_docs_python ],
|
||||
output: [ 'GimpUi-python-cache' ],
|
||||
command: [
|
||||
yelp_build, 'cache',
|
||||
'-o', '@OUTDIR@' + '/html/Python/GimpUi-' + gimp_api_version + '/index.cache',
|
||||
'@OUTDIR@' + '/html/Python/GimpUi-' + gimp_api_version,
|
||||
'-o', '@OUTDIR@' + '/pages/Python/GimpUi-' + gimp_api_version + '/index.cache',
|
||||
'@OUTDIR@' + '/pages/Python/GimpUi-' + gimp_api_version,
|
||||
],
|
||||
build_by_default: false)
|
||||
build_by_default: true)
|
||||
|
||||
gir_html_python = custom_target('g-ir-GimpUi-python-html',
|
||||
input: [ gir_cache_python ],
|
||||
|
@ -102,9 +103,8 @@ if gir_doc_tool.found() and yelp_build.found()
|
|||
command: [
|
||||
'yelp-build', 'html',
|
||||
'-o', '@OUTDIR@' + '/html/Python/GimpUi-' + gimp_api_version,
|
||||
'@OUTDIR@' + '/html/Python/GimpUi-' + gimp_api_version,
|
||||
])
|
||||
'@OUTDIR@' + '/pages/Python/GimpUi-' + gimp_api_version,
|
||||
],
|
||||
build_by_default: true)
|
||||
|
||||
## TODO: a unit test using yelp-check would be useful.
|
||||
|
||||
endif
|
||||
|
|
|
@ -17,6 +17,7 @@ mkdb_args_common = [
|
|||
]
|
||||
|
||||
|
||||
if get_option('gtk-doc')
|
||||
if get_option('gtk-doc-app')
|
||||
subdir('app')
|
||||
endif
|
||||
|
@ -30,4 +31,8 @@ subdir('libgimpmodule')
|
|||
subdir('libgimpthumb')
|
||||
subdir('libgimpwidgets')
|
||||
subdir('tools')
|
||||
endif
|
||||
|
||||
if get_option('g-ir-doc')
|
||||
subdir('g-ir-docs')
|
||||
endif
|
||||
|
|
14
meson.build
14
meson.build
|
@ -1012,10 +1012,10 @@ desktop_validate = find_program('desktop-file-validate', required: false)
|
|||
appstream_util = find_program('appstream-util', required: get_option('appdata-test'))
|
||||
|
||||
# Check for doc generation tools
|
||||
have_gtk_doc = get_option('gtk-doc')
|
||||
|
||||
gir_doc_tool = find_program('g-ir-doc-tool', required: false)
|
||||
yelp_build = find_program('yelp-build', required: false)
|
||||
if get_option('g-ir-doc')
|
||||
gir_doc_tool = find_program('g-ir-doc-tool', required: true)
|
||||
yelp_build = find_program('yelp-build', required: true)
|
||||
endif
|
||||
|
||||
# Check for vector icons
|
||||
have_vector_icons = get_option('vec-icons')
|
||||
|
@ -1657,10 +1657,7 @@ subdir('app-tools')
|
|||
|
||||
# Docs
|
||||
subdir('docs')
|
||||
if have_gtk_doc
|
||||
subdir('devel-docs')
|
||||
endif
|
||||
|
||||
|
||||
|
||||
pkgconfig.generate(libgimp,
|
||||
|
@ -1803,6 +1800,9 @@ final_message = [
|
|||
''' Use xvfb-run @0@'''.format(xvfb_run.found()),
|
||||
''' Test appdata @0@'''.format(appstream_util.found()),
|
||||
'',
|
||||
'''Documentation:''',
|
||||
''' GObject Introspection: @0@'''.format(get_option('g-ir-doc')),
|
||||
'',
|
||||
'''Bug report URL: @0@'''.format(bug_report_url),
|
||||
]
|
||||
|
||||
|
|
|
@ -51,6 +51,7 @@ option('headless-tests', type: 'feature', value: 'auto', description: 'Use xv
|
|||
|
||||
option('gtk-doc', type: 'boolean', value: true, description: 'Build developer documentation')
|
||||
option('gtk-doc-app', type: 'boolean', value: false, description: 'Build developer documentation for app')
|
||||
option('g-ir-doc', type: 'boolean', value: false, description: 'Build developer documentation for introspected API')
|
||||
|
||||
option('linux-input', type: 'feature', value: 'auto', description: 'Linux input event controller module')
|
||||
option('vec-icons', type: 'boolean', value: true, description: 'Use vector icons rather than raster ones')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue