From b4ea70b425da90c474787a7b56434b26526f49fa Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Mon, 25 Feb 2013 14:13:38 +0000 Subject: [PATCH] cd into the srcdir to read headers while looking for enum types In the process, don't harvest enum types from wocky-signals-marshal.h: it isn't in the srcdir, but in any case it doesn't have enums. Signed-off-by: Simon McVittie --- wocky/Makefile.am | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/wocky/Makefile.am b/wocky/Makefile.am index fde51ba..31d0b5e 100644 --- a/wocky/Makefile.am +++ b/wocky/Makefile.am @@ -22,7 +22,6 @@ enumtype_sources = \ wocky-muc.h \ wocky-pubsub-node.h \ wocky-pubsub-service.h \ - wocky-signals-marshal.h \ wocky-tls.h \ wocky-xmpp-error.h \ wocky-xmpp-reader.h @@ -264,22 +263,22 @@ libwocky_la_LIBADD = \ # rules for making the glib enum objects wocky-enumtypes.h: $(enumtype_sources) Makefile.am - $(AM_V_GEN)glib-mkenums \ + $(AM_V_GEN)( cd $(srcdir) && glib-mkenums \ --fhead "#ifndef __WOCKY_ENUM_TYPES_H__\n#define __WOCKY_ENUM_TYPES_H__\n\n#include \n\nG_BEGIN_DECLS\n" \ --fprod "/* enumerations from \"@filename@\" */\n" \ --vhead "GType @enum_name@_get_type (void);\n#define WOCKY_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n" \ --ftail "G_END_DECLS\n\n#endif /* __WOCKY_ENUM_TYPES_H__ */" \ - $(enumtype_sources) > $@ + $(enumtype_sources) ) > $@ wocky-enumtypes.c: $(enumtype_sources) Makefile.am - $(AM_V_GEN)glib-mkenums \ + $(AM_V_GEN)( cd $(srcdir) && glib-mkenums \ --fhead "#include \"config.h\"\n" \ --fhead "#include <$*.h>" \ --fprod "\n/* enumerations from \"@filename@\" */\n#include \"@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@\" }," \ --vtail " { 0, NULL, NULL }\n };\n etype = g_@type@_register_static (\"@EnumName@\", values);\n }\n return etype;\n}\n" \ - $(enumtype_sources) > $@ + $(enumtype_sources) ) > $@ Android.mk: Makefile.am $(built_sources) $(built_headers) androgenizer -:PROJECT wocky -:SHARED wocky -:TAGS eng debug \ -- 1.7.10.4