add G_DISABLE_SINGLE_INCLUDES and ATK_DISABLE_SINGLE_INCLUDES to CPPFLAGS.
[platform/upstream/atk.git] / atk / Makefile.am
index f243d38..7bb3155 100644 (file)
@@ -11,6 +11,7 @@ endif
 INCLUDES = \
        -I$(top_srcdir)         \
        -DG_DISABLE_DEPRECATED  \
+       -DATK_COMPILATION       \
        -DATK_LOCALEDIR="\"$(datadir)/locale\"" \
        $(DEP_CFLAGS)
 
@@ -109,7 +110,7 @@ atk-enum-types.h: s-enum-types-h
        @true
 s-enum-types-h: @REBUILD@ $(atk_headers) Makefile
        ( cd $(srcdir) && $(GLIB_MKENUMS) \
-                       --fhead "#ifndef __ATK_ENUM_TYPES_H__\n#define __ATK_ENUM_TYPES_H__\n\n#include <glib-object.h>\n\nG_BEGIN_DECLS\n" \
+                       --fhead "#if defined(ATK_DISABLE_SINGLE_INCLUDES) && !defined (__ATK_H_INSIDE__) && !defined (ATK_COMPILATION)\n#error \"Only <atk/atk.h> can be included directly.\"\n#endif\n\n#ifndef __ATK_ENUM_TYPES_H__\n#define __ATK_ENUM_TYPES_H__\n\n#include <glib-object.h>\n\nG_BEGIN_DECLS\n" \
                        --fprod "/* enumerations from \"@filename@\" */\n" \
                        --vhead "GType @enum_name@_get_type (void);\n#define ATK_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n"         \
                        --ftail "G_END_DECLS\n\n#endif /* __ATK_ENUM_TYPES_H__ */" \