meson: Don't make the man pages build depend on the documentation option

Include all meson build files under docs/ and check with get_option() there.
This commit is contained in:
Christoph Reiter
2019-03-31 13:22:16 +02:00
parent 6a37e2d19e
commit e47440def5
7 changed files with 101 additions and 89 deletions

View File

@ -39,7 +39,10 @@ export CCACHE_DIR="${CCACHE_BASEDIR}/_ccache"
ccache --zero-stats
ccache --show-stats
meson _build
meson \
-Dman-pages=true \
_build
ninja -C _build
ccache --show-stats

View File

@ -154,6 +154,8 @@ if wayland_enabled
src_dir += [ gdkwayland_inc ]
endif
if get_option('documentation')
configure_file(input: 'version.xml.in', output: 'version.xml', configuration: version_conf)
gnome.gtkdoc('gdk3',
@ -175,3 +177,4 @@ gnome.gtkdoc('gdk3',
],
html_assets: images,
install: true)
endif

View File

@ -439,8 +439,6 @@ expand_content_files = [
'tree_widget.sgml',
]
configure_file(input: 'version.xml.in', output: 'version.xml', configuration: version_conf)
types_conf = configuration_data()
if os_win32
types_conf.set('DISABLE_ON_W32', '%')
@ -454,6 +452,10 @@ else
types_conf.set('DISABLE_ON_QUARTZ', '')
endif
if get_option('documentation')
configure_file(input: 'version.xml.in', output: 'version.xml', configuration: version_conf)
gnome.gtkdoc('gtk3',
mode: 'none',
main_xml: 'gtk-docs.sgml',
@ -486,6 +488,7 @@ gnome.gtkdoc('gtk3',
expand_content_files: expand_content_files,
html_assets: images,
install: true)
endif
xsltproc = find_program('xsltproc', required: false)
if get_option('man-pages') and not xsltproc.found()

View File

@ -1,3 +1,4 @@
if get_option('documentation')
configure_file(input: 'version.xml.in', output: 'version.xml', configuration: version_conf)
gnome.gtkdoc('gail-libgail-util3',
@ -17,3 +18,4 @@ gnome.gtkdoc('gail-libgail-util3',
'--extra-dir=../gtk',
],
install: true)
endif

View File

@ -1,3 +1,4 @@
if get_option('documentation')
glib_prefix = dependency('glib-2.0').get_pkgconfig_variable('prefix')
glib_docpath = join_paths(glib_prefix, 'share', 'gtk-doc', 'html')
@ -14,6 +15,7 @@ version_conf.set('GTK_VERSION', meson.project_version())
src_dir_conf = configuration_data()
src_dir_conf.set('SRC_DIR', meson.source_root())
endif
subdir('gdk')
subdir('gtk')

View File

@ -1,4 +1,4 @@
if x11_enabled
if x11_enabled and get_option('documentation')
doc_shooter_sources = [
'shadow.c',
'shooter.c',

View File

@ -877,10 +877,8 @@ endif
subdir('po')
subdir('po-properties')
if get_option('documentation')
subdir('docs/tools')
subdir('docs/reference')
endif
install_data('m4macros/gtk-3.0.m4', install_dir: join_paths(get_option('datadir'), 'aclocal'))
@ -903,6 +901,7 @@ summary = [
' Colord support: @0@'.format(get_option('colord')),
' Introspection: @0@'.format(get_option('introspection')),
' Documentation: @0@'.format(get_option('documentation')),
' Man pages: @0@'.format(get_option('man-pages')),
' Build tests: @0@'.format(get_option('build-tests')),
' Demos: @0@'.format(get_option('demos')),
' Examples: @0@'.format(get_option('build-examples')),