[Doxygen-users] Preprocessing Issues
Brought to you by:
dimitri
|
From: <joh...@uk...> - 2001-08-10 10:56:57
|
Hi again I'm working with doxygen on a large C code project which makes heavy use of preprocessor conditionals and macro expansion. Doxygen does a wonderful job, but this project has exposed a weakness in the preprocessor area: doxygen deposits the results of preprocessing in the header files instead of in the source (.c) files where they logically belong. Consider the following source file fragment: #define ONE #include "header.h" #undef ONE #define TWO #include "header.h" #undef TWO header.h may recursively include other headers affected by ONE and TWO. This technique is used in the project I'm working on to generate structs, initialized variables etc which are particular to the source file driving the inclusion, not to any header file. Another source file might include the same header to achieve a quite different outcome. In a specific case in the project I'm concerned with, a struct array variable definition and initializer is built from a number of headers when included in a particular source file. I want that variable and initializer to appear in the source file documentation (with a reference to the header), not in the header documentation where doxygen currently puts it. Another issue here is that the preprocessor-generated initializer contains lots of blank lines which I'm currently removing from the html files with a script. I had to set MAX_INITIALIZER_LINES to a very large number to see it at all. I've started to delve into the doxygen source to try to fix these problems. Any advice appreciated. John Storrs |