aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2015-08-07 12:44:26 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2015-08-07 12:44:26 +0200
commit849786da14251b60be0584b2f481b039e725dd36 (patch)
tree15bab29755850dc8d998c86bbeaaa83b613cfd18 /modules
parent9d9ba50911d1a968c7f21b2e0d80d91715e54e0c (diff)
parentcbc329fc326e437b16b4eb732c6b4fed2c3c7123 (diff)
downloadmeson-849786da14251b60be0584b2f481b039e725dd36.zip
meson-849786da14251b60be0584b2f481b039e725dd36.tar.gz
meson-849786da14251b60be0584b2f481b039e725dd36.tar.bz2
Merge pull request #218 from mesonbuild/gtkdoc
Basic gtkdoc support
Diffstat (limited to 'modules')
-rw-r--r--modules/gnome.py27
1 files changed, 26 insertions, 1 deletions
diff --git a/modules/gnome.py b/modules/gnome.py
index 7a0ef4b..43c0537 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,31 @@ 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.')
+ main_sgml = kwargs.get('main_sgml', '')
+ if not isinstance(main_sgml, str):
+ raise MesonException('Main sgml keyword argument must be a string.')
+ 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)),
+ main_sgml,
+ modulename]
+ res = [build.RunTarget(targetname, command, args, state.subdir)]
+ if kwargs.get('install', True):
+ res.append(build.InstallScript([command] + args))
+ return res
+
def gdbus_codegen(self, state, args, kwargs):
if len(args) != 2:
raise MesonException('Gdbus_codegen takes two arguments, name and xml file.')