GNOME Bugzilla – Bug 314105
Support library version in gtkdoc-mkhtml
Last modified: 2009-09-28 15:36:00 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.
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.
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.
Speaking about hacks, the quickest hack seems to be to add version.xml to EXTRA_DIST. See also bug 127049.
If you set up search paths properly, then it does not matter whether the file is in srcdir or builddir. See bug 460753.
To further Yeti's comment, adding the following to docs/reference/Makefile.am fixed it in Totem: MKHTML_OPTIONS=--path="$(abs_builddir)"
--path has been added in gtk-doc-1.10 if I recall right. Owen can we close the bug then?
It was added in 1.11.
If it works, close it! I have no clue at this point about what this was about.