diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2018-07-11 16:48:43 +0530 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2018-07-11 22:47:12 +0300 |
commit | 43f7a750604d1293c4152976c6fc0315270572e6 (patch) | |
tree | ab275870b254f81b926c40f5f8b2f1296ba8e63d | |
parent | 6de9ebb10f66d61a73d6a655c370b8a53c28afe6 (diff) | |
download | meson-43f7a750604d1293c4152976c6fc0315270572e6.zip meson-43f7a750604d1293c4152976c6fc0315270572e6.tar.gz meson-43f7a750604d1293c4152976c6fc0315270572e6.tar.bz2 |
gnome.gdbus_codegen: Handle XML docbook in subdirs
Closes https://github.com/mesonbuild/meson/issues/3870
-rw-r--r-- | mesonbuild/build.py | 2 | ||||
-rw-r--r-- | mesonbuild/modules/gnome.py | 2 | ||||
-rw-r--r-- | test cases/frameworks/7 gnome/gdbus/data/com.example.Sample.xml (renamed from test cases/frameworks/7 gnome/gdbus/com.example.Sample.xml) | 0 | ||||
-rw-r--r-- | test cases/frameworks/7 gnome/gdbus/meson.build | 5 |
4 files changed, 5 insertions, 4 deletions
diff --git a/mesonbuild/build.py b/mesonbuild/build.py index aa6e70b..65438b0 100644 --- a/mesonbuild/build.py +++ b/mesonbuild/build.py @@ -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@?' diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py index f3eabda..1459ffe 100644 --- a/mesonbuild/modules/gnome.py +++ b/mesonbuild/modules/gnome.py @@ -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, diff --git a/test cases/frameworks/7 gnome/gdbus/com.example.Sample.xml b/test cases/frameworks/7 gnome/gdbus/data/com.example.Sample.xml index 9ece885..9ece885 100644 --- a/test cases/frameworks/7 gnome/gdbus/com.example.Sample.xml +++ b/test cases/frameworks/7 gnome/gdbus/data/com.example.Sample.xml diff --git a/test cases/frameworks/7 gnome/gdbus/meson.build b/test cases/frameworks/7 gnome/gdbus/meson.build index 8238e73..2de172f 100644 --- a/test cases/frameworks/7 gnome/gdbus/meson.build +++ b/test cases/frameworks/7 gnome/gdbus/meson.build @@ -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 : [ |