diff --git a/Makefile b/Makefile index 8f76699..6193fae 100644 --- a/Makefile +++ b/Makefile @@ -68,9 +68,10 @@ version.h: version.h.in config.mk $(QUIET)mv version.h.tmp version.h dbus-interface-definitions.c: data/org.pwmt.zathura.xml - $(QUIET)echo "const char* DBUS_INTERFACE_XML =" > dbus-interface-definitions.c.tmp + $(QUIET)echo '#include "dbus-interface-definitions.h"' > dbus-interface-definitions.c.tmp + $(QUIET)echo 'const char* DBUS_INTERFACE_XML =' >> dbus-interface-definitions.c.tmp $(QUIET)sed 's/^\(.*\)$$/"\1\\n"/' data/org.pwmt.zathura.xml >> dbus-interface-definitions.c.tmp - $(QUIET)echo ";" >> dbus-interface-definitions.c.tmp + $(QUIET)echo ';' >> dbus-interface-definitions.c.tmp $(QUIET)mv dbus-interface-definitions.c.tmp dbus-interface-definitions.c %.o: %.c diff --git a/dbus-interface-definitions.h b/dbus-interface-definitions.h new file mode 100644 index 0000000..9ebef64 --- /dev/null +++ b/dbus-interface-definitions.h @@ -0,0 +1,8 @@ +/* See LICENSE file for license and copyright information */ + +#ifndef ZATHURA_DBUS_INTERFACE_DEFINITIONS +#define ZATHURA_DBUS_INTERFACE_DEFINITIONS + +const char* DBUS_INTERFACE_XML; + +#endif diff --git a/dbus-interface.c b/dbus-interface.c index 38745d5..3c39ae4 100644 --- a/dbus-interface.c +++ b/dbus-interface.c @@ -6,6 +6,7 @@ #include "zathura.h" #include "document.h" #include "utils.h" +#include "dbus-interface-definitions.h" #include #include @@ -34,9 +35,6 @@ typedef struct private_s { (G_TYPE_INSTANCE_GET_PRIVATE((obj), ZATHURA_TYPE_DBUS, \ private_t)) -/* in dbus-interface-definitions.c */ -extern const char* DBUS_INTERFACE_XML; - static const GDBusInterfaceVTable interface_vtable; static void