7

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?

mzjn
  • 48,958
  • 13
  • 128
  • 248
user3841724
  • 111
  • 4
  • I am able to resolve the problem. For the requirement as described above, I created a doxygen configuration file per directory, which inturn generates separate index and respective xml files. With this approach, i am able to get the correct html files generated. – user3841724 Jul 16 '14 at 09:33
  • 2
    In which case it would be helpful to put that into an 'answer' so that this shows as a resolved question. – Cheeseminer Jul 16 '14 at 16:08

1 Answers1

4

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.

user3841724
  • 111
  • 4