# Note: This only supports 'c'.
# usage:
-# kernel-doc [ -docbook | -html | -text | -man ]
+# kernel-doc [ -docbook | -html | -text | -man ] [ -no-doc-sections ]
# [ -function funcname [ -function funcname ...] ] c file(s)s > outputfile
# or
# [ -nofunction funcname [ -function funcname ...] ] c file(s)s > outputfile
#
# Set output format using one of -docbook -html -text or -man. Default is man.
#
+# -no-doc-sections
+# Do not output DOC: sections
+#
# -function funcname
# If set, then only generate documentation for the given function(s) or
# DOC: section titles. All other functions and DOC: sections are ignored.
sub usage {
- print "Usage: $0 [ -v ] [ -docbook | -html | -text | -man ]\n";
+ print "Usage: $0 [ -v ] [ -docbook | -html | -text | -man ] [ -no-doc-sections ]\n";
print " [ -function funcname [ -function funcname ...] ]\n";
print " [ -nofunction funcname [ -nofunction funcname ...] ]\n";
print " c source file(s) > outputfile\n";
my $verbose = 0;
my $output_mode = "man";
+my $no_doc_sections = 0;
my %highlights = %highlights_man;
my $blankline = $blankline_man;
my $modulename = "Kernel API";
usage();
} elsif ($cmd eq '-filelist') {
$filelist = shift @ARGV;
+ } elsif ($cmd eq '-no-doc-sections') {
+ $no_doc_sections = 1;
}
}
my $name = shift;
my $contents = join "\n", @_;
+ if ($no_doc_sections) {
+ return;
+ }
+
if (($function_only == 0) ||
( $function_only == 1 && defined($function_table{$name})) ||
( $function_only == 2 && !defined($function_table{$name})))