gdbus-codegen: Fix header include in the body file

When body file is generated, the header name to be included is
built by using the path passed by `--output` directory. However,
this might not be correct because, if the path includes a
subdirectory, the whole path will be used instead of only the
base name.

Please see:
  https://github.com/mesonbuild/meson/issues/3488
  https://github.com/gnome-mpv/gnome-mpv/issues/305#issuecomment-385056156

https://bugzilla.gnome.org/show_bug.cgi?id=795802
This commit is contained in:
Iñigo Martínez 2018-05-04 16:23:18 +02:00 committed by Philip Withnall
parent 9d40f64960
commit 5faac84413

View File

@ -209,7 +209,7 @@ def codegen_main():
print_error('Using --body requires --output')
c_file = args.output
header_name = os.path.splitext(c_file)[0] + '.h'
header_name = os.path.splitext(os.path.basename(c_file))[0] + '.h'
all_ifaces = []
input_files_basenames = []