From 85e7b51cf2138f272a0fb5c8083bc044c50327b9 Mon Sep 17 00:00:00 2001 From: "David I. Lehn" Date: Tue, 3 Feb 2004 08:56:06 +0000 Subject: gst-libs/gst/: Generate enum type code with glib-mkenums. Original commit message from CVS: * gst-libs/gst/colorbalance/Makefile.am: * gst-libs/gst/colorbalance/colorbalance.h: * gst-libs/gst/mixer/Makefile.am: * gst-libs/gst/mixer/mixer.h: * gst-libs/gst/play/Makefile.am: * gst-libs/gst/play/play.h: * gst-libs/gst/tuner/Makefile.am: * gst-libs/gst/tuner/tuner.h: Generate enum type code with glib-mkenums. * gst-libs/gst/colorbalance/.cvsignore: * gst-libs/gst/mixer/.cvsignore: * gst-libs/gst/play/.cvsignore: * gst-libs/gst/tuner/.cvsignore: Ignore generated files. --- gst-libs/gst/tuner/Makefile.am | 39 +++++++++++++++++++++++++++++++-------- 1 file changed, 31 insertions(+), 8 deletions(-) (limited to 'gst-libs/gst/tuner/Makefile.am') diff --git a/gst-libs/gst/tuner/Makefile.am b/gst-libs/gst/tuner/Makefile.am index f25ab297..c4020a4b 100644 --- a/gst-libs/gst/tuner/Makefile.am +++ b/gst-libs/gst/tuner/Makefile.am @@ -1,10 +1,16 @@ -libgstinterfacesincludedir = \ +libgsttunerincludedir = \ $(includedir)/gstreamer-@GST_MAJORMINOR@/gst/tuner -libgstinterfacesinclude_HEADERS = \ - tuner.h \ - tunernorm.h \ - tunerchannel.h +tuner_headers = \ + tuner.h \ + tunernorm.h \ + tunerchannel.h + +built_headers = \ + tunermarshal.h + tunerenumtypes.h + +libgsttunerinclude_HEADERS = $(tuner_headers) $(built_headers) noinst_LTLIBRARIES = libgsttuner.la @@ -17,9 +23,9 @@ libgsttuner_la_CFLAGS = $(GST_CFLAGS) BUILT_SOURCES = \ tunermarshal.c \ - tunermarshal.h -built_headers = \ - tunermarshal.h + tunermarshal.h \ + tunerenumtypes.c \ + tunerenumtypes.h EXTRA_DIST = tunermarshal.list @@ -33,3 +39,20 @@ tunermarshal.c: tunermarshal.list echo "#include \"tunermarshal.h\"" >> tunermarshal.c.tmp glib-genmarshal --body --prefix=gst_tuner_marshal $^ >> tunermarshal.c.tmp mv tunermarshal.c.tmp tunermarshal.c + +tunerenumtypes.h: $(tuner_headers) + glib-mkenums \ + --fhead "#ifndef __GST_TUNER_ENUM_TYPES_H__\n#define __GST_TUNER_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 GST_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n" \ + --ftail "G_END_DECLS\n\n#endif /* __GST_TUNER_ENUM_TYPES_H__ */" \ + $^ > $@ + +tunerenumtypes.c: $(tuner_headers) + glib-mkenums \ + --fhead "#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@\" }," \ + --vtail " { 0, NULL, NULL }\n };\n etype = g_@type@_register_static (\"@EnumName@\", values);\n }\n return etype;\n}\n" \ + $^ > $@ -- cgit v1.2.1