Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

doxygen+sphinx(breathe) for documentation

I am new to doxygen and sphinx usage. I have a requirement to create documents which is programmed in C language. The idea is to generate xml files from doxygen for each file and then use breathe as a bridge to sphinx for creating html pages. I am successful in generating the xml files and able to get the html pages as well. However, I see that each html file contains all the file contents, rather than each html per file/directory.

ie. dir1 => file1.h and file1.c
    dir2 => file2.h and file2.c

Output:

file1.html => file1.xml & file2.xml
file2.html => file1.xml & file2.xml

Expected output

file1.html to contain file1.xml(both header the implementation)
file2.html for file2.xml

Here are the settings: Doxyfile(doxygen)

GENERATE_XML = YES

conf.py(sphinx)

breathe_projects = { <dir1_name>: <xml_path>,
                    <dir2_name>: <xml_path> }

Could anybody help me in setting the right configuration to get the expected output please?

like image 969
user3841724 Avatar asked Jul 16 '14 08:07

user3841724


1 Answers

For the above requirement, Doxyfile per directory should be created. This will generate xml files based on Doxyfile

i.e. for the files
dir1 => file1.h and file1.c
dir2 => file2.h and file2.c

create
Doxyfile1 in dir1
Doxyfile2 in dir2

This generates separate index.xml files per directory.

In Sphinx configuration(conf.py), location to xml should be provided

i.e. breathe_projects = { <dir1_name>: <dir1/xml_path>,
                          <dir2_name>: <dir2/xml_path> }

With the above changes, separate html files - file1.html(with file1.h and file1.c) and file2.html(with file2.h and file2.c) are generated.

like image 105
user3841724 Avatar answered Sep 29 '22 19:09

user3841724