aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild
diff options
context:
space:
mode:
authorIñigo Martínez <inigomartinez@gmail.com>2018-04-12 08:08:39 +0200
committerIñigo Martínez <inigomartinez@gmail.com>2018-04-12 08:10:13 +0200
commite656b9c819b073a9af501619cf512f63aa16e8ec (patch)
treee92ed93b1094e616ad0f9a53868393572751c68a /mesonbuild
parentd7b401f7d7aec217ee6c18dd44e0978beaf6bd5f (diff)
downloadmeson-e656b9c819b073a9af501619cf512f63aa16e8ec.zip
meson-e656b9c819b073a9af501619cf512f63aa16e8ec.tar.gz
meson-e656b9c819b073a9af501619cf512f63aa16e8ec.tar.bz2
gdbus_codegen: Fix custom target name
The namebase which is used as the target name, also holds part of the file names. This used in combination generates files with wrong names.
Diffstat (limited to 'mesonbuild')
-rw-r--r--mesonbuild/modules/gnome.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py
index b4af8d8..43a9d1c 100644
--- a/mesonbuild/modules/gnome.py
+++ b/mesonbuild/modules/gnome.py
@@ -873,9 +873,10 @@ This will become a hard error in the future.''')
def gdbus_codegen(self, state, args, kwargs):
if len(args) != 2:
raise MesonException('Gdbus_codegen takes two arguments, name and xml file.')
- namebase = args[0] + '-gdbus'
+ namebase = args[0]
xml_file = args[1]
- cmd = [find_program('gdbus-codegen', namebase)]
+ target_name = namebase + '-gdbus'
+ cmd = [find_program('gdbus-codegen', target_name)]
if 'interface_prefix' in kwargs:
cmd += ['--interface-prefix', kwargs.pop('interface_prefix')]
if 'namespace' in kwargs:
@@ -954,7 +955,7 @@ This will become a hard error in the future.''')
'command': cmd,
'build_by_default': build_by_default
}
- ct = build.CustomTarget(namebase, state.subdir, state.subproject, custom_kwargs)
+ ct = build.CustomTarget(target_name, state.subdir, state.subproject, custom_kwargs)
# Ensure that the same number (and order) of arguments are returned
# regardless of the gdbus-codegen (glib) version being used
targets = [ct, ct]