From 4785fe4a9704b659f857e9297ddb9f6e800620ce Mon Sep 17 00:00:00 2001 From: Thomas Vander Stichele Date: Tue, 3 Feb 2004 16:49:54 +0000 Subject: use glib-gen.mak fix Makefile.am bugs and clean them up Original commit message from CVS: use glib-gen.mak fix Makefile.am bugs and clean them up --- gst-libs/gst/mixer/.gitignore | 4 +-- gst-libs/gst/mixer/Makefile.am | 51 ++++++++++++----------------------- gst-libs/gst/mixer/mixer-marshal.list | 2 ++ gst-libs/gst/mixer/mixer.c | 2 +- gst-libs/gst/mixer/mixer.h | 2 +- gst-libs/gst/mixer/mixermarshal.list | 2 -- 6 files changed, 23 insertions(+), 40 deletions(-) create mode 100644 gst-libs/gst/mixer/mixer-marshal.list delete mode 100644 gst-libs/gst/mixer/mixermarshal.list (limited to 'gst-libs/gst/mixer') diff --git a/gst-libs/gst/mixer/.gitignore b/gst-libs/gst/mixer/.gitignore index 968ea36b..de851131 100644 --- a/gst-libs/gst/mixer/.gitignore +++ b/gst-libs/gst/mixer/.gitignore @@ -1,2 +1,2 @@ -mixerenumtypes.[ch] -mixermarshal.[ch] +mixer-enumtypes.[ch] +mixer-marshal.[ch] diff --git a/gst-libs/gst/mixer/Makefile.am b/gst-libs/gst/mixer/Makefile.am index 7871a24d..7c52dda6 100644 --- a/gst-libs/gst/mixer/Makefile.am +++ b/gst-libs/gst/mixer/Makefile.am @@ -1,3 +1,10 @@ +# variables used for enum/marshal generation +glib_enum_headers=$(mixer_headers) +glib_enum_define=GST_MIXER +glib_root=mixer +glib_enum_prefix=gst_mixer + + libgstmixerincludedir = \ $(includedir)/gstreamer-@GST_MAJORMINOR@/gst/mixer @@ -6,8 +13,8 @@ mixer_headers = \ mixertrack.h built_headers = \ - mixermarshal.h \ - mixerenumtypes.h + $(glib_root)-marshal.h \ + $(glib_root)-enumtypes.h libgstmixerinclude_HEADERS = $(mixer_headers) $(built_headers) @@ -16,42 +23,18 @@ noinst_LTLIBRARIES = libgstmixer.la libgstmixer_la_SOURCES = \ mixer.c \ mixertrack.c \ - mixermarshal.c \ - mixerenumtypes.c + $(glib_root)-marshal.c \ + $(glib_root)-enumtypes.c + libgstmixer_la_CFLAGS = $(GST_CFLAGS) BUILT_SOURCES = \ - mixermarshal.c \ - mixermarshal.h \ - mixerenumtypes.c \ - mixerenumtypes.h + $(glib_root)-marshal.c \ + $(glib_root)-enumtypes.c \ + $(built_headers) -EXTRA_DIST = mixermarshal.list +EXTRA_DIST = mixer-marshal.list CLEANFILES = $(BUILT_SOURCES) -mixermarshal.h: mixermarshal.list - glib-genmarshal --header --prefix=gst_mixer_marshal $^ > mixermarshal.h.tmp - mv mixermarshal.h.tmp mixermarshal.h - -mixermarshal.c: mixermarshal.list - echo "#include \"mixermarshal.h\"" >> mixermarshal.c.tmp - glib-genmarshal --body --prefix=gst_mixer_marshal $^ >> mixermarshal.c.tmp - mv mixermarshal.c.tmp mixermarshal.c - -mixerenumtypes.h: $(mixer_headers) - glib-mkenums \ - --fhead "#ifndef __GST_MIXER_ENUM_TYPES_H__\n#define __GST_MIXER_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_MIXER_ENUM_TYPES_H__ */" \ - $^ > $@ - -mixerenumtypes.c: $(mixer_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" \ - $^ > $@ +include $(top_srcdir)/common/glib-gen.mak diff --git a/gst-libs/gst/mixer/mixer-marshal.list b/gst-libs/gst/mixer/mixer-marshal.list new file mode 100644 index 00000000..ac2cd6b8 --- /dev/null +++ b/gst-libs/gst/mixer/mixer-marshal.list @@ -0,0 +1,2 @@ +VOID:OBJECT,BOOLEAN +VOID:OBJECT,POINTER diff --git a/gst-libs/gst/mixer/mixer.c b/gst-libs/gst/mixer/mixer.c index b0a9465d..f58bcb2c 100644 --- a/gst-libs/gst/mixer/mixer.c +++ b/gst-libs/gst/mixer/mixer.c @@ -24,7 +24,7 @@ #endif #include "mixer.h" -#include "mixermarshal.h" +#include "mixer-marshal.h" enum { MUTE_TOGGLED, diff --git a/gst-libs/gst/mixer/mixer.h b/gst-libs/gst/mixer/mixer.h index bbfe1c75..50ba3fd8 100644 --- a/gst-libs/gst/mixer/mixer.h +++ b/gst-libs/gst/mixer/mixer.h @@ -24,7 +24,7 @@ #include #include -#include +#include G_BEGIN_DECLS diff --git a/gst-libs/gst/mixer/mixermarshal.list b/gst-libs/gst/mixer/mixermarshal.list deleted file mode 100644 index ac2cd6b8..00000000 --- a/gst-libs/gst/mixer/mixermarshal.list +++ /dev/null @@ -1,2 +0,0 @@ -VOID:OBJECT,BOOLEAN -VOID:OBJECT,POINTER -- cgit v1.2.1