[gnome-calculator] GCalc: documentation generation



commit f3359062d8c1433f825a9423431fce883ea729de
Author: Daniel Espinosa <esodan gmail com>
Date:   Thu Oct 17 09:40:07 2019 -0500

    GCalc: documentation generation

 doc/meson.build            | 31 +++++++++++++++++++++++++++++++
 gcalc/gcalc-gconstant.vala |  2 +-
 gcalc/meson.build          | 11 ++++++-----
 meson.build                |  2 ++
 vapi/meson.build           |  1 +
 5 files changed, 41 insertions(+), 6 deletions(-)
---
diff --git a/doc/meson.build b/doc/meson.build
new file mode 100644
index 00000000..8cfb4dae
--- /dev/null
+++ b/doc/meson.build
@@ -0,0 +1,31 @@
+valadoc = find_program ('valadoc', required: false)
+if valadoc.found()
+       gtkdoc_outdir = CAMEL_CASE_NAME+'-'+API_VERSION
+       docsdir = join_paths (get_option ('datadir'), 'devhelp','books')
+
+       custom_target ('libgcalc_valadocs',
+                       input : gcalc_sources,
+                       output : CAMEL_CASE_NAME+'-'+API_VERSION,
+                       command : [valadoc,
+                               '--doclet=devhelp',
+                               '--force',
+                               '--fatal-warnings',
+                               '--package-name='+CAMEL_CASE_NAME+'-'+API_VERSION,
+                               '--package-version='+meson.project_version(),
+                               '--vapidir='+gcalc_sources_dir,
+                               '--vapidir='+gcalc_build_dir,
+                               '--pkg=glib-2.0',
+                               '--pkg=gio-2.0',
+                               '--pkg=gee-0.8',
+                               '--vapidir='+vapis_dir,
+                               '--pkg=mpc',
+                               '--pkg=mpfr',
+                               '--pkg=mpfrg',
+                               '--directory=@OUTDIR@',
+                               '@INPUT@'
+                               ],
+                       install : true,
+                       install_dir : docsdir,
+                       depends: libgcalc
+                       )
+endif
diff --git a/gcalc/gcalc-gconstant.vala b/gcalc/gcalc-gconstant.vala
index fba34032..415d2853 100644
--- a/gcalc/gcalc-gconstant.vala
+++ b/gcalc/gcalc-gconstant.vala
@@ -26,7 +26,7 @@ public class GCalc.GConstant : GExpression, Constant {
   construct {
     _complex.set_double (0.0);
   }
-  public GConstant.internal_complex (MPC.Complex complex) {
+  internal GConstant.internal_complex (MPC.Complex complex) {
     _complex.set (complex);
   }
   public GConstant.integer (int val) {
diff --git a/gcalc/meson.build b/gcalc/meson.build
index 47ea14f0..6e40a25c 100644
--- a/gcalc/meson.build
+++ b/gcalc/meson.build
@@ -55,7 +55,7 @@ lib_mpfrg = static_library ('mpfrg',
        install: false,
 )
 
-sources = files([
+gcalc_sources = files([
        'gcalc-assign.vala',
        'gcalc-binary-operator.vala',
        'gcalc-constant.vala',
@@ -121,6 +121,7 @@ sources = files([
 inc_libh = include_directories ('.')
 inc_libh_dep = declare_dependency (include_directories : inc_libh)
 gcalc_build_dir = meson.current_build_dir ()
+gcalc_sources_dir = meson.current_source_dir ()
 
 gcalc_deps = [
        gio,
@@ -142,12 +143,12 @@ gcalc_deps = [
 # Increase the age value only if the changes made to the ABI are backward compatible.
 # Set version to the value of subtract age from current
 # Reset current and version to 1 and, age and version to 0 if library's name is changed
-LT_CURRENT='0'
-LT_REVISION='0'
+LT_CURRENT='1'
+LT_REVISION='1'
 LT_AGE='0'
-LT_VERSION='0'
+LT_VERSION='1'
 libgcalc = library(VERSIONED_PROJECT_NAME,
-       sources,
+       gcalc_sources,
        version : LT_VERSION,
        soversion : LT_VERSION+'.'+LT_AGE+'.'+LT_REVISION,
        vala_header : PROJECT_NAME+'.h',
diff --git a/meson.build b/meson.build
index a7b175e3..16d11c4a 100644
--- a/meson.build
+++ b/meson.build
@@ -60,6 +60,7 @@ config_h_dir = include_directories('.')
 meson.add_install_script('meson_post_install.py')
 
 # Subdirs
+subdir('vapi')
 subdir('gcalc')
 if not get_option ('disable-ui')
 gtk = dependency('gtk+-3.0', version: '>= 3.19.3')
@@ -69,6 +70,7 @@ subdir('lib')
 subdir('src')
 subdir('search-provider')
 subdir('help')
+subdir('doc')
 subdir('po')
 endif
 subdir('tests')
diff --git a/vapi/meson.build b/vapi/meson.build
new file mode 100644
index 00000000..b2bdaf44
--- /dev/null
+++ b/vapi/meson.build
@@ -0,0 +1 @@
+vapis_dir = meson.current_source_dir ()


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