[gxml] Ported valadoc documentation to meson



commit d3dfe5b12707e9f4a7f29220df91cc8c2e648c02
Author: Daniel Espinosa <esodan gmail com>
Date:   Fri May 5 19:41:58 2017 -0500

    Ported valadoc documentation to meson

 docs/meson.build |   31 +++++++++++++++++++++++++++++++
 gxml/meson.build |   25 ++++++++++++++-----------
 meson.build      |    4 +++-
 vapi/meson.build |    2 ++
 4 files changed, 50 insertions(+), 12 deletions(-)
---
diff --git a/docs/meson.build b/docs/meson.build
new file mode 100644
index 0000000..982c038
--- /dev/null
+++ b/docs/meson.build
@@ -0,0 +1,31 @@
+valadoc = find_program ('valadoc')
+outdir ='GXml-'+API_VERSION
+valacapi = run_command ('valac', '--api-version')
+driver = '--driver=0.34'
+pkgname = '--package-name='+'GXml-'+API_VERSION
+pkgversion = '--package-version='+GXML_VERSION
+vapidirgxml = '--vapidir='+join_paths (meson.current_source_dir (),'gxml')
+vapidirvapi = '--vapidir='+join_paths (meson.current_source_dir (),'vapi')
+
+custom_target ('valadocs',
+               input : sources,
+               output : outdir,
+               command : [valadoc,
+                       driver,
+                       '--doclet=devhelp',
+                       '--force',
+                       pkgname,
+                       pkgversion,
+                       '--pkg=glib-2.0',
+                       '--pkg=gio-2.0',
+                       '--pkg=libxml-2.0',
+                       '--pkg=gee-0.8',
+                       vapidirgxml,
+                       vapidirvapi,
+                       xlibxmlvapi,
+                       configvapi,
+                       '--directory=@OUTDIR@',
+                       valasources],
+               install : true,
+               install_dir : join_paths (meson.current_source_dir (), 'devhelp','books'))
+
diff --git a/gxml/meson.build b/gxml/meson.build
index 8691f9a..315600b 100644
--- a/gxml/meson.build
+++ b/gxml/meson.build
@@ -8,26 +8,26 @@ conf.set('VALADEPS', VALADEPS)
 conf.set('PCDEPS', PCDEPS)
 conf.set('GXML_VERSION', GXML_VERSION)
 conf.set('API_VERSION', API_VERSION)
-       
+
 configure_file(input : 'gxml.pc.in',
        output : 'gxml-@0@.pc'.format(API_VERSION),
        configuration : conf,
        install : true,
        install_dir : join_paths(get_option('libdir'), 'pkgconfig'))
-       
+
 configure_file(input : 'gxml.deps.in',
        output : 'gxml-@0@.deps'.format(API_VERSION),
        configuration : conf,
        install : true,
        install_dir : vapidir)
-       
+
 conf = configuration_data()
 conf.set_quoted('PACKAGE_LOCALE_DIR', join_paths(get_option('prefix'), get_option('datadir'), 'locale'))
 conf.set_quoted('GETTEXT_PACKAGE', 'GXml')
 configure_file(output : 'config.h',
        configuration : conf)
 
-sources = [
+valasources = files ([
        'Attribute.vala',
        'CDATA.vala',
        'Character.vala',
@@ -107,15 +107,18 @@ sources = [
        'TNode.vala',
        'TProcessingInstruction.vala',
        'TText.vala',
-       'xlibxml.c',
-       'xlibxml.h',
        'XParser.vala',
        'XPath.vala',
        meson.build_root() + '/namespace-info.vala'
-]
+])
+
+sources = files ([
+       'xlibxml.c',
+       'xlibxml.h'
+])
 
 gxml = library('gxml-@0@'.format(API_VERSION),
-       sources,
+       valasources+sources,
        version : GXML_VERSION,
        vala_header : 'gxml.h',
        vala_vapi : 'gxml-@0@.vapi'.format(API_VERSION),
@@ -137,15 +140,15 @@ gxml = library('gxml-@0@'.format(API_VERSION),
                vapidir,
                true
        ])
-       
+
 install_headers('xlibxml.h', subdir : includedir)
-       
+
 g_ir_compiler = find_program('g-ir-compiler')
 custom_target('gxml-typelib',
        command: [
                g_ir_compiler,
                '--shared-library', 'libgxml-@0@.so.@1@'.format (API_VERSION, GXML_VERSION),
-               '--output', '@OUTPUT@', 
+               '--output', '@OUTPUT@',
                join_paths(meson.current_build_dir(), 'GXml-@0@.gir'.format(API_VERSION))
        ],
        output: 'GXml-@0@.typelib'.format(API_VERSION),
diff --git a/meson.build b/meson.build
index f4a8d09..8455a40 100644
--- a/meson.build
+++ b/meson.build
@@ -19,5 +19,7 @@ configure_file(input : 'gxml/namespace-info.vala.in',
        output : 'namespace-info.vala',
        configuration : conf)
 
-subdir('po')
+#subdir('po')
+subdir('vapi')
 subdir('gxml')
+subdir('docs')
diff --git a/vapi/meson.build b/vapi/meson.build
new file mode 100644
index 0000000..8352ebf
--- /dev/null
+++ b/vapi/meson.build
@@ -0,0 +1,2 @@
+configvapi = files ('config.vapi')
+xlibxmlvapi = files ('xlibxml-1.0.vapi')


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]