Commit 668acee6 authored by Lionel Landwerlin's avatar Lionel Landwerlin Committed by Tim-Philipp Müller

gst-glib-gen.mak: use GLIB_GENMARSHAL and GLIB_MKENUMS variables to call glib utils

Use the ones we detected. Also makes them overridable,
which makes cross-compilation easier.

https://bugzilla.gnome.org/show_bug.cgi?id=677617
parent fa9ffbec
......@@ -10,16 +10,16 @@ enum_headers=$(foreach h,$(glib_enum_headers),\n\#include \"$(h)\")
# these are all the rules generating the relevant files
$(glib_gen_basename)-marshal.h: $(glib_gen_basename)-marshal.list
$(AM_V_GEN)glib-genmarshal --header --prefix=$(glib_gen_prefix)_marshal $^ > $(glib_gen_basename)-marshal.h.tmp && \
$(AM_V_GEN)$(GLIB_GENMARSHAL) --header --prefix=$(glib_gen_prefix)_marshal $^ > $(glib_gen_basename)-marshal.h.tmp && \
mv $(glib_gen_basename)-marshal.h.tmp $(glib_gen_basename)-marshal.h
$(glib_gen_basename)-marshal.c: $(glib_gen_basename)-marshal.list
$(AM_V_GEN)echo "#include \"$(glib_gen_basename)-marshal.h\"" >> $(glib_gen_basename)-marshal.c.tmp && \
glib-genmarshal --body --prefix=$(glib_gen_prefix)_marshal $^ >> $(glib_gen_basename)-marshal.c.tmp && \
$(GLIB_GENMARSHAL) --body --prefix=$(glib_gen_prefix)_marshal $^ >> $(glib_gen_basename)-marshal.c.tmp && \
mv $(glib_gen_basename)-marshal.c.tmp $(glib_gen_basename)-marshal.c
$(glib_gen_basename)-enumtypes.h: $(glib_enum_headers)
$(AM_V_GEN)glib-mkenums \
$(AM_V_GEN)$(GLIB_MKENUMS) \
--fhead "#ifndef __$(glib_enum_define)_ENUM_TYPES_H__\n#define __$(glib_enum_define)_ENUM_TYPES_H__\n\n#include <glib-object.h>\n\nG_BEGIN_DECLS\n" \
--fprod "\n/* enumerations from \"@filename@\" */\n" \
--vhead "GType @enum_name@_get_type (void);\n#define GST_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n" \
......@@ -28,7 +28,7 @@ $(glib_gen_basename)-enumtypes.h: $(glib_enum_headers)
$(glib_gen_basename)-enumtypes.c: $(glib_enum_headers)
@if test "x$(glib_enum_headers)" = "x"; then echo "ERROR: glib_enum_headers is empty, please fix Makefile"; exit 1; fi
$(AM_V_GEN)glib-mkenums \
$(AM_V_GEN)$(GLIB_MKENUMS) \
--fhead "#include \"$(glib_gen_basename)-enumtypes.h\"\n$(enum_headers)" \
--fprod "\n/* enumerations from \"@filename@\" */" \
--vhead "GType\n@enum_name@_get_type (void)\n{\n static volatile gsize g_define_type_id__volatile = 0;\n if (g_once_init_enter (&g_define_type_id__volatile)) {\n static const G@Type@Value values[] = {" \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment