From ee91b5e0ed9465a711e52cce2f549a6de591d9a9 Mon Sep 17 00:00:00 2001 From: Pierre-Luc Beaudoin Date: Thu, 16 Oct 2008 16:18:10 -0400 Subject: [PATCH] Force to only include --- champlain/Makefile.am | 2 +- champlain/champlain.h | 4 ++++ champlain/champlaindefines.h | 4 ++++ champlain/champlainlayer.h | 4 ++++ champlain/champlainmarker.h | 4 ++++ champlain/champlainview.h | 4 ++++ 6 files changed, 21 insertions(+), 1 deletion(-) diff --git a/champlain/Makefile.am b/champlain/Makefile.am index 518cf65..38d7ef5 100644 --- a/champlain/Makefile.am +++ b/champlain/Makefile.am @@ -53,7 +53,7 @@ libchamplain_include_HEADERS = champlain.h champlainview.h champlaindefines.h ch libchamplain_0_2_la_LDFLAGS= -version-info $(LIBRARY_VERSION) -AM_CPPFLAGS = $(DEPS_CFLAGS) -DDATADIR=\""$(datadir)"\" -I$(top_srcdir)/tidy -I$(top_srcdir) +AM_CPPFLAGS = $(DEPS_CFLAGS) -DDATADIR=\""$(datadir)"\" -I$(top_srcdir)/tidy -I$(top_srcdir) -DCHAMPLAIN_COMPILATION AM_LDFLAGS = $(DEPS_LIBS) -export-dynamic -export-symbols-regex ^champlain_.* svgdir = $(datadir)/champlain diff --git a/champlain/champlain.h b/champlain/champlain.h index cdaf714..4acdb2b 100644 --- a/champlain/champlain.h +++ b/champlain/champlain.h @@ -19,6 +19,8 @@ #ifndef CHAMPLAIN_H #define CHAMPLAIN_H +#define __CHAMPLAIN_CHAMPLAIN_H_INSIDE__ + #define CHAMPLAIN_MIN_LAT -90 #define CHAMPLAIN_MAX_LAT 90 #define CHAMPLAIN_MIN_LONG -180 @@ -31,4 +33,6 @@ #include #include +#undef __CHAMPLAIN_CHAMPLAIN_H_INSIDE__ + #endif diff --git a/champlain/champlaindefines.h b/champlain/champlaindefines.h index c0f6533..9c3ea97 100644 --- a/champlain/champlaindefines.h +++ b/champlain/champlaindefines.h @@ -16,6 +16,10 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#if !defined (__CHAMPLAIN_CHAMPLAIN_H_INSIDE__) && !defined (CHAMPLAIN_COMPILATION) +#error "Only can be included directly." +#endif + #ifndef CHAMPLAIN_DEFINES_H #define CHAMPLAIN_DEFINES_H diff --git a/champlain/champlainlayer.h b/champlain/champlainlayer.h index 99c4a91..f22e4b3 100644 --- a/champlain/champlainlayer.h +++ b/champlain/champlainlayer.h @@ -16,6 +16,10 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#if !defined (__CHAMPLAIN_CHAMPLAIN_H_INSIDE__) && !defined (CHAMPLAIN_COMPILATION) +#error "Only can be included directly." +#endif + #ifndef CHAMPLAIN_LAYER_H #define CHAMPLAIN_LAYER_H diff --git a/champlain/champlainmarker.h b/champlain/champlainmarker.h index badb41d..8853caf 100644 --- a/champlain/champlainmarker.h +++ b/champlain/champlainmarker.h @@ -16,6 +16,10 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#if !defined (__CHAMPLAIN_CHAMPLAIN_H_INSIDE__) && !defined (CHAMPLAIN_COMPILATION) +#error "Only can be included directly." +#endif + #ifndef CHAMPLAIN_MARKER_H #define CHAMPLAIN_MARKER_H diff --git a/champlain/champlainview.h b/champlain/champlainview.h index 581c1a8..88810f2 100644 --- a/champlain/champlainview.h +++ b/champlain/champlainview.h @@ -16,6 +16,10 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#if !defined (__CHAMPLAIN_CHAMPLAIN_H_INSIDE__) && !defined (CHAMPLAIN_COMPILATION) +#error "Only can be included directly." +#endif + #ifndef CHAMPLAIN_VIEW_H #define CHAMPLAIN_VIEW_H -- 2.39.5