GNOME Bugzilla – Bug 628961
Add Makefile.am files for generating enum types and marshallers
Last modified: 2013-08-06 12:24:24 UTC
Created attachment 169669 [details] Makefile.am.enums Clutter has been shipping with two additional Makefile extensions that handle the generation of enumeration GTypes and marshaller files. their usage is pretty trivial: ‣ define a bunch of variables ‣ include Makefile.am.$(section) ‣ ??? ‣ PROFIT! more in detail: • Makefile.am.enums generates the enumeration GTypes using two template files and glib-mkenums; it requires three variables to be defined: glib_enum_h = the file of the enumeration template for the header glib_enum_c = the file of the enumeration template for the body glib_enum_headers = the list of headers to be scanned • Makefile.am.marshal generates the marshallers from a list; it requires two variables to be defined: glib_marshal_list = the file with the list of marshaller descriptions glib_marshal_prefix = the prefix for the marshallers both files require the EXTRA_DIST, BUILT_SOURCES, CLEANFILES and DISTCLEANFILES targets to be defined prior to inclusion. the rules generated respect out-of-tree builds. both files are currently licensed under the LGPLv2.1+.
Created attachment 169670 [details] Makefile.am.marshal
mmh, I guess I missed it but the point of this bug is to include these files inside gnome-common, so that other projects can use them.
I like the idea. However, I think it would be even better to add this to glib directly (the goal is to kill gnome-common), and make this not includable Makefile.am snippets (which have to be installed somewhere, and then you need a way to know where to include them from), but subst rules you can just use like @GSETTINGS_RULES@. Would be nice to make them automagic like the gsettings rules are (just declare project_MARSHALS / project_ENUMS/FLAGS and have the rules take care of the rest?). Also, do these snippets work with nonrecursive automake?
(In reply to comment #3) > I like the idea. However, I think it would be even better to add this to glib > directly (the goal is to kill gnome-common), and make this not includable > Makefile.am snippets (which have to be installed somewhere, and then you need a > way to know where to include them from), but subst rules you can just use like > @GSETTINGS_RULES@. > Would be nice to make them automagic like the gsettings rules are (just declare > project_MARSHALS / project_ENUMS/FLAGS and have the rules take care of the > rest?). mmh, yeah, that would be nice as well... > Also, do these snippets work with nonrecursive automake? if you have multiple namespaces then: no, they won't. but if your library only has one namespace then they don't have any problem.
I’ve ported the patches to GLib and filed bug #705557 with them. The new patches also support non-recursive automake and multiple namespaces. *** This bug has been marked as a duplicate of bug 705557 ***