GNOME Bugzilla – Bug 614496
Support for multiple DOC_SOURCE_DIR directories
Last modified: 2010-04-14 06:50:49 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.
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).
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.
Created attachment 158136 [details] [review] Corrected typo in the variable substitution
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.
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.