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 554718 - gtk-doc needs to allow versioned TARGET_DIR
gtk-doc needs to allow versioned TARGET_DIR
Status: RESOLVED FIXED
Product: gtk-doc
Classification: Platform
Component: general
unspecified
Other Linux
: Normal normal
: 1.11
Assigned To: gtk-doc maintainers
gtk-doc maintainers
Depends on:
Blocks:
 
 
Reported: 2008-10-02 15:30 UTC by Jeffrey Stedfast
Modified: 2008-10-16 14:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gtk-doc.make.patch (1.50 KB, patch)
2008-10-04 00:43 UTC, Jeffrey Stedfast
none Details | Review
gtk-doc.make.patch take 2 (1.50 KB, patch)
2008-10-04 00:47 UTC, Jeffrey Stedfast
committed Details | Review

Description Jeffrey Stedfast 2008-10-02 15:30:35 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).
Comment 1 Jeffrey Stedfast 2008-10-02 15:56:13 UTC
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.
Comment 2 Stefan Sauer (gstreamer, gtkdoc dev) 2008-10-03 08:30:06 UTC
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?
Comment 3 Jeffrey Stedfast 2008-10-03 12:16:28 UTC
what's devhelp? (excuse my ignorance)
Comment 4 Jeffrey Stedfast 2008-10-03 14:10:13 UTC
n/m, apparently it doesn't work as you suspected. just got some bug reports about it not working with devhelp.
Comment 5 Stefan Sauer (gstreamer, gtkdoc dev) 2008-10-03 14:38:22 UTC
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.
Comment 6 Jeffrey Stedfast 2008-10-04 00:43:53 UTC
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 "-" ;-)
Comment 7 Jeffrey Stedfast 2008-10-04 00:47:34 UTC
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"
Comment 8 Stefan Sauer (gstreamer, gtkdoc dev) 2008-10-04 16:56:16 UTC
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
...
Comment 9 Jeffrey Stedfast 2008-10-04 20:12:13 UTC
yea, that's what my Makefile.am looks like
Comment 10 Stefan Sauer (gstreamer, gtkdoc dev) 2008-10-16 06:10:53 UTC
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.

Comment 11 Jeffrey Stedfast 2008-10-16 14:47:39 UTC
whoohoo! thanks, this is so awesome :)