2021-02-10 13:41:53 +00:00
|
|
|
# XXX: gi-docgen needs a deps file
|
2020-05-23 01:56:39 +00:00
|
|
|
expand_content_md_files = [
|
2021-02-18 12:59:09 +00:00
|
|
|
'overview.md',
|
2020-05-24 14:55:02 +00:00
|
|
|
'broadway.md',
|
|
|
|
'osx.md',
|
|
|
|
'wayland.md',
|
|
|
|
'windows.md',
|
2020-05-24 15:42:52 +00:00
|
|
|
'x11.md',
|
2020-05-24 04:22:31 +00:00
|
|
|
'getting_started.md',
|
2021-02-18 12:59:09 +00:00
|
|
|
'initialization.md',
|
2020-05-24 15:07:45 +00:00
|
|
|
'resources.md',
|
2020-05-24 04:04:36 +00:00
|
|
|
'building.md',
|
|
|
|
'compiling.md',
|
|
|
|
'running.md',
|
2020-05-23 01:56:39 +00:00
|
|
|
'migrating-2to4.md',
|
|
|
|
'migrating-3to4.md',
|
|
|
|
'actions.md',
|
|
|
|
'input-handling.md',
|
2020-05-24 01:32:35 +00:00
|
|
|
'drawing-model.md',
|
|
|
|
'css-overview.md',
|
2020-05-24 15:42:52 +00:00
|
|
|
'css-properties.md',
|
2020-07-08 13:42:32 +00:00
|
|
|
'section-accessibility.md',
|
2020-05-24 15:42:52 +00:00
|
|
|
'section-text-widget.md',
|
|
|
|
'section-tree-widget.md',
|
2020-05-29 20:10:34 +00:00
|
|
|
'section-list-widget.md',
|
2020-05-24 18:25:25 +00:00
|
|
|
'question_index.md',
|
2021-02-19 18:03:20 +00:00
|
|
|
'visual_index.md'
|
2020-05-23 01:56:39 +00:00
|
|
|
]
|
|
|
|
|
2022-04-18 15:56:43 +00:00
|
|
|
gtk_images = []
|
|
|
|
|
|
|
|
subdir('images')
|
|
|
|
|
2019-07-01 16:57:16 +00:00
|
|
|
if get_option('gtk_doc')
|
2021-07-31 18:08:34 +00:00
|
|
|
gtk4_toml = configure_file(
|
|
|
|
input: 'gtk4.toml.in',
|
|
|
|
output: 'gtk4.toml',
|
|
|
|
configuration: toml_conf,
|
|
|
|
install: true,
|
|
|
|
install_dir: docs_dir / 'gtk4',
|
|
|
|
)
|
|
|
|
|
2021-02-10 13:41:53 +00:00
|
|
|
custom_target('gtk4-doc',
|
|
|
|
input: [ gtk4_toml, gtk_gir[0] ],
|
|
|
|
output: 'gtk4',
|
|
|
|
command: [
|
|
|
|
gidocgen,
|
|
|
|
'generate',
|
2021-11-01 13:00:51 +00:00
|
|
|
gidocgen_common_args,
|
2021-02-10 13:41:53 +00:00
|
|
|
'--add-include-path=@0@'.format(meson.current_build_dir() / '../../../gtk'),
|
|
|
|
'--config=@INPUT0@',
|
|
|
|
'--output-dir=@OUTPUT@',
|
2022-04-18 15:56:43 +00:00
|
|
|
'--content-dir=@0@'.format(meson.current_build_dir()),
|
2021-02-10 13:41:53 +00:00
|
|
|
'--content-dir=@0@'.format(meson.current_source_dir()),
|
|
|
|
'@INPUT1@',
|
2020-12-15 12:31:38 +00:00
|
|
|
],
|
2022-04-18 15:56:43 +00:00
|
|
|
depends: [ gdk_gir[0], gsk_gir[0] ] + gtk_images,
|
2021-02-10 13:41:53 +00:00
|
|
|
depend_files: [ expand_content_md_files ],
|
|
|
|
build_by_default: true,
|
2021-03-12 11:13:54 +00:00
|
|
|
install: true,
|
|
|
|
install_dir: docs_dir,
|
2020-12-15 12:31:38 +00:00
|
|
|
)
|
2019-05-25 16:27:32 +00:00
|
|
|
endif
|
2017-05-05 10:34:05 +00:00
|
|
|
|
2022-03-19 10:41:32 +00:00
|
|
|
rst2man = find_program('rst2man', 'rst2man.py', required: false)
|
2021-09-24 16:54:41 +00:00
|
|
|
if get_option('man-pages') and not rst2man.found()
|
|
|
|
error('No rst2man found, but man pages were explicitly enabled')
|
2017-05-05 10:34:05 +00:00
|
|
|
endif
|
|
|
|
|
2021-09-24 16:54:41 +00:00
|
|
|
if get_option('man-pages') and rst2man.found()
|
|
|
|
rst_files = [
|
|
|
|
[ 'gtk4-broadwayd', '1' ],
|
|
|
|
[ 'gtk4-builder-tool', '1' ],
|
2017-05-05 10:34:05 +00:00
|
|
|
[ 'gtk4-encode-symbolic-svg', '1', ],
|
|
|
|
[ 'gtk4-launch', '1', ],
|
|
|
|
[ 'gtk4-query-settings', '1', ],
|
|
|
|
[ 'gtk4-update-icon-cache', '1', ],
|
|
|
|
]
|
|
|
|
|
2021-04-14 02:48:39 +00:00
|
|
|
if get_option('demos')
|
2021-09-24 16:54:41 +00:00
|
|
|
rst_files += [
|
2021-04-14 02:48:39 +00:00
|
|
|
[ 'gtk4-demo', '1', ],
|
|
|
|
[ 'gtk4-demo-application', '1', ],
|
|
|
|
[ 'gtk4-widget-factory', '1', ],
|
|
|
|
[ 'gtk4-icon-browser', '1', ],
|
2022-05-07 03:48:13 +00:00
|
|
|
[ 'gtk4-node-editor', '1', ],
|
2021-04-14 02:48:39 +00:00
|
|
|
]
|
|
|
|
endif
|
|
|
|
|
2021-09-24 16:54:41 +00:00
|
|
|
rst2man_flags = [
|
|
|
|
'--syntax-highlight=none',
|
|
|
|
]
|
|
|
|
|
|
|
|
foreach rst: rst_files
|
|
|
|
man_name = rst[0]
|
|
|
|
man_section = rst.get(1, '1')
|
|
|
|
|
|
|
|
custom_target('man-@0@'.format(man_name),
|
|
|
|
input: '@0@.rst'.format(man_name),
|
2020-12-15 12:31:38 +00:00
|
|
|
output: '@0@.@1@'.format(man_name, man_section),
|
|
|
|
command: [
|
2021-09-24 16:54:41 +00:00
|
|
|
rst2man,
|
|
|
|
rst2man_flags,
|
2020-12-15 12:31:38 +00:00
|
|
|
'@INPUT@',
|
|
|
|
],
|
2021-09-24 16:54:41 +00:00
|
|
|
capture: true,
|
2020-12-15 12:31:38 +00:00
|
|
|
install: true,
|
2021-09-24 16:54:41 +00:00
|
|
|
install_dir: get_option('mandir') / 'man@0@'.format(man_section),
|
2020-12-15 12:31:38 +00:00
|
|
|
)
|
2017-05-05 10:34:05 +00:00
|
|
|
endforeach
|
|
|
|
endif
|