From e11a6dd30e7e7af4da203c97fe2d4ff87c76fdca Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Fri, 4 May 2012 12:51:34 +0100 Subject: [PATCH 3/7] Define _TP_COMPILATION when compiling library and tests (but not examples) This will switch off single-inclusion checks. We don't want to use telepathy-glib/telepathy-glib.h within the library since it'll trigger mass recompilation whenever any header changes. For the examples, it seems acceptable to use the meta-header so that the examples will be exemplary. --- telepathy-glib/Makefile.am | 6 +++++- tests/Makefile.am | 1 + tests/dbus/Makefile.am | 1 + tests/lib/Makefile.am | 4 ++++ 4 files changed, 11 insertions(+), 1 deletion(-) diff --git a/telepathy-glib/Makefile.am b/telepathy-glib/Makefile.am index 30efdb6..33e1a42 100644 --- a/telepathy-glib/Makefile.am +++ b/telepathy-glib/Makefile.am @@ -303,8 +303,12 @@ libtelepathy_glib_internal_la_SOURCES = \ util.c \ util-internal.h -AM_CFLAGS = \ +AM_CPPFLAGS = \ -DG_LOG_DOMAIN=\"tp-glib\" \ + -D_TP_COMPILATION \ + $(NULL) + +AM_CFLAGS = \ $(ERROR_CFLAGS) \ @DBUS_CFLAGS@ \ @GLIB_CFLAGS@ \ diff --git a/tests/Makefile.am b/tests/Makefile.am index 63abac5..0be1069 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -142,6 +142,7 @@ LDADD = \ AM_CPPFLAGS = \ -I${top_srcdir} -I${top_builddir} \ + -D_TP_COMPILATION \ -D_TP_IGNORE_DEPRECATIONS \ $(GLIB_CFLAGS) \ $(DBUS_CFLAGS) \ diff --git a/tests/dbus/Makefile.am b/tests/dbus/Makefile.am index b1c77a9..79d89ec 100644 --- a/tests/dbus/Makefile.am +++ b/tests/dbus/Makefile.am @@ -263,6 +263,7 @@ check-local: check-coding-style AM_CPPFLAGS = \ -I${top_srcdir} -I${top_builddir} \ + -D_TP_COMPILATION \ -D_TP_IGNORE_DEPRECATIONS \ $(GLIB_CFLAGS) \ $(DBUS_CFLAGS) \ diff --git a/tests/lib/Makefile.am b/tests/lib/Makefile.am index 8fad58a..4068f6f 100644 --- a/tests/lib/Makefile.am +++ b/tests/lib/Makefile.am @@ -80,6 +80,10 @@ check_c_sources = *.c include $(top_srcdir)/tools/check-coding-style.mk check-local: check-coding-style +AM_CPPFLAGS = \ + -D_TP_COMPILATION \ + $(NULL) + AM_CFLAGS = \ $(ERROR_CFLAGS) \ $(DBUS_CFLAGS) \ -- 1.7.10