[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Problem with glib-mkenums



2005/12/18, David Necas (Yeti) <yeti physics muni cz>:
> On Sun, Dec 18, 2005 at 12:40:46PM +0100, Maciej Piechotka wrote:
> > I'd like to use glib-mkenums.
> > I've tried to use it, but I have no idea how to use it.
> > Could somebody give me an example of file and what should by in command line.
> > If some example is in GNOME CVS please give me in which project(but
> > I'll be happy if you give me an information which file) I'll find it.
>
> Gtk+ itself uses it, see gtk/Makefile.am.
>
> However, passing the templates as a bunch of command line
> options inside makefile, as Gtk+ does it, is IMO quite ugly.
> If you prefer template files, you can have a look at
>
> header file template
> http://cvs.sourceforge.net/viewcvs.py/gwyddion/gwyddion/libgwyddion/gwyddiontypes.h.template?view=markup
>
> C file template
> http://cvs.sourceforge.net/viewcvs.py/gwyddion/gwyddion/libgwyddion/gwyddiontypes.c.template?view=markup
>
> makefile rules to use them (near the bottom)
> http://cvs.sourceforge.net/viewcvs.py/gwyddion/gwyddion/libgwyddion/Makefile.am?view=markup
>
> for inspiration.
>
> Without the timestamp preservation tricks the rules would be
> simply
>
> glib-mkenums --template H-TEMPLATE HEADERS-WITH-ENUMS >ENUMS.h
> glib-mkenums --template C-TEMPLATE HEADERS-WITH-ENUMS >ENUMS.c
>

Ok. In makefile it's more clear. But what's $(enum_headers)?

> You can try this with my templates on your .h files to see
> how it works.
>
> It should be sufficient to change only two things in the
> templates to make them fit your project: #included headers
> and namespace prefixes.
>

Yes. I've read glib-mkenums description in documentation of GObject.

Thanks


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]