Skip to content

Commit

Permalink
Use custom Doxyfile to be sure to have #include <admesh/stl.h> in the…
Browse files Browse the repository at this point in the history
… docs
  • Loading branch information
hroncok committed Apr 2, 2015
1 parent e5ec7e2 commit 9a41407
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 16 deletions.
1 change: 1 addition & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
_build
_doxyxml
10 changes: 10 additions & 0 deletions docs/Doxyfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
PROJECT_NAME = ADMesh
STRIP_FROM_PATH = ../src
STRIP_FROM_INC_PATH = ../src
JAVADOC_AUTOBRIEF = YES
QT_AUTOBRIEF = YES
INPUT = ../src/admesh
GENERATE_LATEX = NO
GENERATE_XML = YES
XML_OUTPUT = _doxyxml
QUIET = YES
2 changes: 1 addition & 1 deletion docs/c_api.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
The C library API
=================

.. autodoxygenfile:: stl.h
.. doxygenfile:: admesh/stl.h
44 changes: 29 additions & 15 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
# All configuration values have a default; values that are commented out
# serve to show the default.

import subprocess
import sys
import os

Expand All @@ -25,16 +26,29 @@
# If your documentation needs a minimal Sphinx version, state it here.
#needs_sphinx = '1.0'

# Dirty trick to have proper #include statements in the documentation
try:
os.mkdir('../src/admesh')
except OSError:
pass
try:
os.symlink('../stl.h', '../src/admesh/stl.h')
except OSError:
pass
# Generate the XML
subprocess.call('doxygen', shell=True)

# Clean the mess
os.remove('../src/admesh/stl.h')
os.rmdir('../src/admesh')

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = ['breathe']

# Tell breathe what Doxygen projects to use
breathe_projects_source = {
"ADMesh" :
( "../src", [ "stl.h" ] )
}
breathe_projects = { "ADMesh": "_doxyxml" }
breathe_default_project = "ADMesh"

# Add any paths that contain templates here, relative to this directory.
Expand Down Expand Up @@ -189,22 +203,22 @@
# -- Options for LaTeX output ---------------------------------------------

latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
#'papersize': 'letterpaper',
# The paper size ('letterpaper' or 'a4paper').
#'papersize': 'letterpaper',

# The font size ('10pt', '11pt' or '12pt').
#'pointsize': '10pt',
# The font size ('10pt', '11pt' or '12pt').
#'pointsize': '10pt',

# Additional stuff for the LaTeX preamble.
#'preamble': '',
# Additional stuff for the LaTeX preamble.
#'preamble': '',
}

# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
('index', 'ADMesh.tex', u'ADMesh Documentation',
u'ADMesh contributors', 'manual'),
('index', 'ADMesh.tex', u'ADMesh Documentation',
u'ADMesh contributors', 'manual'),
]

# The name of an image file (relative to this directory) to place at the top of
Expand Down Expand Up @@ -247,9 +261,9 @@
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
('index', 'ADMesh', u'ADMesh Documentation',
u'ADMesh contributors', 'ADMesh', 'One line description of project.',
'Miscellaneous'),
('index', 'ADMesh', u'ADMesh Documentation',
u'ADMesh contributors', 'ADMesh', 'One line description of project.',
'Miscellaneous'),
]

# Documents to append as an appendix to all manuals.
Expand Down

0 comments on commit 9a41407

Please sign in to comment.