diff --git a/man/meson.build b/man/meson.build index 502c36b08e..5a8e520429 100644 --- a/man/meson.build +++ b/man/meson.build @@ -1,5 +1,52 @@ # SPDX-License-Identifier: LGPL-2.1-or-later +mans = [ + ['NetworkManager', '8'], + ['NetworkManager-dispatcher', '8'], + ['NetworkManager-wait-online.service', '8'], + ['NetworkManager.conf', '5'], + ['nm-online', '1'], + ['nmcli-examples', '7'], + ['nmcli', '1'], + ['nmtui', '1'], + ['nm-initrd-generator', '8'], +] + +if enable_ovs + mans += [['nm-openvswitch', '7']] +endif + +if enable_nm_cloud_setup + mans += [['nm-cloud-setup', '8']] +endif + +introspection_mans = [ + ['nm-settings-keyfile', '5'], + ['nm-settings-dbus', '5'], + ['nm-settings-nmcli', '5'], +] + +if enable_ifcfg_rh + introspection_mans += [['nm-settings-ifcfg-rh', '5']] +endif + +built_mans = [] +foreach man: mans + introspection_mans + name = man[0] + '.' + man[1] + if not fs.exists(name) + built_mans = [] + break + endif + + built_mans += name +endforeach + +if built_mans.length() > 0 + install_man(built_mans) + subdir_done() +endif + + common_ent_file = configure_file( input: 'common.ent.in', output: '@BASENAME@', @@ -24,26 +71,6 @@ docbook_xls = 'http://docbook.sourceforge.net/release/xsl/current/manpages/docbo mans_xmls = [] -mans = [ - ['NetworkManager', '8'], - ['NetworkManager-dispatcher', '8'], - ['NetworkManager-wait-online.service', '8'], - ['NetworkManager.conf', '5'], - ['nm-online', '1'], - ['nmcli-examples', '7'], - ['nmcli', '1'], - ['nmtui', '1'], - ['nm-initrd-generator', '8'], -] - -if enable_ovs - mans += [['nm-openvswitch', '7']] -endif - -if enable_nm_cloud_setup - mans += [['nm-cloud-setup', '8']] -endif - foreach man: mans input = man[0] + '.xml' content_files += join_paths(meson.current_source_dir(), input) diff --git a/meson.build b/meson.build index 05fa16811a..c03d98c15b 100644 --- a/meson.build +++ b/meson.build @@ -12,7 +12,7 @@ project( 'c_std=gnu11', 'warning_level=2' # value "2" will add "-Wall" and "-Wextra" to the compiler flags ], - meson_version: '>= 0.51.0', + meson_version: '>= 0.53.0', ) nm_name = meson.project_name() @@ -77,6 +77,7 @@ libnm_version = '@0@.@1@.@2@'.format(current - age, age, revision) libnm_pkgincludedir = join_paths(nm_includedir, libnm_name) +fs = import('fs') gnome = import('gnome') i18n = import('i18n') pkg = import('pkgconfig')