[folks/648811-dummy-backend-rebase1: 11/41] dummy: Modernise build system
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [folks/648811-dummy-backend-rebase1: 11/41] dummy: Modernise build system
- Date: Thu, 7 Nov 2013 08:52:41 +0000 (UTC)
commit f1f4f53f673be6dd3a8df81a8214103a0d076ac4
Author: Philip Withnall <philip withnall collabora co uk>
Date: Wed Nov 6 10:21:40 2013 +0000
dummy: Modernise build system
backends/dummy/Makefile.am | 58 +++++++-------------------------
backends/dummy/lib/Makefile.am | 70 +++++++++++++++++++++++++++++-----------
2 files changed, 64 insertions(+), 64 deletions(-)
---
diff --git a/backends/dummy/Makefile.am b/backends/dummy/Makefile.am
index 2df9d30..e3fbd1d 100644
--- a/backends/dummy/Makefile.am
+++ b/backends/dummy/Makefile.am
@@ -2,71 +2,39 @@ SUBDIRS = lib
BACKEND_NAME = "dummy"
-AM_VALAFLAGS += \
- $(ERROR_VALAFLAGS) \
- --vapidir=. \
- --vapidir=$(top_builddir)/backends/dummy/lib \
- --vapidir=$(top_srcdir)/folks \
- $(addprefix --pkg ,$(dummy_deps)) \
- $(NULL)
-
backenddir = $(BACKEND_DIR)/dummy
backend_LTLIBRARIES = dummy.la
-dummy_la_SOURCES = \
- dummy-backend-factory.vala \
+dummy_la_VALAFLAGS = \
+ $(backend_valaflags) \
+ --vapidir=$(top_builddir)/backends/dummy/lib \
+ --pkg folks-dummy \
$(NULL)
-dummy_deps = \
- folks \
- folks-internal \
- folks-dummy \
- gee-0.8 \
- gio-2.0 \
- gobject-2.0 \
+dummy_la_SOURCES = \
+ $(backend_sources) \
+ dummy-backend-factory.vala \
$(NULL)
dummy_la_CPPFLAGS = \
- -I$(top_srcdir)/folks \
+ $(backend_cppflags) \
-I$(top_srcdir)/backends/dummy/lib \
-I$(top_srcdir)/backends/dummy/lib/folks \
- -include $(CONFIG_HEADER) \
- -DPACKAGE_DATADIR=\"$(pkgdatadir)\" \
- -DBACKEND_NAME=\"$(BACKEND_NAME)\" \
- -DG_LOG_DOMAIN=\"$(BACKEND_NAME)\" \
$(NULL)
dummy_la_CFLAGS = \
- $(AM_CFLAGS) \
- $(CODE_COVERAGE_CFLAGS) \
- $(GIO_CFLAGS) \
- $(GLIB_CFLAGS) \
- $(GEE_CFLAGS) \
+ $(backend_cflags) \
$(NULL)
dummy_la_LIBADD = \
- $(AM_LIBADD) \
+ $(backend_libadd) \
$(top_builddir)/backends/dummy/lib/libfolks-dummy.la \
- $(top_builddir)/folks/libfolks.la \
- $(top_builddir)/folks/libfolks-internal.la \
- $(GIO_LIBS) \
- $(GLIB_LIBS) \
- $(GEE_LIBS) \
$(NULL)
dummy_la_LDFLAGS = \
- $(AM_LDFLAGS) \
- $(CODE_COVERAGE_LDFLAGS) \
- -shared \
- -fPIC \
- -module \
- -avoid-version \
- $(NULL)
-
-GITIGNOREFILES = \
- folks-backend-dummy.vapi \
- $(dummy_la_SOURCES:.vala=.c) \
- dummy_la_vala.stamp \
+ -module -avoid-version \
+ $(backend_ldflags) \
$(NULL)
+-include $(top_srcdir)/backends/backend.mk
-include $(top_srcdir)/git.mk
diff --git a/backends/dummy/lib/Makefile.am b/backends/dummy/lib/Makefile.am
index 3d54981..3056a4c 100644
--- a/backends/dummy/lib/Makefile.am
+++ b/backends/dummy/lib/Makefile.am
@@ -26,23 +26,13 @@ pkgconfig_in = folks-dummy.pc.in
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = $(pkgconfig_in:.in=)
-libfolks_dummy_la_vala.stamp:
-
-folks_dummy_valasources = \
+libfolks_dummy_la_SOURCES = \
dummy-backend.vala \
dummy-fat-persona.vala \
dummy-persona.vala \
dummy-persona-store.vala \
$(NULL)
-libfolks_dummy_la_SOURCES = \
- $(folks_dummy_valasources) \
- $(NULL)
-
-# XXX: it would be nice to do something like this below:
-# $(addprefix --pkg ,$(folks_backend_dummy_deps)) \
-# to factor out repetition, but automake's Vala support doesn't like it
-# because it assumes it can simply match every flag in any _VALAFLAGS string.
libfolks_dummy_la_VALAFLAGS = \
$(AM_VALAFLAGS) \
$(ERROR_VALAFLAGS) \
@@ -54,12 +44,20 @@ libfolks_dummy_la_VALAFLAGS = \
--pkg gio-2.0 \
--pkg gobject-2.0 \
--includedir folks \
+ --gir FolksDummy-$(API_VERSION_DOT).gir \
+ --library folks-dummy \
--vapi folks-dummy.vapi \
-H folks/folks-dummy.h \
$(NULL)
+libfolks_dummy_la_CPPFLAGS = \
+ $(AM_CPPFLAGS) \
+ -include $(top_srcdir)/folks/warnings.h \
+ $(NULL)
+
libfolks_dummy_la_CFLAGS = \
$(AM_CFLAGS) \
+ $(ERROR_CFLAGS) \
$(CODE_COVERAGE_CFLAGS) \
$(GIO_CFLAGS) \
$(GLIB_CFLAGS) \
@@ -100,17 +98,51 @@ dist_vapi_DATA = \
# General
##################################################################
-MAINTAINERCLEANFILES = \
- $(folks_dummy_valasources:.vala=.c) \
- libfolks_dummy_la_vala.stamp \
- folks/folks-dummy.h \
- folks-dummy.vapi \
- $(NULL)
-
+CLEANFILES =
+MAINTAINERCLEANFILES =
EXTRA_DIST = \
$(pkgconfig_in) \
$(MAINTAINERCLEANFILES) \
$(NULL)
--include ../backend.mk
+##################################################################
+# Introspection
+##################################################################
+
+-include $(INTROSPECTION_MAKEFILE)
+INTROSPECTION_SCANNER_ARGS = \
+ $(ERROR_INTROSPECTION_SCANNER_ARGS) \
+ --add-include-path=$(srcdir) \
+ --add-include-path=$(abs_top_builddir)/folks \
+ --warn-all \
+ $(NULL)
+
+# Set PKG_CONFIG_PATH so we can find the backend's uninstalled pkg-config file.
+INTROSPECTION_SCANNER_ENV = \
+ PKG_CONFIG_PATH=$(top_builddir)/folks:$${PKG_CONFIG_PATH}
+
+INTROSPECTION_COMPILER_ARGS = \
+ --includedir=$(srcdir) \
+ --includedir=$(abs_top_builddir)/folks \
+ $(NULL)
+
+if HAVE_INTROSPECTION
+FolksDummy-$(API_VERSION_DOT).gir: libfolks-dummy.la
+GIRS = FolksDummy-$(API_VERSION_DOT).gir
+
+girdir = $(datadir)/gir-1.0
+dist_gir_DATA = $(GIRS)
+
+MAINTAINERCLEANFILES += $(dist_gir_DATA)
+
+typelibdir = $(libdir)/girepository-1.0
+nodist_typelib_DATA = $(GIRS:.gir=.typelib)
+
+CLEANFILES += $(nodist_typelib_DATA)
+endif
+
+##################################################################
+# Common
+##################################################################
+
-include $(top_srcdir)/git.mk
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]