aboutsummaryrefslogtreecommitdiff
path: root/modules/gnome.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2015-07-30 00:52:44 +0300
committerJussi Pakkanen <jpakkane@gmail.com>2015-08-02 13:49:11 +0300
commit8b52dec6d9c078082fd2896779c24de9578fe382 (patch)
tree4a6e6c434782bdfd6de961f121b41bc74041bcd6 /modules/gnome.py
parentc12a4c1acaf44ba0c5e74e5723fa3d5ce72a90dd (diff)
downloadmeson-8b52dec6d9c078082fd2896779c24de9578fe382.zip
meson-8b52dec6d9c078082fd2896779c24de9578fe382.tar.gz
meson-8b52dec6d9c078082fd2896779c24de9578fe382.tar.bz2
Can generate gtkdoc documentation.
Diffstat (limited to 'modules/gnome.py')
-rw-r--r--modules/gnome.py20
1 files changed, 19 insertions, 1 deletions
diff --git a/modules/gnome.py b/modules/gnome.py
index 7a0ef4b..64e91df 100644
--- a/modules/gnome.py
+++ b/modules/gnome.py
@@ -16,7 +16,7 @@
functionality such as gobject-introspection and gresources.'''
import build
-import os
+import os, sys
import subprocess
from coredata import MesonException
import mlog
@@ -176,6 +176,24 @@ class GnomeModule:
target_g = build.CustomTarget(targetname, state.subdir, kwargs)
return target_g
+ def gtkdoc(self, state, args, kwargs):
+ if len(args) != 1:
+ raise MesonException('Gtkdoc must have one positional argument.')
+ modulename = args[0]
+ if not isinstance(modulename, str):
+ raise MesonException('Gtkdoc arg must be string.')
+ if not 'src_dir' in kwargs:
+ raise MesonException('Keyword argument src_dir missing.')
+ src_dir = kwargs['src_dir']
+ targetname = modulename + '-doc'
+ command = os.path.normpath(os.path.join(os.path.split(__file__)[0], "../gtkdochelper.py"))
+ args = [state.environment.get_source_dir(),
+ state.environment.get_build_dir(),
+ state.subdir,
+ os.path.normpath(os.path.join(state.subdir, src_dir)),
+ modulename]
+ return build.RunTarget(targetname, command, args, state.subdir)
+
def gdbus_codegen(self, state, args, kwargs):
if len(args) != 2:
raise MesonException('Gdbus_codegen takes two arguments, name and xml file.')