Documenting variables used in a makefile

I support pretty complicated for Arduino . This makefile contains many variables that can be configured by the user.

I want to automate the task of generating documentation for all of these variables.

The first thing that occurred to me was Doxygen. After some research, I found that Doxygen does not support makefile.

So what is the best way to document the various configuration variables available in a makefile?

+4
source share
1 answer

You can simply write a script that reads the Makefile and looks for special comments. The same principle as with doxygen. How:

### VAR:CC CC defines the binary of the C compiler CC = gcc 

Just create some data structures in your script, and then dump them at any time convenient for you: LaTeX, Markdown, HTML, Textfile ...

+1
source

Source: https://habr.com/ru/post/1487252/


All Articles