summaryrefslogtreecommitdiffstats
path: root/meson.build
diff options
context:
space:
mode:
authorigo95862 <igo95862@yandex.ru>2021-07-24 09:30:42 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2021-12-10 08:51:58 +0100
commite3c689245562ec5eaf06730ef33d697efccf0d62 (patch)
tree445260de86947d6d0853944b7ab04387fb6d2c5c /meson.build
parentmeson: exclude .gitattributes when using install_subdir (diff)
downloadsystemd-e3c689245562ec5eaf06730ef33d697efccf0d62.tar.xz
systemd-e3c689245562ec5eaf06730ef33d697efccf0d62.zip
Export D-Bus interfaces to /usr/share/dbus-1/interfaces
Pass -Ddbus-interfaces-dir=no to meson to disable export Interfaces from: org.freedesktop.home1 org.freedesktop.hostname1 org.freedesktop.import1 org.freedesktop.locale1 org.freedesktop.LogControl1 org.freedesktop.login1 org.freedesktop.machine1 org.freedesktop.oom1 org.freedesktop.portable1 org.freedesktop.resolve1 org.freedesktop.systemd1 org.freedesktop.timedate1
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build37
1 files changed, 26 insertions, 11 deletions
diff --git a/meson.build b/meson.build
index d92136aa64..daa19f0ed7 100644
--- a/meson.build
+++ b/meson.build
@@ -1693,6 +1693,7 @@ update_hwdb_sh = find_program('tools/update-hwdb.sh')
update_hwdb_autosuspend_sh = find_program('tools/update-hwdb-autosuspend.sh')
update_syscall_tables_sh = find_program('tools/update-syscall-tables.sh')
xml_helper_py = find_program('tools/xml_helper.py')
+export_dbus_interfaces_py = find_program('tools/dbus_exporter.py')
#####################################################################
@@ -1708,6 +1709,13 @@ add_project_arguments('-include', 'config.h', language : 'c')
# usually, but not always, installed in /bin.
public_programs = []
+# D-Bus introspection XML export
+dbus_programs = []
+dbus_interfaces_dir = get_option('dbus-interfaces-dir')
+if dbus_interfaces_dir == ''
+ dbus_interfaces_dir = get_option('datadir') + '/dbus-1'
+endif
+
tests = []
fuzzers = []
@@ -1975,7 +1983,7 @@ endforeach
############################################################
-executable(
+dbus_programs += executable(
'systemd',
systemd_sources,
include_directories : includes,
@@ -2144,7 +2152,7 @@ if conf.get('HAVE_BLKID') == 1
endif
if conf.get('ENABLE_RESOLVE') == 1
- executable(
+ dbus_programs += executable(
'systemd-resolved',
systemd_resolved_sources,
include_directories : resolve_includes,
@@ -2181,7 +2189,7 @@ if conf.get('ENABLE_RESOLVE') == 1
endif
if conf.get('ENABLE_LOGIND') == 1
- executable(
+ dbus_programs += executable(
'systemd-logind',
systemd_logind_sources,
include_directories : includes,
@@ -2327,7 +2335,7 @@ public_programs += executable(
install_dir : rootbindir)
if conf.get('ENABLE_PORTABLED') == 1
- executable(
+ dbus_programs += executable(
'systemd-portabled',
systemd_portabled_sources,
include_directories : includes,
@@ -2407,7 +2415,7 @@ if conf.get('ENABLE_HOMED') == 1
install : true,
install_dir : rootlibexecdir)
- executable(
+ dbus_programs += executable(
'systemd-homed',
systemd_homed_sources,
include_directories : home_includes,
@@ -2610,7 +2618,7 @@ if conf.get('ENABLE_XDG_AUTOSTART') == 1
endif
if conf.get('ENABLE_HOSTNAMED') == 1
- executable(
+ dbus_programs += executable(
'systemd-hostnamed',
'src/hostname/hostnamed.c',
include_directories : includes,
@@ -2637,7 +2645,7 @@ if conf.get('ENABLE_LOCALED') == 1
deps = []
endif
- executable(
+ dbus_programs += executable(
'systemd-localed',
systemd_localed_sources,
include_directories : includes,
@@ -2657,7 +2665,7 @@ if conf.get('ENABLE_LOCALED') == 1
endif
if conf.get('ENABLE_TIMEDATED') == 1
- executable(
+ dbus_programs += executable(
'systemd-timedated',
'src/timedate/timedated.c',
include_directories : includes,
@@ -2701,7 +2709,7 @@ if conf.get('ENABLE_TIMESYNCD') == 1
endif
if conf.get('ENABLE_MACHINED') == 1
- executable(
+ dbus_programs += executable(
'systemd-machined',
systemd_machined_sources,
include_directories : includes,
@@ -2726,7 +2734,7 @@ if conf.get('ENABLE_MACHINED') == 1
endif
if conf.get('ENABLE_IMPORTD') == 1
- executable(
+ dbus_programs += executable(
'systemd-importd',
systemd_importd_sources,
include_directories : includes,
@@ -2885,7 +2893,7 @@ if conf.get('ENABLE_PSTORE') == 1
endif
if conf.get('ENABLE_OOMD') == 1
- executable('systemd-oomd',
+ dbus_programs += executable('systemd-oomd',
systemd_oomd_sources,
include_directories : includes,
link_with : [libshared],
@@ -3829,6 +3837,13 @@ run_target(
alias_target('update-dbus-docs', update_dbus_docs)
alias_target('update-man-rules', update_man_rules)
+custom_target(
+ 'export-dbus-interfaces',
+ output : 'interfaces',
+ install : dbus_interfaces_dir != 'no',
+ install_dir : dbus_interfaces_dir,
+ command : [export_dbus_interfaces_py, '@OUTPUT@', dbus_programs])
+
############################################################
alt_time_epoch = run_command('date', '-Is', '-u', '-d', '@@0@'.format(time_epoch),