diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2018-09-25 20:40:42 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-25 20:40:42 -0700 |
commit | f0c4d1cd00da1f6e7d0126a156928e242d6c5b8b (patch) | |
tree | 889ff3c8777a7e49fb3b840a6877d9879d03a186 /mesonbuild/modules/gnome.py | |
parent | 99ecedc0930a99fb4d084208964e4c7922a6efec (diff) | |
parent | 8a5671c01736e5ecbe5c7f5949e2560ab7092a0e (diff) | |
download | meson-f0c4d1cd00da1f6e7d0126a156928e242d6c5b8b.zip meson-f0c4d1cd00da1f6e7d0126a156928e242d6c5b8b.tar.gz meson-f0c4d1cd00da1f6e7d0126a156928e242d6c5b8b.tar.bz2 |
Merge pull request #4214 from 3v1n0/gtk-docs-improvements
Gtk docs improvements
Diffstat (limited to 'mesonbuild/modules/gnome.py')
-rw-r--r-- | mesonbuild/modules/gnome.py | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py index 7802472..5128de4 100644 --- a/mesonbuild/modules/gnome.py +++ b/mesonbuild/modules/gnome.py @@ -326,7 +326,7 @@ class GnomeModule(ExtensionModule): for dep in deps: if isinstance(dep, InternalDependency): - cflags.update(dep.compile_args) + cflags.update(dep.get_compile_args()) cflags.update(get_include_args(dep.include_directories)) for lib in dep.libraries: if hasattr(lib, 'held_object'): @@ -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) @@ -1013,6 +1018,10 @@ This will become a hard error in the future.''') ldflags.update(state.environment.coredata.get_external_link_args('c')) compiler = state.environment.coredata.compilers.get('c') + compiler_flags = self._get_langs_compilers_flags(state, [('c', compiler)]) + cflags.update(compiler_flags[0]) + ldflags.update(compiler_flags[1]) + ldflags.update(compiler_flags[2]) if compiler: args += ['--cc=%s' % ' '.join(compiler.get_exelist())] args += ['--ld=%s' % ' '.join(compiler.get_linker_exelist())] |