summaryrefslogtreecommitdiff
path: root/man
diff options
context:
space:
mode:
authorIñigo Martínez <inigomartinez@gmail.com>2017-11-25 11:39:06 +0100
committerThomas Haller <thaller@redhat.com>2017-12-13 15:48:50 +0100
commit03637ad8b5d21fcc12a536a25caf46445aabde73 (patch)
tree3330fed2a9ad0f45c0c993a8aac6d3dee42ed101 /man
parente96fabfc186510808cee1bf6aaaa28f460f1cea5 (diff)
downloadNetworkManager-03637ad8b5d21fcc12a536a25caf46445aabde73.tar.gz
build: add initial support for meson build system
meson is a build system focused on speed an ease of use, which helps speeding up the software development. This patch adds meson support along autotools. [thaller@redhat.com: rebased patch and adjusted for iwd support] https://mail.gnome.org/archives/networkmanager-list/2017-December/msg00022.html
Diffstat (limited to 'man')
-rw-r--r--man/meson.build98
1 files changed, 98 insertions, 0 deletions
diff --git a/man/meson.build b/man/meson.build
new file mode 100644
index 0000000000..044ddcaba4
--- /dev/null
+++ b/man/meson.build
@@ -0,0 +1,98 @@
+common_conf = configuration_data()
+common_conf.set('NM_VERSION', nm_version)
+common_conf.set('sysconfdir', nm_sysconfdir)
+common_conf.set('nmrundir', nm_pkgrundir)
+common_conf.set('NM_CONFIG_DEFAULT_MAIN_AUTH_POLKIT_TEXT', config_default_main_auth_polkit)
+common_conf.set('NM_CONFIG_DEFAULT_LOGGING_BACKEND_TEXT', config_logging_backend_default)
+common_conf.set('NM_CONFIG_DEFAULT_LOGGING_AUDIT_TEXT', config_default_logging_audit)
+common_conf.set('NM_CONFIG_DEFAULT_MAIN_RC_MANAGER', config_dns_rc_manager_default)
+common_conf.set('NM_CONFIG_DEFAULT_MAIN_DHCP', config_dhcp_default)
+
+common = 'common.ent'
+
+configure_file(
+ input: common + '.in',
+ output: common,
+ configuration: common_conf
+)
+
+xsltproc_options = [
+ xsltproc,
+ '--output', '@OUTPUT@',
+ '--path', meson.current_build_dir(),
+ '--xinclude',
+ '--nonet',
+ '--stringparam', 'man.output.quietly', '1',
+ '--stringparam', 'funcsynopsis.style', 'ansi',
+ '--stringparam', 'man.th.extra1.suppress', '1',
+ '--stringparam', 'man.authors.section.enabled', '0',
+ '--stringparam', 'man.copyright.section.enabled', '0',
+ '--stringparam', 'man.th.title.max.length', '30'
+]
+
+docbook_xls = 'http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl'
+
+mans_xmls = []
+
+mans = [
+ ['NetworkManager', '8'],
+ ['NetworkManager.conf', '5'],
+ ['nm-online', '1'],
+ ['nmcli-examples', '7'],
+ ['nmcli', '1'],
+ ['nmtui', '1']
+]
+
+if enable_ovs
+ mans += [['nm-openvswitch', '7']]
+endif
+
+foreach man: mans
+ input = man[0] + '.xml'
+ content_files += join_paths(meson.current_source_dir(), input)
+
+ output = '@0@.@1@'.format(man[0], man[1])
+
+ custom_target(
+ output,
+ input: input,
+ output: output,
+ command: xsltproc_options + [docbook_xls, '@INPUT@'],
+ install: true,
+ install_dir: join_paths(nm_mandir, 'man' + man[1])
+ )
+endforeach
+
+if enable_introspection
+ mans = [
+ ['nm-settings-keyfile', '5', nm_settings_keyfile_docs],
+ ['nm-settings', '5', nm_settings_docs]
+ ]
+
+ if enable_ifcfg_rh
+ mans += [['nm-settings-ifcfg-rh', '5', nm_settings_ifcfg_rh_docs]]
+ endif
+
+ foreach man: mans
+ output = man[0] + '.xml'
+
+ input = custom_target(
+ output,
+ input: man[2],
+ output: output,
+ command: xsltproc_options + [join_paths(meson.current_source_dir(), man[0] + '.xsl'), '@INPUT@']
+ )
+ content_files += input.full_path()
+
+ output = '@0@.@1@'.format(man[0], man[1])
+
+ custom_target(
+ output,
+ input: input,
+ output: output,
+ command: xsltproc_options + [docbook_xls, '@INPUT@'],
+ install: true,
+ install_dir: join_paths(nm_mandir, 'man' + man[1])
+ )
+ endforeach
+endif