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 314105 - Support library version in gtkdoc-mkhtml
Support library version in gtkdoc-mkhtml
Status: RESOLVED FIXED
Product: gtk-doc
Classification: Platform
Component: general
unspecified
Other All
: Normal normal
: 1.11
Assigned To: gtk-doc maintainers
gtk-doc maintainers
Depends on:
Blocks:
 
 
Reported: 2005-08-21 16:51 UTC by Owen Taylor
Modified: 2009-09-28 15:36 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Owen Taylor 2005-08-21 16:51:32 UTC
The technique used in GTK+ where we include a separate "version.xml"
file to get the version number of the docs doesn't work very well
with a srcdir != builddir build, since version.xml is in the builddir
but the rest of the docs are in the sourcedir.

Maybe you could do something like use a xslt string paramter
(like --stringparam gtkdoc.version "1.2" that is there already)

Then the <module>.xml could have:

 <gtkdoc:libversion/>

And the stylesheets could substitute.
Comment 1 Stefan Sauer (gstreamer, gtkdoc dev) 2005-08-24 17:18:58 UTC
woulnd't it be easier if gtk-doc just generates version.xml along with the other
xmlfiles. Then its in the builddir.
Alternatively couldn't a makefile rule take care of copying the version.entities
or version.xml file to the right place.
Comment 2 Stepan Kasal 2006-01-01 14:27:36 UTC
I also experienced the same problem as Owen, with projects goffice and glib.
Since glib is a relatively important package I think this is a severe problem.

I thought about various possible fixes but most of them look like ugly hacks.

(In reply to comment #1)
> wouldn't it be easier if gtk-doc just generates version.xml [...]

Yes, that would be better than configure-generated one.

But I think it would be even better if the string were passed by something like
   --stringparam gtkdoc.modversion "$module_version"
The version number would be passed to gtkdoc-mkhtml as the third parameter.

Sorry, I don't have capacities to develop a patch, atm.
Comment 3 Stepan Kasal 2006-01-02 14:32:52 UTC
Speaking about hacks, the quickest hack seems to be to add version.xml to EXTRA_DIST.
See also bug 127049.
Comment 4 Yeti 2007-08-11 17:09:27 UTC
If you set up search paths properly, then it does not matter whether the file is in srcdir or builddir.  See bug 460753.
Comment 5 Philip Withnall 2009-05-31 15:53:39 UTC
To further Yeti's comment, adding the following to docs/reference/Makefile.am fixed it in Totem:

MKHTML_OPTIONS=--path="$(abs_builddir)"
Comment 6 Stefan Sauer (gstreamer, gtkdoc dev) 2009-09-28 14:44:07 UTC
--path has been added in gtk-doc-1.10 if I recall right. Owen can we close the bug then?
Comment 7 Stefan Sauer (gstreamer, gtkdoc dev) 2009-09-28 14:47:45 UTC
It was added in 1.11.
Comment 8 Owen Taylor 2009-09-28 15:02:43 UTC
If it works, close it! I have no clue at this point about what this was about.