summaryrefslogtreecommitdiff
path: root/docs/reference
diff options
context:
space:
mode:
authorIñigo Martínez <inigomartinez@gmail.com>2021-04-22 23:57:36 +0200
committerIñigo Martínez <inigomartinez@gmail.com>2021-05-03 22:18:24 +0200
commita4decd1bd2dbcda163e72abbd68894b2b396e969 (patch)
tree1159bbb5435b1a69d9eeb54156a5633eaff5a3b0 /docs/reference
parent13883cd5c4d28dbed3c49008430c7dbbae8d5ef0 (diff)
build: port to 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.
Diffstat (limited to 'docs/reference')
-rw-r--r--docs/reference/libmbim-glib/meson.build67
-rw-r--r--docs/reference/libmbim-glib/xml/gtkdocentities.ent.in7
-rw-r--r--docs/reference/libmbim-glib/xml/meson.build17
3 files changed, 91 insertions, 0 deletions
diff --git a/docs/reference/libmbim-glib/meson.build b/docs/reference/libmbim-glib/meson.build
new file mode 100644
index 0000000..ae7ac0c
--- /dev/null
+++ b/docs/reference/libmbim-glib/meson.build
@@ -0,0 +1,67 @@
+# SPDX-License-Identifier: GPL-2
+# Copyright (C) 2021 Iñigo Martinez <inigomartinez@gmail.com>
+
+subdir('xml')
+
+doc_module = 'libmbim-glib'
+
+src_dirs = [
+ generated_inc,
+ libmbim_glib_inc,
+]
+
+private_headers = [
+ 'mbim-helpers.h',
+ 'mbim-message-private.h',
+ 'mbim-net-port-manager.h',
+]
+
+scan_args = [
+ '--rebuild-types',
+ '--deprecated-guards="MBIM_DISABLE_DEPRECATED"',
+]
+
+glib_prefix = glib_dep.get_pkgconfig_variable('prefix')
+
+fixxref_args = [
+ '--html-dir=' + join_paths(mbim_prefix, gnome.gtkdoc_html_dir(doc_module)),
+ '--extra-dir=' + join_paths(glib_prefix, gnome.gtkdoc_html_dir('glib')),
+ '--extra-dir=' + join_paths(glib_prefix, gnome.gtkdoc_html_dir('gio')),
+]
+
+name = doc_module + '-sections.txt'
+
+'''
+FIXME: gen_sections should be used in the `input` field but it would add
+ a dependency over file paths that are not yet created, so
+ the `depends` section is used to generate alternate dependency.
+ This is fixed in newer meson versions.
+'''
+sections_txt = custom_target(
+ name,
+ input: 'libmbim-glib-common.sections',
+ output: name,
+ capture: true,
+ command: [find_program('cat'), '@INPUT@'] + gen_sections,
+ depends: gen_sections_deps,
+)
+
+version_xml = configure_file(
+ input: 'version.xml.in',
+ output: '@BASENAME@',
+ configuration: version_conf,
+)
+
+gnome.gtkdoc(
+ doc_module,
+ main_xml: doc_module + '-docs.xml',
+ src_dir: src_dirs,
+ ignore_headers: private_headers,
+ include_directories: top_inc,
+ gobject_typesfile: doc_module + '.types',
+ dependencies: libmbim_glib_dep,
+ namespace: 'mbim',
+ scan_args: scan_args,
+ fixxref_args: fixxref_args,
+ install: true,
+)
diff --git a/docs/reference/libmbim-glib/xml/gtkdocentities.ent.in b/docs/reference/libmbim-glib/xml/gtkdocentities.ent.in
new file mode 100644
index 0000000..fd86c16
--- /dev/null
+++ b/docs/reference/libmbim-glib/xml/gtkdocentities.ent.in
@@ -0,0 +1,7 @@
+<!ENTITY package "@PACKAGE@">
+<!ENTITY package_bugreport "@PACKAGE_BUGREPORT@">
+<!ENTITY package_name "@PACKAGE_NAME@">
+<!ENTITY package_string "@PACKAGE_STRING@">
+<!ENTITY package_tarname "@PACKAGE_TARNAME@">
+<!ENTITY package_url "@PACKAGE_URL@">
+<!ENTITY package_version "@PACKAGE_VERSION@">
diff --git a/docs/reference/libmbim-glib/xml/meson.build b/docs/reference/libmbim-glib/xml/meson.build
new file mode 100644
index 0000000..990213c
--- /dev/null
+++ b/docs/reference/libmbim-glib/xml/meson.build
@@ -0,0 +1,17 @@
+# SPDX-License-Identifier: GPL-2
+# Copyright (C) 2021 Iñigo Martinez <inigomartinez@gmail.com>
+
+ent_conf = configuration_data()
+ent_conf.set('PACKAGE', meson.project_name())
+ent_conf.set('PACKAGE_BUGREPORT', meson.project_name() + '-devel@lists.freedesktop.org')
+ent_conf.set('PACKAGE_NAME', meson.project_name())
+ent_conf.set('PACKAGE_STRING', '@0@ @1@'.format(meson.project_name(), mbim_version))
+ent_conf.set('PACKAGE_TARNAME', meson.project_name())
+ent_conf.set('PACKAGE_URL', '')
+ent_conf.set('PACKAGE_VERSION', mbim_version)
+
+gtkdocentities_ent = configure_file(
+ input: 'gtkdocentities.ent.in',
+ output: '@BASENAME@',
+ configuration: ent_conf,
+)