Actually, the Lumiera project picked an early version of this tool in August 2008.
See the commits:
6d5cf0e6429643f46cc8
This subtree add/merge commit brings in a consolidated history of the Scons Doxygen code
from the scons-contrib repository, combined with the old Mercurial history.
We need a current version of this tool which has been ported to Python-3
Up to now, the file was opened, then DoxyfileParse() was invoked, then the file
was closed. If DoxyfileParse() throws an exception, the file would not be
closed. The new solution auto-closes the file in any case.
In DoxyfileParse(), the 'file_contents' parameter is a <bytes> object.
Since the shlex.shlex() member doesn't accept <bytes> objects, we
convert it to a <str>.
It's a pain to mentally switch markup style if modifying notes
on several tools. pandoc used for the conversion.
Signed-off-by: Mats Wichmann <mats@linux.com>
There is a problem with 7674543f, in that if HTML_FILE_EXTENSION or
MAN_EXTENSION is not specified, we'll try to concatenate a string with
None, and get a type error. We should check that they are set before
trying to use them.
Set output_formats["MAN"] to "NO", by default, as suggested at
http://www.scons.org/wiki/DoxygenBuilder#Note_added_by_Reinderien. Despite
what the Doxygen docs say, GENERATE_MAN is off by default, and a
browse of the source suggests that it's been that way since at least
2008 / Doxygen 1.5.7.
Add ".last_updated" targets to doxygen output directories, so that
doxygen isn't automatically considered up-to-date just because the
output directory exists.
- corrected basic dependencies (builds and 'scons -c' seem to work now)
- added support for output file EXTENSION override variables (HTML and MAN pages)
- TODOs: 1.) targets for MAN output don't work yet, 2.) more testing
Robert Lupton noted that you have to change the source paths if you keep your Doxyfile in a subdirectory and use relative paths.
I found that I had to do the same for the target path in the Doxyfile. (see after line 160)
The following code adds the tagfile to the target list. I added it in line 166:
# add the tag file if neccessary:
tagfile = data.get("GENERATE_TAGFILE", "")
if tagfile != "":
if not os.path.isabs(tagfile):
conf_dir = os.path.dirname(str(source[0]))
tagfile = os.path.join(conf_dir, tagfile)
targets.append(env.File(tagfile));
To add the html templates from the Doxyfile to the list of sources,
you need to apply Robert Lupton's change and add the following snippet in line 137:
# Add additional files to the list ouf source files:
def append_additional_source(option):
file = data.get(option, "")
if file != "":
if not os.path.isabs(file):
file = os.path.join(conf_dir, file)
if os.path.isfile(file):
sources.append(file)
append_additional_source("HTML_STYLESHEET")
append_additional_source("HTML_HEADER")
append_additional_source("HTML_FOOTER")
You can easily add dependencies on other output file templates by adding additional calls to append_additional_source().
__Addendum 18 July 2007__: I added some code to add tagfiles to the list of sources.
Since the tagfiles-option allows for equal-signs in the value, I had to change the parsing code a bit.
The code now also includes the other changes I proposed.
__Remark__: as of 2025, this is the oldest code version that can be documented.
The content is taken from an Achive.org snapshot from June 21, 2006
https://web.archive.org/web/20060621095023/http://www.scons.org/wiki/DoxygenBuilder
Based on the comments added 2010-03-07 by Russel Winder,
this code can be attributed to Matthew Nicolson
Improvements added by Dirk Reiners:
I added two (at least for me ;)) important features of doxygen:
variable substituion and hierarchical doxygen files.
Variable substituion allows doxygen to reference variables from the scons environment using $(VARNAME).
This is very useful for things like version numbers or for only having certain parts (as defined by scons)
included in the documentation without having to mess with doxygen files.
Hierarchical doxygen files just interpret the @INCLUDE key as an include.
I also had trouble with files that started with a key, I fixed that.
Note that I'm a python newbie, so there are probably more elegant ways to do some of the things I did.
Feel free to change them.
Hope it helps.