After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 605564 - Env var equivalent to --flavour=no-tmpl
Env var equivalent to --flavour=no-tmpl
Status: RESOLVED FIXED
Product: gtk-doc
Classification: Platform
Component: general
unspecified
Other Linux
: Normal normal
: 1.14
Assigned To: gtk-doc maintainers
gtk-doc maintainers
Depends on: 605984
Blocks:
 
 
Reported: 2009-12-27 20:06 UTC by Paolo Borelli
Modified: 2010-01-06 21:11 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Paolo Borelli 2009-12-27 20:06:50 UTC
An env var that could be exported from autogen.sh would allow modules that use gnome-common (which have no direct access to gtkdocize) to specify that option. For instance I need it in gtksourcevuiew.
Comment 1 Stefan Sauer (gstreamer, gtkdoc dev) 2009-12-27 20:09:14 UTC
I'll add a GTKDOCIZE_FLAGS where you could pass GTKDOCIZE_FLAGS="--flavour=no-tmpl" for the time being.
Comment 2 Stefan Sauer (gstreamer, gtkdoc dev) 2010-01-02 13:21:34 UTC
I was thinking a bit about it and will check if I could also turn the configure macro GTK_DOC_CHECK([version]) into GTK_DOC_CHECK([version],[options]) and make gtkdocize (or macros2/gnome-autogen.sh) check for the options. Need to study how this works e.g. for e.g AM_INIT_AUTOMAKE([options]).
Comment 3 Paolo Borelli 2010-01-02 14:11:03 UTC
do you mean that GTK_DOC_CHECK([version],[options]) would activate the options? Or would the check that the specified options are supported? The latter sounds good but the first would look strange to me...
Comment 4 Stefan Sauer (gstreamer, gtkdoc dev) 2010-01-02 21:34:28 UTC
commit eb334bd4aa0d036ff8a54331178c08c1096ad07f
Author: Stefan Kost <ensonic@users.sf.net>
Date:   Sat Jan 2 22:59:21 2010 +0200

    gtkdocize: allow settings gtkdocize options in more ways, Fixes 605564
    
    If one wants to e.g. use "--flavour no-tmpl" one needs to add that to
    autogen.sh. Gnome projects usualy use autogen.sh from gnome-common and thus
    can't do any customization. Now they can do it via envvar or via
    GTK_DOC_CHECK macro.
Comment 5 Iain Nicol 2010-01-03 11:48:43 UTC
Could this bug be reopened, please?  I think because of this change I'm
experiencing a build failure building glib.

When I run glib's ./autogen.sh with --enable-gtk-doc (or if I just run
`gtkdocize' on its own, with no arguments, in the glib source
directory), gtkdocize says:

DEBUG: adding extra options [[1.11]] to []
gtkdocize: too many arguments
usage: gtkdocize [ --copy ] [ --docdir DIR ] [ --flavour {legacy|no-tmpl} ]

Note that glib has `GTK_DOC_CHECK([1.11])' in its configure.in file.
Comment 6 Pablo Castellano (IRC: pablog) 2010-01-04 01:22:17 UTC
I'm reopening this bug because I'm having the same issue that Iain has commented above.
For what I understand, the version number is added as parameter and then gtkdocize doesn't know how to handle it, so it finish with "too many arguments" and exit 1, causing autogen.sh finish (I'm using jhbuild)
Comment 7 Javier Jardón (IRC: jjardon) 2010-01-04 10:38:01 UTC
There is a patch to fix this in bug #605984, setting dependency
Comment 8 Stefan Sauer (gstreamer, gtkdoc dev) 2010-01-04 13:10:02 UTC
And its already fix in git anyway.
Comment 9 Krzesimir Nowak 2010-01-05 16:40:26 UTC
I'm reopening this, because now running gtkdocize from git in gtksourceview from git displays this:
/home/kudi/usr/bin/gtkdocize: line 40: [1.0],[--flavour=no-tmpl]: command not found

a line in gtksourceview configure.ac:
GTK_DOC_CHECK([1.0],[--flavour=no-tmpl])

line 40 in gtkdocize.in is feral:
if `echo $params | grep '^.*\,\ *\[\{0,1\}'`; then

adding test -n could work:
if test -n `echo $params | grep '^.*\,\ *\[\{0,1\}'`; then

or removing backticks and redirecting output to /dev/null:
if echo $params | grep '^.*\,\ *\[\{0,1\}' 2>&1 >/dev/null; then
Comment 10 Stefan Sauer (gstreamer, gtkdoc dev) 2010-01-06 21:11:40 UTC
Doh!

commit 4785ec844c09f3e74011804c2ba4d93602aa1501
Author: Stefan Kost <ensonic@users.sf.net>
Date:   Wed Jan 6 23:09:04 2010 +0200

    gtkdocize: fix the configure grepping even more
    
    Using backticks in the if was nonsense and swallowed the grep result. We also
    don't want to show anything on stdout.