DaSchmock
DaSchmock

Reputation: 49

Doxygen: Add input-directories using wildcards

I am using Doxygen 1.8.6 on a Windows machine and try to add input-directories using wildcards.

I have a directory with several sub-directories containing source-code but I only want to add specific directories. In the following example, I only want to let Doxygen parse the subdirectories starting with the string 'own_'.

Currently I am adding each directory separately but this is very inconvenient as the version can change or even the contained modules/libraries (the directory-content is generated by another program).

modules\
        lib_x\
        mod_ab\
        ext_mod_ab\
        ext_lib_cde\
        own_module_foo_1v1\
        own_module_bar_2v0\
        own_library_foo_1v0\
        own_library_bar_1v0\

Thank you in advance.

Upvotes: 2

Views: 2800

Answers (4)

albert
albert

Reputation: 9067

Small example (as requested by @KayceBasques in comment in https://stackoverflow.com/a/75495328/1657886)

Doxyfile

INPUT = .
QUIET = YES
@INCLUDE my_incl

my_incl

INPUT = 
INPUT += my_first_dir
INPUT += my_second_dir

Upvotes: 0

Kayce Basques
Kayce Basques

Reputation: 25967

My solution was to use Doxygen's support for expanding environment variables:

INPUT = $(SPACE_SEPARATED_LIST)

As the example variable name implies, the value of the variable needs to be a space-separated list of file or directory names.

Of course you will need to export the SPACE_SEPARATED_lIST variable so that Doxygen is aware of it.

The accepted answer did not work for me as of February 2023. I'm running Doxygen 1.9.6 on a Debian-based OS. The accepted answer says to do this:

INPUT     = .
@INCLUDE  = temp_path_file

Doxygen seems to still search all directories due to the INPUT = . line.

Upvotes: 0

DaSchmock
DaSchmock

Reputation: 49

The solution is to use

@include {filename}

within the doxyfile. The referenced file has to be generated using scripts. My doxyfile looks like this

INPUT     = .
@INCLUDE  = temp_path_file

The required command-scipt to get all matching directories looks like this under Windows (masking, e.g. path1_*, works as well):

for /d %%a in ("%USER_PATH%\*") do echo INPUT += %%~fa >> %FILE_NAME%

Upvotes: 1

kuga
kuga

Reputation: 1765

Use a batch script to create your doxygen manual. Append your doxygen Manual with lines:

INPUT += %directory%

via the Windows Shell command echo. You can filter your directories by names there and add only specific Folders.

Upvotes: 0

Related Questions