mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-12 20:36:15 +01:00
Build HTML versions of the man pages
And install them in the same directory as the API reference, so it's possible to link them. Fixes: #2896
This commit is contained in:
parent
c02f50f0ba
commit
10fd218666
@ -1,8 +1,17 @@
|
|||||||
|
gio_manpages = [
|
||||||
|
'gapplication',
|
||||||
|
'gdbus-codegen',
|
||||||
|
'gdbus',
|
||||||
|
'gio-querymodules',
|
||||||
|
'gio',
|
||||||
|
'glib-compile-resources',
|
||||||
|
'glib-compile-schemas',
|
||||||
|
'gresource',
|
||||||
|
'gsettings',
|
||||||
|
]
|
||||||
|
|
||||||
if get_option('man-pages').enabled()
|
if get_option('man-pages').enabled()
|
||||||
manpages = ['gapplication', 'gio-querymodules', 'glib-compile-schemas',
|
foreach page: gio_manpages
|
||||||
'glib-compile-resources', 'gsettings', 'gresource', 'gdbus',
|
|
||||||
'gio', 'gdbus-codegen']
|
|
||||||
foreach page : manpages
|
|
||||||
custom_target(page + '-man',
|
custom_target(page + '-man',
|
||||||
input: page + '.rst',
|
input: page + '.rst',
|
||||||
output: page + '.1',
|
output: page + '.1',
|
||||||
@ -19,6 +28,25 @@ if get_option('man-pages').enabled()
|
|||||||
endforeach
|
endforeach
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if get_option('documentation')
|
||||||
|
man_html_path = docs_dir / 'gio-2.0'
|
||||||
|
|
||||||
|
foreach page: gio_manpages
|
||||||
|
custom_target(
|
||||||
|
input: page + '.rst',
|
||||||
|
output: page + '.html',
|
||||||
|
command: [
|
||||||
|
rst2html5,
|
||||||
|
'@INPUT@',
|
||||||
|
],
|
||||||
|
capture: true,
|
||||||
|
install: true,
|
||||||
|
install_dir: man_html_path,
|
||||||
|
install_tag: 'doc',
|
||||||
|
)
|
||||||
|
endforeach
|
||||||
|
endif
|
||||||
|
|
||||||
if get_option('documentation') and enable_gir
|
if get_option('documentation') and enable_gir
|
||||||
expand_content_files = [
|
expand_content_files = [
|
||||||
'dbus-error.md',
|
'dbus-error.md',
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
|
glib_manpages = ['glib-gettextize', 'gtester', 'gtester-report']
|
||||||
|
|
||||||
if get_option('man-pages').enabled()
|
if get_option('man-pages').enabled()
|
||||||
manpages = ['glib-gettextize', 'gtester', 'gtester-report']
|
foreach page: glib_manpages
|
||||||
foreach page : manpages
|
|
||||||
custom_target(page + '-man',
|
custom_target(page + '-man',
|
||||||
input: page + '.rst',
|
input: page + '.rst',
|
||||||
output: page + '.1',
|
output: page + '.1',
|
||||||
@ -20,10 +20,8 @@ endif
|
|||||||
|
|
||||||
if get_option('documentation')
|
if get_option('documentation')
|
||||||
# GVariant specification is currently standalone
|
# GVariant specification is currently standalone
|
||||||
rst2html5 = find_program('rst2html5', 'rst2html5.py', required: false)
|
|
||||||
|
|
||||||
if rst2html5.found()
|
|
||||||
spec_path = docs_dir / 'glib-2.0'
|
spec_path = docs_dir / 'glib-2.0'
|
||||||
|
man_html_path = docs_dir / 'glib-2.0'
|
||||||
|
|
||||||
figures = files(
|
figures = files(
|
||||||
'gvariant-byte-boundaries.svg',
|
'gvariant-byte-boundaries.svg',
|
||||||
@ -50,7 +48,21 @@ if get_option('documentation')
|
|||||||
install_dir: spec_path,
|
install_dir: spec_path,
|
||||||
install_tag: 'doc',
|
install_tag: 'doc',
|
||||||
)
|
)
|
||||||
endif
|
|
||||||
|
foreach page: glib_manpages
|
||||||
|
custom_target(
|
||||||
|
input: page + '.rst',
|
||||||
|
output: page + '.html',
|
||||||
|
command: [
|
||||||
|
rst2html5,
|
||||||
|
'@INPUT@',
|
||||||
|
],
|
||||||
|
capture: true,
|
||||||
|
install: true,
|
||||||
|
install_dir: man_html_path,
|
||||||
|
install_tag: 'doc',
|
||||||
|
)
|
||||||
|
endforeach
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if get_option('documentation') and enable_gir
|
if get_option('documentation') and enable_gir
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
|
gobject_manpages = ['glib-mkenums', 'glib-genmarshal', 'gobject-query']
|
||||||
|
|
||||||
if get_option('man-pages').enabled()
|
if get_option('man-pages').enabled()
|
||||||
manpages = ['glib-mkenums', 'glib-genmarshal', 'gobject-query']
|
foreach page: gobject_manpages
|
||||||
foreach page : manpages
|
|
||||||
custom_target(page + '-man',
|
custom_target(page + '-man',
|
||||||
input: page + '.rst',
|
input: page + '.rst',
|
||||||
output: page + '.1',
|
output: page + '.1',
|
||||||
@ -17,6 +18,25 @@ if get_option('man-pages').enabled()
|
|||||||
endforeach
|
endforeach
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if get_option('documentation')
|
||||||
|
man_html_path = docs_dir / 'gobject-2.0'
|
||||||
|
|
||||||
|
foreach page: gobject_manpages
|
||||||
|
custom_target(
|
||||||
|
input: page + '.rst',
|
||||||
|
output: page + '.html',
|
||||||
|
command: [
|
||||||
|
rst2html5,
|
||||||
|
'@INPUT@',
|
||||||
|
],
|
||||||
|
capture: true,
|
||||||
|
install: true,
|
||||||
|
install_dir: man_html_path,
|
||||||
|
install_tag: 'doc',
|
||||||
|
)
|
||||||
|
endforeach
|
||||||
|
endif
|
||||||
|
|
||||||
if get_option('documentation') and enable_gir
|
if get_option('documentation') and enable_gir
|
||||||
expand_content_files = [
|
expand_content_files = [
|
||||||
'boxed.md',
|
'boxed.md',
|
||||||
|
@ -2648,9 +2648,11 @@ if rst2man.found()
|
|||||||
rst2man_flags = [
|
rst2man_flags = [
|
||||||
'--syntax-highlight=none',
|
'--syntax-highlight=none',
|
||||||
]
|
]
|
||||||
man1_dir = join_paths(glib_prefix, get_option('mandir'), 'man1')
|
man1_dir = glib_prefix / get_option('mandir') / 'man1'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
rst2html5 = find_program('rst2html5', 'rst2html5.py', required: get_option('documentation'))
|
||||||
|
|
||||||
gnome = import('gnome')
|
gnome = import('gnome')
|
||||||
subdir('docs/reference')
|
subdir('docs/reference')
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user