gobject-introspection boilerplate


I'm trying to make a pango devel release but I can't get the
gobject-introspection stuff happy.  Main reason is that it requires 0.6.2 but
rawhide only has 0.6.1, but there's also a bunch of autotools-related
improvements that can be made.  Since this stuff is copied in more than one
module I'm writing here.  I can make the changes to pango tonight if that helps.

First, the following innocent-looking line in configure is wrong:

  if test $have_introspection; then

That always passes.  It should be:

  if $have_introspection; then

Moreover, it would be a good idea to add --enable-introspection with a default
value of auto, to give people (distros, etc) full control on whether to
(re)build the introspection stuff.

Next to the Makefile.am's.  If I try "make distcheck" without introspection
enabled I get a weirdo error because the .gir files are tried to be built but

Pango-1.0.gir: $(G_IR_SCANNER)
        $(G_IR_SCANNER) -v --namespace Pango --nsversion=1.0 \

Normally the solution to a missing tool is to run it with
"$(top_srcdir)/missing", such that it correctly errs.  However, since you are
expanding a variable here and configure should be rerun to pick it up in case
you install it, it's better to condition on HAVE_INTROSPECTION and write an
error message.  Bonus points for doing that for all four pango libraries
without too much duplication.

Finally, when I try to "make dist" or "make distcheck", I should get an error
if introspection is not enabled.  Otherwise I may make a release with stale
.git files.  To do that check how gtk-doc does it:

        @echo "*** gtk-doc must be installed and enabled in order to make dist"

dist-hook: dist-check-gtkdoc

And, one last point, we should advise automake that distcheck should enable
introspection.  This is done in the toplevel Makefile.am:




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