Re: Problem with glib-mkenums
- From: "David Necas (Yeti)" <yeti physics muni cz>
- To: Maciej Piechotka <uzytkownik2 gmail com>
- Cc: Gtk Mailing list <gtk-app-devel-list gnome org>
- Subject: Re: Problem with glib-mkenums
- Date: Sun, 18 Dec 2005 15:00:22 +0100
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
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.
Yeti
--
That's enough.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]