Make Help
If you use make
in your projects, providing simple help for users is a common problem. What targets exist? What do they do? If you use nested Makefiles, where are the targets defined?
The make-help project provides a very simple way to add documentation to your Makefiles that addresses all of these questions. It uses comments in the Makefiles themselves to provide the information. It handles nested Makefiles, and works with both BSD and GNU make
.
Add three makefile fragments to your project, and add a single include
statement to each Makefile that you want to document. Place that statement above all other targets in the Makefile to make it the default. Then add comments to the Makefile. That’s all there is to it!
The project is in the public domain, so have at it! Other users of your Makefiles will thank you later.