aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Uebernickel <lars.uebernickel@canonical.com>2012-11-13 13:32:15 +0100
committerLars Uebernickel <lars.uebernickel@canonical.com>2012-11-13 13:32:15 +0100
commitef6b3b8daaef62a502c60e0faa22c3a4b10c0399 (patch)
treecccabb0cb11481dfee6fd292fe2e56c63c5d3140
parentb2c1e66e48d69199ba5d5cc607f47d695919a140 (diff)
downloadayatana-indicator-messages-ef6b3b8daaef62a502c60e0faa22c3a4b10c0399.tar.gz
ayatana-indicator-messages-ef6b3b8daaef62a502c60e0faa22c3a4b10c0399.tar.bz2
ayatana-indicator-messages-ef6b3b8daaef62a502c60e0faa22c3a4b10c0399.zip
Move service .xml into a common directory
Both the service (in src/) and the client library (in libmessaging-menu/) need access to the dbus interface description file. Until now, it resided in src, with both Makefiles calling gdbus-codegen on it. This patch moves the file to common/ and builds a convenience library that contains only the generated code.
-rw-r--r--Makefile.am1
-rw-r--r--common/Makefile.am22
-rw-r--r--common/com.canonical.indicator.messages.service.xml (renamed from src/messages-service.xml)0
-rw-r--r--configure.ac1
-rw-r--r--libmessaging-menu/Makefile.am24
-rw-r--r--src/Makefile.am30
-rw-r--r--test/Makefile.am4
7 files changed, 38 insertions, 44 deletions
diff --git a/Makefile.am b/Makefile.am
index daeb2b7..f8141a8 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,5 +1,6 @@
SUBDIRS = \
+ common \
src \
libmessaging-menu \
data \
diff --git a/common/Makefile.am b/common/Makefile.am
new file mode 100644
index 0000000..5bd7e20
--- /dev/null
+++ b/common/Makefile.am
@@ -0,0 +1,22 @@
+
+noinst_LTLIBRARIES = libmessaging-common.la
+
+indicator-messages-service.c: com.canonical.indicator.messages.service.xml
+ $(AM_V_GEN) gdbus-codegen \
+ --interface-prefix com.canonical.indicator.messages. \
+ --generate-c-code indicator-messages-service \
+ --c-namespace IndicatorMessages \
+ $^
+indicator-messages-service.h: indicator-messages-service.c
+
+BUILT_SOURCES = \
+ indicator-messages-service.c \
+ indicator-messages-service.h
+
+libmessaging_common_la_SOURCES = \
+ $(BUILT_SOURCES)
+
+libmessaging_common_la_CFLAGS = $(GIO_CFLAGS)
+libmessaging_common_la_LIBADD = $(GIO_LIBS)
+
+CLEANFILES = $(BUILT_SOURCES)
diff --git a/src/messages-service.xml b/common/com.canonical.indicator.messages.service.xml
index 00ae154..00ae154 100644
--- a/src/messages-service.xml
+++ b/common/com.canonical.indicator.messages.service.xml
diff --git a/configure.ac b/configure.ac
index 8aa2e8a..b5af4d1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -156,6 +156,7 @@ AM_GLIB_GNU_GETTEXT
AC_OUTPUT([
Makefile
src/Makefile
+common/Makefile
data/Makefile
data/icons/Makefile
data/icons/16x16/Makefile
diff --git a/libmessaging-menu/Makefile.am b/libmessaging-menu/Makefile.am
index 15d0c9b..411f7ff 100644
--- a/libmessaging-menu/Makefile.am
+++ b/libmessaging-menu/Makefile.am
@@ -7,36 +7,24 @@ libmessaging_menu_la_SOURCES = \
messaging-menu-app.c \
messaging-menu-message.c \
gtupleaction.c \
- gtupleaction.h \
- $(BUILT_SOURCES)
+ gtupleaction.h
libmessaging_menu_la_HEADERS = \
messaging-menu-app.h \
messaging-menu.h \
messaging-menu-message.h
-libmessaging_menu_la_LIBADD = $(GIO_LIBS)
+libmessaging_menu_la_LIBADD = \
+ $(GIO_LIBS) \
+ $(top_builddir)/common/libmessaging-common.la
libmessaging_menu_la_CFLAGS = \
+ -I$(top_builddir)/common \
$(GIO_CFLAGS) \
-Wall
libmessaging_menu_la_LDFLAGS = -export-symbols-regex "^messaging_menu_.*"
-BUILT_SOURCES = \
- indicator-messages-service.c \
- indicator-messages-service.h
-
-CLEANFILES = $(BUILT_SOURCES)
-
-indicator-messages-service.c: $(top_srcdir)/src/messages-service.xml
- $(AM_V_GEN) gdbus-codegen \
- --interface-prefix com.canonical.indicator.messages. \
- --generate-c-code indicator-messages-service \
- --c-namespace IndicatorMessages \
- $^
-indicator-messages-service.h: indicator-messages-service.c
-
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = messaging-menu.pc
@@ -69,5 +57,5 @@ gir_DATA = $(INTROSPECTION_GIRS)
typelibdir = $(libdir)/girepository-1.0
typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
-CLEANFILES +=$(gir_DATA) $(typelib_DATA)
+CLEANFILES = $(gir_DATA) $(typelib_DATA)
endif
diff --git a/src/Makefile.am b/src/Makefile.am
index 1df80e5..a7bfe66 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,8 +1,5 @@
-BUILT_SOURCES =
EXTRA_DIST =
-CLEANFILES =
-DISTCLEANFILES =
libexec_PROGRAMS = indicator-messages-service
@@ -23,19 +20,20 @@ libmessaging_la_SOURCES = \
im-source-menu-item.h \
ido-detail-label.c \
ido-detail-label.h \
- indicator-messages-service.c \
- indicator-messages-service.h
dbus-data.h
libmessaging_la_CFLAGS = \
$(APPLET_CFLAGS) \
$(COVERAGE_CFLAGS) \
+ -I$(top_builddir)/common \
-Wall \
-Wl,-Bsymbolic-functions \
-Wl,-z,defs \
-Wl,--as-needed \
-Werror \
-DG_LOG_DOMAIN=\"Indicator-Messages\"
-libmessaging_la_LIBADD = $(APPLET_LIBS) -lm
+libmessaging_la_LIBADD = \
+ $(top_builddir)/common/libmessaging-common.la \
+ $(APPLET_LIBS) -lm
libmessaging_la_LDFLAGS = \
$(COVERAGE_LDFLAGS) \
-module -avoid-version
@@ -46,8 +44,6 @@ libmessaging_la_LDFLAGS = \
indicator_messages_service_SOURCES = \
messages-service.c \
- indicator-messages-service.c \
- indicator-messages-service.h \
app-section.c \
app-section.h \
dbus-data.h \
@@ -61,6 +57,7 @@ indicator_messages_service_SOURCES = \
indicator_messages_service_CFLAGS = \
$(APPLET_CFLAGS) \
$(COVERAGE_CFLAGS) \
+ -I$(top_builddir)/common \
-Wall \
-Wl,-Bsymbolic-functions \
-Wl,-z,defs \
@@ -69,26 +66,11 @@ indicator_messages_service_CFLAGS = \
-DG_LOG_DOMAIN=\"Indicator-Messages\"
indicator_messages_service_LDADD = \
+ $(top_builddir)/common/libmessaging-common.la \
$(APPLET_LIBS)
indicator_messages_service_LDFLAGS = \
$(COVERAGE_LDFLAGS)
-indicator-messages-service.c: $(top_srcdir)/src/messages-service.xml
- $(AM_V_GEN) gdbus-codegen \
- --interface-prefix com.canonical.indicator.messages. \
- --generate-c-code indicator-messages-service \
- --c-namespace IndicatorMessages \
- $^
-indicator-messages-service.h: indicator-messages-service.c
-
-BUILT_SOURCES += \
- indicator-messages-service.c \
- indicator-messages-service.h
-
EXTRA_DIST += \
messages-service.xml
-
-CLEANFILES += \
- $(BUILT_SOURCES)
-
diff --git a/test/Makefile.am b/test/Makefile.am
index 4671446..ee7cb3e 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -38,8 +38,8 @@ noinst_LTLIBRARIES = \
libindicator-messages-service.la
libindicator_messages_service_la_SOURCES = \
- $(top_builddir)/src/indicator-messages-service.c \
- $(top_builddir)/src/indicator-messages-service.h \
+ $(top_builddir)/common/indicator-messages-service.c \
+ $(top_builddir)/common/indicator-messages-service.h \
$(top_srcdir)/src/app-section.c \
$(top_srcdir)/src/app-section.h \
$(top_srcdir)/src/gactionmuxer.c \