diff options
-rwxr-xr-x | codegen.py | 28 | ||||
-rw-r--r-- | common/meson.build | 16 | ||||
-rw-r--r-- | meson.build | 6 | ||||
-rw-r--r-- | metadata/meson.build | 16 |
4 files changed, 12 insertions, 54 deletions
diff --git a/codegen.py b/codegen.py deleted file mode 100755 index 9bc379ce..00000000 --- a/codegen.py +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env python3 - -''' -FIXME - -This script is used only to call gdbus-codegen and simulate the -generation of the source code and header as different targets. - -Both are generated implicitly, so meson is not able to know how -many files are generated, so it does generate only one opaque -target that represents the two files. - -Please see: - https://bugzilla.gnome.org/show_bug.cgi?id=791015 - https://github.com/mesonbuild/meson/pull/2930 -''' - -import subprocess -import sys - -subprocess.call([ - 'gdbus-codegen', - '--interface-prefix=' + sys.argv[1], - '--generate-c-code=' + sys.argv[2], - '--c-namespace=' + sys.argv[3], - '--output-directory=' + sys.argv[4], - sys.argv[5] -]) diff --git a/common/meson.build b/common/meson.build index a718783f..beef8c26 100644 --- a/common/meson.build +++ b/common/meson.build @@ -14,16 +14,12 @@ sources = files( 'gvfsutils.c', ) -# FIXME: Ugly workaround that simulates the generation of -# two different targets. -namespace = 'GVfsDBus' -name = namespace.to_lower() - -dbus_sources = custom_target( - name, - input: gvfs_namespace + '.xml', - output: [name + '.c', name + '.h'], - command: [codegen, gvfs_namespace + '.', name, namespace, meson.current_build_dir(), '@INPUT@', '@OUTPUT@'], +dbus_sources = gnome.gdbus_codegen( + 'gvfsdbus', + gvfs_namespace + '.xml', + interface_prefix: gvfs_namespace + '.', + namespace: 'GVfsDBus', + autocleanup: 'objects', ) deps = [ diff --git a/meson.build b/meson.build index 19e91c3a..43e126c0 100644 --- a/meson.build +++ b/meson.build @@ -453,12 +453,6 @@ endif enable_devel_utils = get_option('devel_utils') enable_installed_tests = get_option('installed_tests') -# FIXME: Opaque target return from gdbus_codegen -# Please see: -# https://bugzilla.gnome.org/show_bug.cgi?id=791015 -# https://github.com/mesonbuild/meson/pull/2930 -codegen = find_program('codegen.py') - gnome = import('gnome') i18n = import('i18n') pkg = import('pkgconfig') diff --git a/metadata/meson.build b/metadata/meson.build index bbfd09fd..e51f1564 100644 --- a/metadata/meson.build +++ b/metadata/meson.build @@ -29,16 +29,12 @@ metadata_service = configure_file( install_dir: dbus_session_bus_services_dir, ) -# FIXME: Ugly workaround that simulates the generation of -# two different targets. -namespace = 'GVfs' -name = 'metadata-dbus' - -dbus_sources = custom_target( - name, - input: 'dbus-interface.xml', - output: [name + '.c', name + '.h'], - command: [codegen, gvfs_namespace + '.', name, namespace, meson.current_build_dir(), '@INPUT@', '@OUTPUT@'], +dbus_sources = gnome.gdbus_codegen( + 'metadata-dbus', + 'dbus-interface.xml', + interface_prefix: gvfs_namespace + '.', + namespace: 'GVfs', + autocleanup: 'objects', ) sources = files( |