Command line tools

Beside the library, the installation of the LinuxDoc [ref] also installs some command-line tools described here (or use the --help option).


Suitable for automatic API documentation. Parses your source tree, grabs kernel-doc comments and generates analogous tree of reST files with the content from the kernel-doc comments. E.g. to parse kernel’s whole source tree:

$ kernel-autodoc /share/linux ./out

This parses the whole folder /share/linux and outputs a analogous tree with reST files in the ./out folder. Alternative you could also parse only parts of the source tree, e.g. the include folder:

$ kernel-autodoc --markup kernel-doc /share/linux/include ./out

The option --markup kernel-doc is a tribute to the historical fact, that most of the kernel-doc comments are old and not reST compliant. This circumstance is also described see [ref]


Lint kernel-doc comments from source code. E.g. to lint the kernel-doc comments of a source-file.:

$ kernel-lintdoc /share/linux/include/media/lirc_dev.h

Alternative you could also lint whole parts of the source tree, e.g. the include folder:

$ kernel-lintdoc /share/linux/include/


Parse kernel-doc comments from source code and print the reST to stdout. This command exits, to see the generated reST, normally you use the kernel-doc directive in your reST documentation.:

$ kernel-doc /share/linux/include/media/lirc_dev.h

To see the difference between Vintage kernel-doc mode and reST kernel-doc mode use the option --markup kernel-doc.