docs: Updated installation instructions, AUTHORs, and other small updates
Change-Id: Ide2046742254255322e8cb84279ffd6a4ecb9b4b
diff --git a/.waf-tools/doxygen.py b/.waf-tools/doxygen.py
index 07014ee..ac8c70b 100644
--- a/.waf-tools/doxygen.py
+++ b/.waf-tools/doxygen.py
@@ -9,15 +9,30 @@
Variables passed to bld():
* doxyfile -- the Doxyfile to use
-ported from waf 1.5 (incomplete)
+When using this tool, the wscript will look like:
+
+ def options(opt):
+ opt.load('doxygen')
+
+ def configure(conf):
+ conf.load('doxygen')
+ # check conf.env.DOXYGEN, if it is mandatory
+
+ def build(bld):
+ if bld.env.DOXYGEN:
+ bld(features="doxygen", doxyfile='Doxyfile', ...)
+
+ def doxygen(bld):
+ if bld.env.DOXYGEN:
+ bld(features="doxygen", doxyfile='Doxyfile', ...)
"""
from fnmatch import fnmatchcase
import os, os.path, re, stat
-from waflib import Task, Utils, Node, Logs
+from waflib import Task, Utils, Node, Logs, Errors, Build
from waflib.TaskGen import feature
-DOXY_STR = '${DOXYGEN} - '
+DOXY_STR = '"${DOXYGEN}" - '
DOXY_FMTS = 'html latex man rft xml'.split()
DOXY_FILE_PATTERNS = '*.' + ' *.'.join('''
c cc cxx cpp c++ java ii ixx ipp i++ inl h hh hxx hpp h++ idl odl cs php php3
@@ -68,6 +83,11 @@
if not self.pars.get('OUTPUT_DIRECTORY'):
self.pars['OUTPUT_DIRECTORY'] = self.inputs[0].parent.get_bld().abspath()
+ # Override with any parameters passed to the task generator
+ if getattr(self.generator, 'pars', None):
+ for k, v in self.generator.pars.iteritems():
+ self.pars[k] = v
+
self.doxy_inputs = getattr(self, 'doxy_inputs', [])
if not self.pars.get('INPUT'):
self.doxy_inputs.append(self.inputs[0].parent)
@@ -92,19 +112,17 @@
return Task.Task.runnable_status(self)
def scan(self):
- if self.pars.get('RECURSIVE') == 'YES':
- Logs.warn("Doxygen RECURSIVE dependencies are not supported")
-
- exclude_patterns = self.pars.get('EXCLUDE_PATTERNS', '').split()
- file_patterns = self.pars.get('FILE_PATTERNS', '').split()
+ exclude_patterns = self.pars.get('EXCLUDE_PATTERNS','').split()
+ file_patterns = self.pars.get('FILE_PATTERNS','').split()
if not file_patterns:
file_patterns = DOXY_FILE_PATTERNS
-
+ if self.pars.get('RECURSIVE') == 'YES':
+ file_patterns = ["**/%s" % pattern for pattern in file_patterns]
nodes = []
names = []
for node in self.doxy_inputs:
if os.path.isdir(node.abspath()):
- for m in node.ant_glob(file_patterns):
+ for m in node.ant_glob(incl=file_patterns, excl=exclude_patterns):
nodes.append(m)
else:
nodes.append(node)
@@ -112,8 +130,7 @@
def run(self):
dct = self.pars.copy()
- # TODO will break if paths have spaces
- dct['INPUT'] = ' '.join([x.abspath() for x in self.doxy_inputs])
+ dct['INPUT'] = ' '.join(['"%s"' % x.abspath() for x in self.doxy_inputs])
code = '\n'.join(['%s = %s' % (x, dct[x]) for x in self.pars])
code = code.encode() # for python 3
#fmt = DOXY_STR % (self.inputs[0].parent.abspath())
@@ -179,6 +196,19 @@
tsk.env['TAROPTS'] = ['cf']
def configure(conf):
- conf.find_program('doxygen', var='DOXYGEN')
- conf.find_program('tar', var='TAR')
+ '''
+ Check if doxygen and tar commands are present in the system
+ If the commands are present, then conf.env.DOXYGEN and conf.env.TAR
+ variables will be set. Detection can be controlled by setting DOXYGEN and
+ TAR environmental variables.
+ '''
+
+ conf.find_program('doxygen', var='DOXYGEN', mandatory=False)
+ conf.find_program('tar', var='TAR', mandatory=False)
+
+# doxygen docs
+from waflib.Build import BuildContext
+class doxy(BuildContext):
+ cmd = "doxygen"
+ fun = "doxygen"