Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Run Doxygen only on select files / modules?

Tags:

doxygen

Recently I started writing some doxygen docs in an existing project which already has quite a lot of doxygen comments.

Since I'm learning a bit - I like to iterate with making edits and generating docs, since doc generation is quite slow - 3-5min. This becomes un-workable.

I managed by deleting most of the files in the source tree so doxy only found the ones I was editing but this is really a horrible solution and not something I'd want to do frequently.

Is there a way (command line arg or env variable for eg) - to limit which files/modules are used for generating docs - so rebuilding docs can be done much faster?

like image 932
ideasman42 Avatar asked Feb 28 '12 14:02

ideasman42


People also ask

How do I exclude a file in doxygen?

How can I make doxygen ignore some code fragment? The new and easiest way is to add one comment block with a \cond command at the start and one comment block with a \endcond command at the end of the piece of code that should be ignored. This should be within the same file of course.

Can I configure doxygen from the command line?

You can run doxygen from the command line as long as you have a configuration file to use. However, it is often more convenient to run the Doxygen Wizard – this is a GUI that helps you create a Doxygen configuration file and then runs Doxygen for you.

What is Doxy file?

File created by Doxygen, a documentation system for programming languages such as C++, Java, Python, and PHP; contains text and Doxygen markup tags, which include references to source code files and specifications for generating documents.


1 Answers

Yes, you can customize Doxygen's behavior from either the command-line or via environment variables. For example, if you only want to include one file (include/somefile.h), you could execute Doxygen like:

( cat Doxyfile ; echo "INPUT=include/somefile.h" ) | doxygen -

see the Doxygen FAQ's "Can I configure doxygen from the command line?" for more details on customizing behavior from the command line.

Alternatively, if you want to use environment variables, you could use specify something like the following in your configuration file:

INPUT = $(FILE)

Doxygen performs environment variable substitution on its configuration files, allowing you to specify which file(s) should be acted on using:

export FILE=include/somefile.h
doxygen Doxyfile

See Doxygen Configuration for details on using environment variables in configuration files.

like image 101
DRH Avatar answered Oct 17 '22 05:10

DRH