aboutsummaryrefslogtreecommitdiffstats
path: root/glib-gen.mak
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2012-07-17 22:52:43 +0800
committerMatthew Barnes <mbarnes@redhat.com>2012-07-18 01:49:09 +0800
commitf22e38ffad3d6360920e278ac35c3a00102738ff (patch)
tree6e66ce1159f3d2b41ee46dc273d85d0639f5edfa /glib-gen.mak
parentcc29868877436d404610039b719c5d781925d97e (diff)
downloadgsoc2013-evolution-f22e38ffad3d6360920e278ac35c3a00102738ff.tar
gsoc2013-evolution-f22e38ffad3d6360920e278ac35c3a00102738ff.tar.gz
gsoc2013-evolution-f22e38ffad3d6360920e278ac35c3a00102738ff.tar.bz2
gsoc2013-evolution-f22e38ffad3d6360920e278ac35c3a00102738ff.tar.lz
gsoc2013-evolution-f22e38ffad3d6360920e278ac35c3a00102738ff.tar.xz
gsoc2013-evolution-f22e38ffad3d6360920e278ac35c3a00102738ff.tar.zst
gsoc2013-evolution-f22e38ffad3d6360920e278ac35c3a00102738ff.zip
Use template files to generate GEnumClass types.
Diffstat (limited to 'glib-gen.mak')
-rw-r--r--glib-gen.mak43
1 files changed, 0 insertions, 43 deletions
diff --git a/glib-gen.mak b/glib-gen.mak
deleted file mode 100644
index a360dde048..0000000000
--- a/glib-gen.mak
+++ /dev/null
@@ -1,43 +0,0 @@
-# these are the variables your Makefile.am should set
-# the example is based on the colorbalance interface
-
-#glib_enum_headers=$(colorbalance_headers)
-#glib_enum_output=gst-color-balance-enumtypes
-#glib_enum_define=GST_COLOR_BALANCE
-#glib_enum_prefix=gst_color_balance
-
-# these are all the rules generating the relevant files
-%-marshal.h: %-marshal.list
- $(AM_V_GEN) glib-genmarshal --header --prefix=$(glib_enum_prefix)_marshal $^ > $*-marshal.h.tmp && \
- mv $*-marshal.h.tmp $*-marshal.h
-
-%-marshal.c: %-marshal.list
- $(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
-
-$(glib_enum_output).h: $(glib_enum_headers)
- $(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 "/* enumerations from \"@filename@\" */\n" \
- --vhead "GType @enum_name@_get_type (void);\n#define E_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n" \
- --ftail "G_END_DECLS\n\n#endif /* __$(glib_enum_define)_ENUM_TYPES_H__ */" \
- $^ > $@
-
-$(glib_enum_output).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 \
- --fhead "#include <$<>\n#include \"$(glib_enum_output).h\"" \
- --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" \
- $^ > $@
-
-# a hack rule to make sure .Plo files exist because they get include'd
-# from Makefile's
-.deps/%-marshal.Plo:
- touch $@
-
-.deps/$(glib_enum_output).Plo:
- touch $@