summaryrefslogtreecommitdiffstats
path: root/gnome-settings-daemon/codegen.py
blob: eb0b0ce08ddf13e6271fad0c45b8c09a345fa7d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/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

name = 'org.gnome.' + sys.argv[1]

subprocess.call([
  'gdbus-codegen',
  '--interface-prefix=' + name + '.',
  '--generate-c-code=' + sys.argv[2],
  '--c-namespace=Gsd',
  '--annotate', name, 'org.gtk.GDBus.C.Name', sys.argv[1],
  '--output-directory=' + sys.argv[3],
  sys.argv[4]
])