summaryrefslogtreecommitdiffstats
path: root/scripts/kernel-doc
diff options
context:
space:
mode:
authorTomasz Warniełło <tomasz.warniello@gmail.com>2022-02-18 19:16:18 +0100
committerJonathan Corbet <corbet@lwn.net>2022-02-24 18:52:45 +0100
commita5cdaea525c32e7def563ba07d9fef9bc6edffab (patch)
tree31090808a9e0e757bb327164d13c69bec59a80c0 /scripts/kernel-doc
parentdocs: Remove duplicated words in trace/osnoise-tracer (diff)
downloadlinux-a5cdaea525c32e7def563ba07d9fef9bc6edffab.tar.xz
linux-a5cdaea525c32e7def563ba07d9fef9bc6edffab.zip
scripts: kernel-doc: Add the basic POD sections
The NAME section provides the doc title, while SYNOPSIS contains the basic syntax and usage description, which will be printed in the help document and in the error output produced on wrong script usage. The rationale is to give users simple and succinct enlightment, at the same time structuring the script internally for the maintainers. In the synopsis, Rst-only options are grouped around rst, and the rest is arranged as in the OPTIONS subsections (yet to be translated into POD, check at the end of the series). The third of the basic sections, DESCRIPTION, is added separately. Signed-off-by: Tomasz Warniełło <tomasz.warniello@gmail.com> Tested-by: Randy Dunlap <rdunlap@infradead.org> Acked-by: Randy Dunlap <rdunlap@infradead.org> Disliked-by: Akira Yokosawa <akiyks@gmail.com> Link: https://lore.kernel.org/r/20220218181628.1411551-2-tomasz.warniello@gmail.com Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Diffstat (limited to 'scripts/kernel-doc')
-rwxr-xr-xscripts/kernel-doc25
1 files changed, 25 insertions, 0 deletions
diff --git a/scripts/kernel-doc b/scripts/kernel-doc
index 3106b7536b89..c8fbf1d3d5aa 100755
--- a/scripts/kernel-doc
+++ b/scripts/kernel-doc
@@ -16,6 +16,31 @@ use strict;
## This software falls under the GNU General Public License. ##
## Please read the COPYING file for more information ##
+=head1 NAME
+
+kernel-doc - Print formatted kernel documentation to stdout
+
+=head1 SYNOPSIS
+
+ kernel-doc [-h] [-v] [-Werror]
+ [ -man |
+ -rst [-sphinx-version VERSION] [-enable-lineno] |
+ -none
+ ]
+ [
+ -export |
+ -internal |
+ [-function NAME] ... |
+ [-nosymbol NAME] ...
+ ]
+ [-no-doc-sections]
+ [-export-file FILE] ...
+ FILE ...
+
+Run `kernel-doc -h` for details.
+
+=cut
+
# 18/01/2001 - Cleanups
# Functions prototyped as foo(void) same as foo()
# Stop eval'ing where we don't need to.