aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/modules/gnome.py
diff options
context:
space:
mode:
authorMarco Trevisan (Treviño) <mail@3v1n0.net>2018-09-13 03:22:59 +0200
committerMarco Trevisan (Treviño) <mail@3v1n0.net>2018-09-21 09:13:21 +0200
commit5bec6c28e7e762dc61a5c5643714d63c39b57877 (patch)
tree6d140bf77f1c8bf19f201565dc32be7e04faea0c /mesonbuild/modules/gnome.py
parent2b6fa3dd3b12f75bfbe4f5d6299c76c6b0b9098e (diff)
downloadmeson-5bec6c28e7e762dc61a5c5643714d63c39b57877.zip
meson-5bec6c28e7e762dc61a5c5643714d63c39b57877.tar.gz
meson-5bec6c28e7e762dc61a5c5643714d63c39b57877.tar.bz2
gnome: add support for `module_version`
gtk-doc for autotools has the concept of module version, that is used to define the module install path and the devhelp2 basename. Add a `module_version` parameter to gnome.gtkdoc to replicate the same behavior. Updated the test checking that the install_dir is properly computed (if not passed), and that the .devhelp2 file has proper name. https://gitlab.gnome.org/GNOME/gtk-doc/blob/GTK_DOC_1_29/buildsystems/autotools/gtk-doc.make#L269
Diffstat (limited to 'mesonbuild/modules/gnome.py')
-rw-r--r--mesonbuild/modules/gnome.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py
index 7802472..c07f6f6 100644
--- a/mesonbuild/modules/gnome.py
+++ b/mesonbuild/modules/gnome.py
@@ -883,12 +883,13 @@ This will become a hard error in the future.''')
return ModuleReturnValue(None, rv)
@FeatureNewKwargs('gnome.gtkdoc', '0.48.0', ['c_args'])
+ @FeatureNewKwargs('gnome.gtkdoc', '0.48.0', ['module_version'])
@FeatureNewKwargs('gnome.gtkdoc', '0.37.0', ['namespace', 'mode'])
@permittedKwargs({'main_xml', 'main_sgml', 'src_dir', 'dependencies', 'install',
'install_dir', 'scan_args', 'scanobjs_args', 'gobject_typesfile',
'fixxref_args', 'html_args', 'html_assets', 'content_files',
'mkdb_args', 'ignore_headers', 'include_directories',
- 'namespace', 'mode', 'expand_content_files'})
+ 'namespace', 'mode', 'expand_content_files', 'module_version'})
def gtkdoc(self, state, args, kwargs):
if len(args) != 1:
raise MesonException('Gtkdoc must have one positional argument.')
@@ -903,11 +904,14 @@ This will become a hard error in the future.''')
main_xml = kwargs.get('main_xml', '')
if not isinstance(main_xml, str):
raise MesonException('Main xml keyword argument must be a string.')
+ moduleversion = kwargs.get('module_version', '')
+ if not isinstance(moduleversion, str):
+ raise MesonException('Module version keyword argument must be a string.')
if main_xml != '':
if main_file != '':
raise MesonException('You can only specify main_xml or main_sgml, not both.')
main_file = main_xml
- targetname = modulename + '-doc'
+ targetname = modulename + ('-' + moduleversion if moduleversion else '') + '-doc'
command = state.environment.get_build_command()
namespace = kwargs.get('namespace', '')
@@ -938,6 +942,7 @@ This will become a hard error in the future.''')
'--headerdirs=' + '@@'.join(header_dirs),
'--mainfile=' + main_file,
'--modulename=' + modulename,
+ '--moduleversion=' + moduleversion,
'--mode=' + mode]
if namespace:
args.append('--namespace=' + namespace)