Danek,

On Thu, 2008-02-07 at 10:57 -0800, Danek Duvall wrote:
> On Thu, Feb 07, 2008 at 08:40:06PM +0800, simon.zheng wrote:
> 
> > This library is used to build the "generate_extra_defs" utility executable, 
> > which is a tool to generate the signals and properties .defs files.
> >
> > [ ... ]
> >
> > Eventally, .defs files and gmmproc work together to generate real .cc and 
> > .h source files. More info is 
> > http://www.gtkmm.org/docs/gtkmm-2.4/docs/tutorial/html/chapter-wrapping-c-libraries.html
> 
> This is incredibly confusing.  That page doesn't really explain much except
> how to copy another project that's already done all the work.
> 
> From what I read in the gtkmm docs, it looks like the gmmproc executable is
> used to convert .hg and .ccg files into .h and .cc files, which are then
> compiled.  That would indicate that gmmproc should be in /usr/bin, and be
> at a high stability level.  But I see no documentation on generate_extra_defs,
> or on libglibmm_generate_extra_defs-2.4, so I still don't have a handle on
> what they're for.

Thanks for your reading docs. Because I'm on vocation, I probably
response slowly. After double-check, my previous descriptions isn't
precise. Please ignore them.

To generate .h and .cc files from .hg and ccg, gmmproc is executed like
this.

$./gmmproc -I ../../tools/m4 --defs ./src

Here, -I and --defs specifies m4 files and .defs files directory. That
it, gmmproc needs to cooperate with two kinds of files, .m4 and .defs.
In fact, gtkmm svn repository has included these files beforehand.
Therefore, no extra work for them needs to be done when building.

The complete steps is below:
- STEP 0: Write .m4, .ccg, .hg files and prepare .defs files, put them
into svn repository. This is done before real building.
- STEP 1: Preprocess of building. Use gmmproc to get .c and .h source
files.
- STEP 2: Compiling of building. Create gtkmm library from source files.

> 
> Is generate_extra_defs something you'd put in a makefile to run over the
> .hg and .ccg files to generate a .defs file?  

No, generate_extra_defs isn't put into any makefile. Usually
generate_extra_defs is run manually by the developer to generate
new .defs file, and then put these pre-generated .defs file into source
repository.

For example, when gtk+ C library is upgraded and a new widget class is
added, gtk_signals.defs needs to be updated accordingly. Firstly, the
developer modifies generate_defs_gtk.cc, then build generate_extra_defs
binary. After that, he run generate_extra_defs manually to generate the
new gtk_signals.defs. Finally he put the gtk_signals.def into svn
repository.

In one word, generate_extra_defs is just used to generate .defs before
real building. So we don't develiver libglibmm_generate_extra_defs-2.4
library. It's private.
 
> Is libglibmm_generate_extra_defs-2.4 something that's only ever linked to by
> generate_extra_defs, or do user applications link to it as well?

Yes, only generate_extra_defs linked to it. No other application needs
this library.

To summary, 

- Won't develiver /usr/lib/libglibmm_generate_extra_defs-2.4.so
- Won't develiver /usr/include/glibmm-2.4/glibmm_generate_extra_defs
- Keep gmmproc public. Since it's only used by building rather than by
users directly, I hope move to /usr/lib/gmmproc, just like part of
"/usr/libexec" on Solaris. Do you think it's reasonable?

Thanks,
-Simon

> 
> Danek


Reply via email to