${XML_IN_FILES:.xml.in=.html.in}
endif
+DBUS_PREPROCESS = $(CPP) -P $(DBUS_CFLAGS) -imacros dbus/dbus-protocol.h
+
org.freedesktop.systemd1.%.xml: systemd
- $(AM_V_GEN)SYSTEMD_SKIP_API_MOUNTS=1 ./systemd --introspect=${@:.xml=} > $@
+ $(AM_V_GEN)$(OBJCOPY) -O binary -j introspect.$* $< $@.tmp && \
+ $(STRINGS) $@.tmp | $(AWK) -f introspect.awk | \
+ $(DBUS_PREPROCESS) -o $@ - && rm $@.tmp
CLEANFILES += \
$(dbusinterface_DATA)
AC_PROG_GCC_TRADITIONAL
AC_USE_SYSTEM_EXTENSIONS
+AC_CHECK_TOOL(OBJCOPY, objcopy)
+AC_CHECK_TOOL(STRINGS, strings)
+
CC_CHECK_CFLAGS_APPEND([ \
-pipe \
-Wall \
--- /dev/null
+BEGIN {
+ print "<!DOCTYPE node PUBLIC DBUS_INTROSPECT_1_0_XML_PUBLIC_IDENTIFIER"
+ print "DBUS_INTROSPECT_1_0_XML_SYSTEM_IDENTIFIER>"
+ print "<node>"
+}
+
+// {
+ print
+}
+
+END {
+ print "</node>"
+}
BUS_INTROSPECTABLE_INTERFACE \
"</node>\n"
-const char bus_automount_interface[] = BUS_AUTOMOUNT_INTERFACE;
+const char bus_automount_interface[] _introspect_("Automount") = BUS_AUTOMOUNT_INTERFACE;
DBusHandlerResult bus_automount_message_handler(Unit *u, DBusConnection *c, DBusMessage *message) {
const BusProperty properties[] = {
BUS_INTROSPECTABLE_INTERFACE \
"</node>\n"
-const char bus_device_interface[] = BUS_DEVICE_INTERFACE;
+const char bus_device_interface[] _introspect_("Device") = BUS_DEVICE_INTERFACE;
const char bus_device_invalidating_properties[] =
"SysFSPath\0"
BUS_INTROSPECTABLE_INTERFACE \
"</node>\n"
-const char bus_job_interface[] = BUS_JOB_INTERFACE;
+const char bus_job_interface[] _introspect_("Job") = BUS_JOB_INTERFACE;
#define INVALIDATING_PROPERTIES \
"State\0" \
#define INTROSPECTION_END \
"</node>\n"
-const char bus_manager_interface[] = BUS_MANAGER_INTERFACE;
+const char bus_manager_interface[] _introspect_("Manager") = BUS_MANAGER_INTERFACE;
static DEFINE_BUS_PROPERTY_APPEND_ENUM(bus_manager_append_running_as, manager_running_as, ManagerRunningAs);
BUS_INTROSPECTABLE_INTERFACE \
"</node>\n"
-const char bus_mount_interface[] = BUS_MOUNT_INTERFACE;
+const char bus_mount_interface[] _introspect_("Mount") = BUS_MOUNT_INTERFACE;
const char bus_mount_invalidating_properties[] =
"What\0"
BUS_INTROSPECTABLE_INTERFACE \
"</node>\n"
-const char bus_path_interface[] = BUS_PATH_INTERFACE;
+const char bus_path_interface[] _introspect_("Path") = BUS_PATH_INTERFACE;
static int bus_path_append_paths(Manager *m, DBusMessageIter *i, const char *property, void *data) {
Path *p = data;
BUS_INTROSPECTABLE_INTERFACE \
"</node>\n"
-const char bus_service_interface[] = BUS_SERVICE_INTERFACE;
+const char bus_service_interface[] _introspect_("Service") = BUS_SERVICE_INTERFACE;
const char bus_service_invalidating_properties[] =
"ExecStartPre\0"
BUS_INTROSPECTABLE_INTERFACE \
"</node>\n"
-const char bus_snapshot_interface[] = BUS_SNAPSHOT_INTERFACE;
+const char bus_snapshot_interface[] _introspect_("Snapshot") = BUS_SNAPSHOT_INTERFACE;
DBusHandlerResult bus_snapshot_message_handler(Unit *u, DBusConnection *c, DBusMessage *message) {
const BusProperty properties[] = {
BUS_INTROSPECTABLE_INTERFACE \
"</node>\n"
-const char bus_socket_interface[] = BUS_SOCKET_INTERFACE;
+const char bus_socket_interface[] _introspect_("Socket") = BUS_SOCKET_INTERFACE;
const char bus_socket_invalidating_properties[] =
"ExecStartPre\0"
BUS_INTROSPECTABLE_INTERFACE \
"</node>\n"
-const char bus_swap_interface[] = BUS_SWAP_INTERFACE;
+const char bus_swap_interface[] _introspect_("Swap") = BUS_SWAP_INTERFACE;
const char bus_swap_invalidating_properties[] =
"What\0"
BUS_INTROSPECTABLE_INTERFACE \
"</node>\n"
-const char bus_target_interface[] = BUS_TARGET_INTERFACE;
+const char bus_target_interface[] _introspect_("Target") = BUS_TARGET_INTERFACE;
DBusHandlerResult bus_target_message_handler(Unit *u, DBusConnection *c, DBusMessage *message) {
const BusProperty properties[] = {
BUS_INTROSPECTABLE_INTERFACE \
"</node>\n"
-const char bus_timer_interface[] = BUS_TIMER_INTERFACE;
+const char bus_timer_interface[] _introspect_("Timer") = BUS_TIMER_INTERFACE;
const char bus_timer_invalidating_properties[] =
"Timers\0"
#include "dbus-unit.h"
#include "bus-errors.h"
-const char bus_unit_interface[] = BUS_UNIT_INTERFACE;
+const char bus_unit_interface[] _introspect_("Unit") = BUS_UNIT_INTERFACE;
#define INVALIDATING_PROPERTIES \
"LoadState\0" \
#define _public_ __attribute__ ((visibility("default")))
#define _hidden_ __attribute__ ((visibility("hidden")))
#define _weakref_(x) __attribute__((weakref(#x)))
+#define _introspect_(x) __attribute__((section("introspect." x)))
/* Rounds up */
static inline size_t ALIGN(size_t l) {