From: Chun-wei Fan Date: Thu, 24 Apr 2014 10:48:32 +0000 (+0800) Subject: atk/Makefile.am: Update Generation of Enum Sources X-Git-Tag: ATK_2_13_1~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9a1ae853a6262fda7c82ce431597c21ec5fd1a42;p=platform%2Fupstream%2Fatk.git atk/Makefile.am: Update Generation of Enum Sources This makes sure that the generated enumeration header include atk/atkversion.h, and decorate the symbols there with ATK_AVAILABLE_IN_ALL. Also, make sure that the generated enumeration source file includes config.h before including atk.h. https://bugzilla.gnome.org/show_bug.cgi?id=728031 --- diff --git a/atk/Makefile.am b/atk/Makefile.am index c049470..354c0e2 100644 --- a/atk/Makefile.am +++ b/atk/Makefile.am @@ -135,9 +135,9 @@ atk-enum-types.h: s-enum-types-h @true s-enum-types-h: @REBUILD@ $(atk_headers) Makefile $(AM_V_GEN) ( cd $(srcdir) && $(GLIB_MKENUMS) \ - --fhead "#if defined(ATK_DISABLE_SINGLE_INCLUDES) && !defined (__ATK_H_INSIDE__) && !defined (ATK_COMPILATION)\n#error \"Only can be included directly.\"\n#endif\n\n#ifndef __ATK_ENUM_TYPES_H__\n#define __ATK_ENUM_TYPES_H__\n\n#include \n\nG_BEGIN_DECLS\n" \ + --fhead "#if defined(ATK_DISABLE_SINGLE_INCLUDES) && !defined (__ATK_H_INSIDE__) && !defined (ATK_COMPILATION)\n#error \"Only can be included directly.\"\n#endif\n\n#ifndef __ATK_ENUM_TYPES_H__\n#define __ATK_ENUM_TYPES_H__\n\n#include \n#include \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" \ + --vhead "ATK_AVAILABLE_IN_ALL\nGType @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__ */" \ $(atk_headers) ) > tmp-atk-enum-types.h \ && (cmp -s tmp-atk-enum-types.h atk-enum-types.h || cp tmp-atk-enum-types.h atk-enum-types.h ) \ @@ -148,7 +148,7 @@ atk-enum-types.c: s-enum-types-c @true s-enum-types-c: @REBUILD@ $(atk_headers) Makefile $(AM_V_GEN) ( cd $(srcdir) && $(GLIB_MKENUMS) \ - --fhead "#include " \ + --fhead "#include \"config.h\"\n\n#include " \ --fprod "\n/* enumerations from \"@filename@\" */" \ --vhead "GType\n@enum_name@_get_type (void)\n{\n static GType etype = 0;\n if (etype == 0) {\n static const G@Type@Value values[] = {" \ --vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \