GNOME Bugzilla – Bug 705557
Add autoconf/automake helper macros for glib-mkenums and glib-genmarshal
Last modified: 2013-12-10 11:39:18 UTC
Patches coming to provide GLIB_GENUM and GLIB_MARSHALLERS autoconf macros which provide automake recipes and constructor variables for use in magically generating genum and marshaller code using glib-mkenums and glib-genmarshal. See the documentation in the patches for how they work. They’re both based on Emmanuele’s patches from bug #628961, moved to GLib and updated to work with non-recursive automake and different namespaces.
Created attachment 250958 [details] [review] Add a GLIB_GENUM autoconf macro supplying rules for glib-mkenums GLIB_GENUM
Created attachment 250959 [details] [review] Add a GLIB_MARSHALLERS autoconf macro supplying rules for glib-genmarshal GLIB_MARSHALLERS
*** Bug 628961 has been marked as a duplicate of this bug. ***
How does this intersect with https://bugzilla.gnome.org/show_bug.cgi?id=654395 ?
bug 654395 has an alternate approach, which created a "Makefile.glib" containing the rules, a la the "Makefile.introspection" provided by gobject-introspection. I have started work on migrating these rules into the new glib.mk instead, which has required a bit of rewriting since glib.mk is included at automake time rather than make time. (I've pushed this to the wip/danw/glib.mk branch now; note that the current state does not actually work.) The rules there are a bit more magical and convenient than the ones here. In particular, the marshaller rules generate the .list file for you, and the enum-types rules don't require template files.
(In reply to comment #5) > The rules there are a bit more magical and convenient than the ones here. In > particular, the marshaller rules generate the .list file for you, and the > enum-types rules don't require template files. Magical and convenient gets my vote, as long as there’s still the option to ignore it and create custom recipes for mkenums (as needed in libgdata because mkenums gets the namespace conversions wrong). However, as Christian pointed out in bug #628961 comment #3, Makefile.glib needs to be installed somewhere and building an application against GLib requires some way of pointing at it and making sure to include the right one. As long as glib.mk is going to be ready soon, I guess these patches can be rejected and the bug marked as a duplicate.
i've updated the stuff in 654395 (and yes, it does allow you to create your own enums, etc, files if the rules there don't work for you). So let's mark this a dup *** This bug has been marked as a duplicate of bug 654395 ***