| 1 |
## Populates "targets" for all names in the collection "libnames" that are |
| 2 |
## part of "collection". |
| 3 |
## |
| 4 |
## Note that "packagename" and "internal" while not used |
| 5 |
## in the function itself are referenced in the template. |
| 6 |
## When "internal" is true, documentation for non-public headers |
| 7 |
## and sources is also taken as input to Doxygen (see INPUT). |
| 8 |
<%namespace import="doxy_base" file="Doxyfile.base"/> |
| 9 |
<%def name="gen_doxyfile(libnames, packagename, collection, internal)"> |
| 10 |
<% |
| 11 |
import itertools |
| 12 |
import glob |
| 13 |
import os |
| 14 |
targets = [] |
| 15 |
docpackage = packagename.replace('+', 'p').lower() |
| 16 |
for libname in libnames: |
| 17 |
target = None |
| 18 |
for p in collection: |
| 19 |
if p.name == libname: |
| 20 |
target = p |
| 21 |
assert(target) |
| 22 |
targets.append(target) |
| 23 |
srcdoc = [] |
| 24 |
for dirpath, dirnames, filenames in os.walk('src/%s' % docpackage): |
| 25 |
for filename in filenames: |
| 26 |
if os.path.splitext(filename)[1] == '.md': |
| 27 |
srcdoc.append(os.path.join(dirpath, filename)) |
| 28 |
|
| 29 |
version = settings.core_version if packagename=='Core' else settings.cpp_version |
| 30 |
doxy_input = ' \\\n'.join(sorted(set( |
| 31 |
itertools.chain( |
| 32 |
itertools.chain.from_iterable( |
| 33 |
target.public_headers + |
| 34 |
([] |
| 35 |
if not internal |
| 36 |
else target.headers + target.src) |
| 37 |
for target in targets), |
| 38 |
glob.glob('doc/*.md'), |
| 39 |
glob.glob('doc/%s/*.md' % docpackage), |
| 40 |
[] if not internal else srcdoc) |
| 41 |
))) |
| 42 |
%> |
| 43 |
${doxy_base(packagename, version, doxy_input, internal)} |
| 44 |
</%def> |