gst-glib.m4: check for glib-mkenums and glib-genmarshal and allow them to be overridden
[platform/upstream/gst-common.git] / glib-gen.mak
index e5fcde1..ef93a5f 100644 (file)
@@ -9,16 +9,16 @@ enum_headers=$(foreach h,$(glib_enum_headers),\n\#include \"$(h)\")
 
 # these are all the rules generating the relevant files
 %-marshal.h: %-marshal.list
-       glib-genmarshal --header --prefix=$(glib_enum_prefix)_marshal $^ > $*-marshal.h.tmp
+       $(AM_V_GEN)glib-genmarshal --header --prefix=$(glib_enum_prefix)_marshal $^ > $*-marshal.h.tmp && \
        mv $*-marshal.h.tmp $*-marshal.h
 
 %-marshal.c: %-marshal.list
-       echo "#include \"$*-marshal.h\"" >> $*-marshal.c.tmp
-       glib-genmarshal --body --prefix=$(glib_enum_prefix)_marshal $^ >> $*-marshal.c.tmp
+       $(AM_V_GEN)echo "#include \"$*-marshal.h\"" >> $*-marshal.c.tmp && \
+       glib-genmarshal --body --prefix=$(glib_enum_prefix)_marshal $^ >> $*-marshal.c.tmp && \
        mv $*-marshal.c.tmp $*-marshal.c
 
 %-enumtypes.h: $(glib_enum_headers)
-       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"         \
@@ -26,8 +26,8 @@ enum_headers=$(foreach h,$(glib_enum_headers),\n\#include \"$(h)\")
        $^ > $@
 
 %-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
-       glib-mkenums \
+       @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 \
        --fhead "#include \"$*-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[] = {"     \
@@ -38,7 +38,7 @@ enum_headers=$(foreach h,$(glib_enum_headers),\n\#include \"$(h)\")
 # a hack rule to make sure .Plo files exist because they get include'd
 # from Makefile's
 .deps/%-marshal.Plo:
-       touch $@
+       @touch $@
 
 .deps/%-enumtypes.Plo:
-       touch $@
+       @touch $@