gnome.gdbus_codegen: Handle XML docbook in subdirs

Closes https://github.com/mesonbuild/meson/issues/3870
pull/3877/head
Nirbheek Chauhan 7 years ago committed by Jussi Pakkanen
parent 6de9ebb10f
commit 43f7a75060
  1. 2
      mesonbuild/build.py
  2. 2
      mesonbuild/modules/gnome.py
  3. 0
      test cases/frameworks/7 gnome/gdbus/data/com.example.Sample.xml
  4. 5
      test cases/frameworks/7 gnome/gdbus/meson.build

@ -1741,7 +1741,7 @@ class CustomTarget(Target):
if i.strip() == '':
raise InvalidArguments('Output must not consist only of whitespace.')
if has_path_sep(i):
raise InvalidArguments('Output must not contain a path segment.')
raise InvalidArguments('Output {!r} must not contain a path segment.'.format(i))
if '@INPUT@' in i or '@INPUT0@' in i:
m = 'Output cannot contain @INPUT@ or @INPUT0@, did you ' \
'mean @PLAINNAME@ or @BASENAME@?'

@ -1017,7 +1017,7 @@ This will become a hard error in the future.''')
output = namebase + '-docbook'
outputs = []
for f in xml_files:
outputs.append('{}-{}'.format(docbook, f))
outputs.append('{}-{}'.format(docbook, os.path.basename(str(f))))
if mesonlib.version_compare(glib_version, '>= 2.56.2'):
custom_kwargs = {'input': xml_files,

@ -1,4 +1,5 @@
gdbus_src = gnome.gdbus_codegen('generated-gdbus-no-docbook', 'com.example.Sample.xml',
gdbus_src = gnome.gdbus_codegen('generated-gdbus-no-docbook',
'data/com.example.Sample.xml',
interface_prefix : 'com.example.',
namespace : 'Sample',
annotations : [
@ -10,7 +11,7 @@ assert(gdbus_src[0].full_path().endswith('.c'), 'expected 1 c source file')
assert(gdbus_src[1].full_path().endswith('.h'), 'expected 1 c header file')
gdbus_src = gnome.gdbus_codegen('generated-gdbus',
sources : 'com.example.Sample.xml',
sources : files('data/com.example.Sample.xml'),
interface_prefix : 'com.example.',
namespace : 'Sample',
annotations : [

Loading…
Cancel
Save