GNOME Bugzilla – Bug 554718
gtk-doc needs to allow versioned TARGET_DIR
Last modified: 2008-10-16 14:47:39 UTC
gtk-doc.make currently uses: TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE) but this doesn't allow for parallel installable docs. it would be nice if TARGET_DIR could be defined as: TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)-$(VERSION_MAJOR).$(VERSION_MINOR) or perhaps it should be conditional. the problem I have is that gmime-2.4 changes the API from 2.0 and 2.2, and so I want the docs to be parallel installable. with the current situation, this is not possible afaict unless I include the version info in the DOC_MODULE define, but that means all the other doc files have to be manually renamed to include the version info as well (which is lame).
here's a patch: Index: gtk-doc.make =================================================================== --- gtk-doc.make (revision 602) +++ gtk-doc.make (working copy) @@ -21,7 +21,7 @@ # GPATH = $(srcdir) -TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE) +TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)$(DOC_MODULE_VERSION) EXTRA_DIST = \ $(content_files) \ then, if the doc author wants parallel installable docs, he would define: DOC_MODULE_VERSION = -$(VERSION_MAJOR).$(VERSION_MINOR) in his Makefile.am, and tada... problem solved.
Unfortunately thats not all. We use patched gtkdoc.make in gstreamer for it. At least one more thing is to add the version to the devhelp files. Can you check if you see both docs in devhelp already?
what's devhelp? (excuse my ignorance)
n/m, apparently it doesn't work as you suspected. just got some bug reports about it not working with devhelp.
http://developer.imendio.com/projects/devhelp give it a try. its really nice. besides it would be nice to collect all the places and see if we can make the changes so that it does not break anything. I clearly see the need for this feature.
Created attachment 119897 [details] [review] gtk-doc.make.patch Okay, this resolves the issue with devhelp and is also a little cleaner like not relying on the developer to prefix his DOC_MODULE_VERSION with a "-" ;-)
Created attachment 119898 [details] [review] gtk-doc.make.patch take 2 oops, quoted a test variable (not that it seems to make a difference, but is "safer"
Thanks for the patch! It looks good. Let me tests this with a few modules. Just for clarification, your Makefile.am looks like ... # The name of the module, e.g. 'glib'. DOC_MODULE=mylib # Uncomment for versioned docs and specify the version of the module, e.g. '2'. DOC_MODULE_VERSION=2 ...
yea, that's what my Makefile.am looks like
2008-10-15 Stefan Kost <ensonic@users.sf.net> patch by: Jeffrey Stedfast <fejj@novell.com> * examples/Makefile.am: * gtk-doc.make: * gtk-doc.notmpl.make: Allow versioned TARGET_DIR. Fixes #554718.
whoohoo! thanks, this is so awesome :)