1
votes

I am trying to separate out internal and external documentation using the doxygen constructs of cond; but i just cant seem to get get it working. I would essentially like to exclude some files completely and not conditionally. Regardless of where i add the tag (before include, before header guards etc) , the files and source both show up.

What i have tried in vain is to take the test file from doxegen repo for conditional test and add it to the project.

Steps to reproduce [Linux]

  • create a new directory.
  • copy paste the above file (had to rename it to .h as .c was passed over?).
  • generate dummy config via doxygen -g.
  • update Doxyfile ENABLED_SECTION = COND_ENABLED.
  • Run doxygen.
  • check html/index.html

This however is still visible in the html documentation it generates for the project. I have set the ENABLED_SECTION variable with other values , but cond_enabled function still shows up. Running the testing directory of the project (doxygen) it passes. So i am lost.

Any suggestions?

Tried with latest version 1.8.14.

Thanks!

1
How about not passing the files to doxygen when actually generating the documentation? Or one of the EXCLUDE configuration settings (see the documentation for doxygen)? - Some programmer dude
Post your code here. - chux - Reinstate Monica
You may want to post to one of the Doxygen forums or send to their email list. - Thomas Matthews
@Someprogrammerdude : This certainly works; but it smells like a problem for future me :) - Bobo
@ThomasMatthews : Will do so, just wanted to make sure i am not messing up something. - Bobo

1 Answers

0
votes

Regarding the \cond problems (not an answer directly to the real problem you face, I think, but to long for a comment).

The mentioned file is used in the, limited, testing doxygen can do / does and the first lines contain some instructions on what to do. Furthermore there is a default Doxyfile with the tests in use. It is hard to run a separate test outside the doxygen build tree.

Regarding the remark "Running the testing directory of the project (doxygen) it passes." This is correct, here, at the moment, only testing is done against the XML output and the generated output is compared to a once created version of the XML output. No tests are done, at the moment, in respect to HTML or PDF / LaTeX. Recently the test framework has been slightly extended so in the future this should be possible (compare the xhtml and tex output, but some work has still to be done here).

The version of the parser sees the \cond in the first line (normal C comment) as a doxygen command and skips everything till the first \endcond (your friend in these cases is always doxygen -d preprocessor). I think that removing / modifying the first line will result in an already better result. There is however another hiccup for e.g. HTML output. As the function cond_enabled is not documented and EXPAND_ALL is not set to YES the function will not appear in the documentation. So best is also to add a line of documentation with the function cond_enabled.

Regarding the seen HTML problems I modified the the relevant test in doxygen slightly and pushed a proposed patch to github (pull request 714, https://github.com/doxygen/doxygen/pull/714).

Note: the problem of skipping the \cond in normal C comment is quite a bit harder to implement (seen the logical complexity of the doxygen code in pre.l and commentcnv.l.

EDIT: 2018/06/10: The push request has been integrated in the master version on github.