]> git.ipfire.org Git - thirdparty/kmod.git/commitdiff
meson: add support for building the gtk-doc pages
authorEmil Velikov <emil.l.velikov@gmail.com>
Mon, 2 Sep 2024 22:20:18 +0000 (23:20 +0100)
committerLucas De Marchi <lucas.de.marchi@gmail.com>
Fri, 6 Sep 2024 19:38:27 +0000 (14:38 -0500)
v2:
 - track the version.xml dependency

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/94
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
Makefile.am
libkmod/docs/meson.build [new file with mode: 0644]
meson.build
meson_options.txt

index 1a518585841e8dc6dc8e4c5272ccb4b46442efe0..16c5ae609a82d0027d44a50d239f6085ec8c0f53 100644 (file)
@@ -17,6 +17,7 @@ export GCC_COLORS
 
 # meson bits
 EXTRA_DIST += \
+       libkmod/docs/meson.build \
        man/meson.build \
        meson.build \
        meson_options.txt \
diff --git a/libkmod/docs/meson.build b/libkmod/docs/meson.build
new file mode 100644 (file)
index 0000000..ff0132c
--- /dev/null
@@ -0,0 +1,22 @@
+gnome = import('gnome')
+
+version_file = configure_file(
+  input: 'version.xml.in',
+  output: 'version.xml',
+  configuration: cdata,
+)
+
+gnome.gtkdoc(
+  'libkmod',
+  content_files : version_file,
+  ignore_headers : [
+    '@0@/libkmod/libkmod-index.h'.format(meson.project_source_root()),
+    '@0@/libkmod/libkmod-internal-file.h'.format(meson.project_source_root()),
+    '@0@/libkmod/libkmod-internal.h'.format(meson.project_source_root()),
+  ],
+  scan_args : '--ignore-decorators="KMOD_EXPORT"',
+  src_dir : '@0@/libkmod/'.format(meson.project_source_root()),
+  namespace : 'kmod',
+  module_version : '3',
+  main_xml : 'libkmod-docs.xml',
+)
index 9535c2179064e8486399ea8dc4660cdbd3d72fe7..c41a2bbe4e81eca35b7119edd9e21fdf5559a8de 100644 (file)
@@ -422,6 +422,10 @@ if get_option('manpages')
   subdir('man')
 endif
 
+if get_option('docs')
+  subdir('libkmod/docs')
+endif
+
 summary({
   'moduledir'   : moduledir,
   'prefix'      : get_option('prefix'),
@@ -438,6 +442,7 @@ summary({
   'debug-messages'  : get_option('debug-messages'),
   'build-tests'     : get_option('build-tests'),
   'manpages'        : get_option('manpages'),
+  'docs'            : get_option('docs'),
 }, section : 'Options')
 
 summary({
index 7de6258eb9ac920ce81277a6a77e1582c9d366ed..62d97ceb0cd6ea22a0373bdd2449ea10742772e9 100644 (file)
@@ -85,3 +85,10 @@ option(
   value : true,
   description : 'Build the manpages. Default: true',
 )
+
+option(
+  'docs',
+  type : 'boolean',
+  value : false,
+  description : 'Build the documentation. Default: false',
+)