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 614496 - Support for multiple DOC_SOURCE_DIR directories
Support for multiple DOC_SOURCE_DIR directories
Status: RESOLVED FIXED
Product: gtk-doc
Classification: Platform
Component: general
1.14
Other All
: Normal enhancement
: 1.15
Assigned To: gtk-doc maintainers
gtk-doc maintainers
Depends on:
Blocks:
 
 
Reported: 2010-03-31 18:04 UTC by Nicola Fontana
Modified: 2010-04-14 06:50 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Initial raw patch (4.17 KB, patch)
2010-03-31 18:04 UTC, Nicola Fontana
none Details | Review
Refined patch: add portability and documentation (5.11 KB, patch)
2010-04-06 12:06 UTC, Nicola Fontana
none Details | Review
Corrected typo in the variable substitution (5.11 KB, patch)
2010-04-07 16:03 UTC, Nicola Fontana
none Details | Review
Multiple DOC_SOURCE_DIR support without leveraging "make" expansions (5.26 KB, patch)
2010-04-08 16:50 UTC, Nicola Fontana
committed Details | Review

Description Nicola Fontana 2010-03-31 18:04:09 UTC
Created attachment 157624 [details] [review]
Initial raw patch

gtkdoc-scan and gtkdoc-mkdb are yet able to accept more than one source
directory but gtk-doc.make and gtk-doc.notmpl.make do not support this
feature.

I tested this on a single project and it works as expected.
Comment 1 Stefan Sauer (gstreamer, gtkdoc dev) 2010-04-04 17:45:42 UTC
Hmm, if that goes in, I am sure someone cries about gmake specific "patsubst" usage.

How would the patchentries be separated in DOC_SOURCE_DIR? Also patching the docs accordingly would be goo (or atleast examples/Makefile.am).
Comment 2 Nicola Fontana 2010-04-06 12:06:10 UTC
Created attachment 158040 [details] [review]
Refined patch: add portability and documentation

DOC_SOURCE_DIR should be a space separated list of paths, behaving in the same way as any other list.

The "patsubst" GNU extension has been dropped in favor of the AT&T System V UNIX style variable substitution. The latter is more portable: at least I tested a Makefile snippet with FreeBSD 8.0 and it works as expected.

Changed examples/Makefile.am to reflect the new behavior.
Comment 3 Nicola Fontana 2010-04-07 16:03:56 UTC
Created attachment 158136 [details] [review]
Corrected typo in the variable substitution
Comment 4 Nicola Fontana 2010-04-08 16:50:30 UTC
Created attachment 158219 [details] [review]
Multiple DOC_SOURCE_DIR support without leveraging "make" expansions

This new approach uses the shell to generate the --source-dir options, avoiding any make portability concern.
Comment 5 Stefan Sauer (gstreamer, gtkdoc dev) 2010-04-14 06:50:37 UTC
commit 59fe16c234baa2c32707648088403871316a4d7f
Author: Nicola Fontana <ntd@entidi.it>
Date:   Wed Mar 31 19:50:51 2010 +0200

    Support for multiple DOC_SOURCE_DIR directories
    
    gtkdoc-scan and gtkdoc-mkdb are yet able to accept more than one source
    directory but gtk-doc.make and gtk-doc.notmpl.make do not support this
    feature.
    
    The implementation uses an helper shell variable ($_source_dir) that
    prepends --source-dir to every item in DOC_SOURCE_DIR and passes it
    to gtkdoc-scan and gtkdoc-mkdb. This also means if DOC_SOURCE_DIR
    contains only one item, the makefiles behave as before.