Skip to content

Commit

Permalink
[Docs] Split Doxygen into multiple subprojects
Browse files Browse the repository at this point in the history
This is done, because multiple PAL implementations necessarily have
common function names.
  • Loading branch information
woju authored and mkow committed Mar 21, 2020
1 parent b52aad6 commit 527bb35
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 18 deletions.
15 changes: 1 addition & 14 deletions Documentation/Doxyfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
PROJECT_NAME = "Graphene"
OUTPUT_DIRECTORY = _build/doxygen
# This is a common Doxyfile, actual listings are built from Doxyfile-*

GENERATE_XML = YES
XML_PROGRAMLISTING = NO
Expand All @@ -8,18 +7,6 @@ XML_OUTPUT = xml
GENERATE_HTML = NO
GENERATE_LATEX = NO

RECURSIVE = YES
INPUT = \
../Pal \
../LibOS/shim/include \
../LibOS/shim/src

EXCLUDE = \
../Pal/lib \
../Pal/regression \
../Pal/test
#EXCLUDE_PATTERNS =

WARN_NO_PARAMDOC = YES
WARN_AS_ERROR = NO
OPTIMIZE_OUTPUT_FOR_C = YES
Expand Down
6 changes: 6 additions & 0 deletions Documentation/Doxyfile-libos
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
@INCLUDE = Doxyfile
PROJECT_NAME = "LibOS"
OUTPUT_DIRECTORY = _build/doxygen-libos
INPUT = \
../LibOS/shim/include \
../LibOS/shim/src
8 changes: 8 additions & 0 deletions Documentation/Doxyfile-pal
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
@INCLUDE = Doxyfile
PROJECT_NAME = "PAL"
OUTPUT_DIRECTORY = _build/doxygen-pal
INPUT = ../Pal/include/pal ../Pal/src
EXCLUDE = ../Pal/src/host
MACRO_EXPANSION = YES
EXPAND_ONLY_PREDEF = YES
PREDEFINED = noreturn=
4 changes: 4 additions & 0 deletions Documentation/Doxyfile-pal-linux
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
@INCLUDE = Doxyfile
PROJECT_NAME = "PAL Linux"
OUTPUT_DIRECTORY = _build/doxygen-pal-linux
INPUT = ../Pal/src/host/Linux
4 changes: 4 additions & 0 deletions Documentation/Doxyfile-pal-linux-sgx
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
@INCLUDE = Doxyfile
PROJECT_NAME = "PAL Linux-SGX"
OUTPUT_DIRECTORY = _build/doxygen-pal-linux-sgx
INPUT = ../Pal/src/host/Linux-SGX
2 changes: 1 addition & 1 deletion Documentation/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ clean:

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile Doxyfile
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
7 changes: 4 additions & 3 deletions Documentation/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,12 @@
:trim:
'''

breathe_default_project = 'graphene'
breathe_projects = {breathe_default_project: '_build/doxygen/xml'}
breathe_projects = {p: '_build/doxygen-{}/xml'.format(p)
for p in ('libos', 'pal', 'pal-linux', 'pal-linux-sgx')}

def generate_doxygen(app):
subprocess.check_call(['doxygen', 'Doxyfile'])
for p in breathe_projects:
subprocess.check_call(['doxygen', 'Doxyfile-{}'.format(p)])
def setup(app):
app.connect('builder-inited', generate_doxygen)

Expand Down
1 change: 1 addition & 0 deletions Documentation/libos/shim-init.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ A random file documentation
There is a |~| random function:

.. doxygenfunction:: parse_int
:project: libos

0 comments on commit 527bb35

Please sign in to comment.