diff options
author | Iñigo Martínez <inigomartinez@gmail.com> | 2018-12-17 22:52:40 +0100 |
---|---|---|
committer | Iñigo Martínez <inigomartinez@gmail.com> | 2019-01-21 21:18:06 +0100 |
commit | 5d2533279cdc4660fa0a6f85d86c3d90d665e9f6 (patch) | |
tree | 30d1c39d585fa31a0a954149371bc43da5f0fbec | |
parent | 3ba59ec6deaaa5e0efca2882bf9536319f3f60ca (diff) | |
download | gvfs-5d2533279cdc4660fa0a6f85d86c3d90d665e9f6.tar.gz |
build: Remove gdbus codegen workaround
When gvfs was ported to meson `gdbus-codegen` was not able to
generate the source and header files independently, and this caused
issues on highly parallelized build.
To avoid this issue a workaround was placed by using an external
script. However, recently glib and meson acquired support for
generating source and header files independently, so the
workaround has been removed.
-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 43171d58..8dd41b87 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( |