Use templates for glib-mkenums calls instead of complicated commandlines
2007-11-26 Matthias Clasen <mclasen@redhat.com> Use templates for glib-mkenums calls instead of complicated commandlines in Makefiles. (#429910) * gdk-pixbuf/Makefile.am: * gdk/Makefile.am: * gtk/Makefile.am: * perf/Makefile.am: Use templates for glib-mkenums * gdk-pixbuf/gdk-pixbuf-enum-types.[ch].template: * gdk/gdkenumtypes.[ch].template: * gtk/gtktypebuiltings.[ch].template: * perf/typebuiltins.[ch].template: The templates svn path=/trunk/; revision=19053
This commit is contained in:
committed by
Matthias Clasen
parent
d5eb6847e5
commit
736f86b303
@ -71,24 +71,14 @@ marshalers.c: @REBUILD@ marshalers.list
|
||||
|
||||
typebuiltins.h: stamp-typebuiltins.h
|
||||
@true
|
||||
stamp-typebuiltins.h: @REBUILD@ $(headers_with_enums) Makefile
|
||||
( cd $(srcdir) && $(GLIB_MKENUMS) \
|
||||
--fhead "#ifndef __TYPE_BUILTINS_H__\n#define __TYPE_BUILTINS_H__\n\n#include <glib-object.h>\n\nG_BEGIN_DECLS\n" \
|
||||
--fprod "/* enumerations from \"@filename@\" */\n" \
|
||||
--vhead "GType @enum_name@_get_type (void) G_GNUC_CONST;\n#define GTK_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n" \
|
||||
--ftail "G_END_DECLS\n\n#endif /* __TYPE_BUILTINS_H__ */" \
|
||||
stamp-typebuiltins.h: @REBUILD@ $(headers_with_enums) typebuiltins.h.template
|
||||
( cd $(srcdir) && $(GLIB_MKENUMS) --template typebuiltins.h.template \
|
||||
$(headers_with_enums) ) >> xgen-gtbh \
|
||||
&& (cmp -s xgen-gtbh typebuiltins.h || cp xgen-gtbh typebuiltins.h ) \
|
||||
&& rm -f xgen-gtbh \
|
||||
&& echo timestamp > $(@F)
|
||||
typebuiltins.c: @REBUILD@ $(headers_with_enums) Makefile
|
||||
( cd $(srcdir) && $(GLIB_MKENUMS) \
|
||||
--fhead "#include \"gtkwidgetprofiler.h\"" \
|
||||
--ftail "#define __TYPE_BUILTINS_C__\n" \
|
||||
--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@\" }," \
|
||||
--vtail " { 0, NULL, NULL }\n };\n etype = g_@type@_register_static (\"@EnumName@\", values);\n }\n return etype;\n}\n" \
|
||||
typebuiltins.c: @REBUILD@ $(headers_with_enums) typebuiltins.c.template
|
||||
( cd $(srcdir) && $(GLIB_MKENUMS) --template typebuiltins.c.template \
|
||||
$(headers_with_enums) ) > xgen-gtbc \
|
||||
&& cp xgen-gtbc typebuiltins.c \
|
||||
&& rm -f xgen-gtbc
|
||||
@ -97,6 +87,8 @@ typebuiltins.c: @REBUILD@ $(headers_with_enums) Makefile
|
||||
EXTRA_DIST += \
|
||||
README \
|
||||
marshalers.list \
|
||||
typebuiltins.c.template \
|
||||
typebuiltins.h.template \
|
||||
$(BUILT_SOURCES)
|
||||
|
||||
# if srcdir!=builddir, clean out maintainer-clean files from builddir
|
||||
|
||||
Reference in New Issue
Block a user