diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/kernel-doc | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/scripts/kernel-doc b/scripts/kernel-doc index 8255f723b7e8..ec54f12f57b0 100755 --- a/scripts/kernel-doc +++ b/scripts/kernel-doc | |||
@@ -46,13 +46,16 @@ use strict; | |||
46 | # Note: This only supports 'c'. | 46 | # Note: This only supports 'c'. |
47 | 47 | ||
48 | # usage: | 48 | # usage: |
49 | # kernel-doc [ -docbook | -html | -text | -man ] | 49 | # kernel-doc [ -docbook | -html | -text | -man ] [ -no-doc-sections ] |
50 | # [ -function funcname [ -function funcname ...] ] c file(s)s > outputfile | 50 | # [ -function funcname [ -function funcname ...] ] c file(s)s > outputfile |
51 | # or | 51 | # or |
52 | # [ -nofunction funcname [ -function funcname ...] ] c file(s)s > outputfile | 52 | # [ -nofunction funcname [ -function funcname ...] ] c file(s)s > outputfile |
53 | # | 53 | # |
54 | # Set output format using one of -docbook -html -text or -man. Default is man. | 54 | # Set output format using one of -docbook -html -text or -man. Default is man. |
55 | # | 55 | # |
56 | # -no-doc-sections | ||
57 | # Do not output DOC: sections | ||
58 | # | ||
56 | # -function funcname | 59 | # -function funcname |
57 | # If set, then only generate documentation for the given function(s) or | 60 | # If set, then only generate documentation for the given function(s) or |
58 | # DOC: section titles. All other functions and DOC: sections are ignored. | 61 | # DOC: section titles. All other functions and DOC: sections are ignored. |
@@ -211,7 +214,7 @@ my $blankline_text = ""; | |||
211 | 214 | ||
212 | 215 | ||
213 | sub usage { | 216 | sub usage { |
214 | print "Usage: $0 [ -v ] [ -docbook | -html | -text | -man ]\n"; | 217 | print "Usage: $0 [ -v ] [ -docbook | -html | -text | -man ] [ -no-doc-sections ]\n"; |
215 | print " [ -function funcname [ -function funcname ...] ]\n"; | 218 | print " [ -function funcname [ -function funcname ...] ]\n"; |
216 | print " [ -nofunction funcname [ -nofunction funcname ...] ]\n"; | 219 | print " [ -nofunction funcname [ -nofunction funcname ...] ]\n"; |
217 | print " c source file(s) > outputfile\n"; | 220 | print " c source file(s) > outputfile\n"; |
@@ -225,6 +228,7 @@ if ($#ARGV==-1) { | |||
225 | 228 | ||
226 | my $verbose = 0; | 229 | my $verbose = 0; |
227 | my $output_mode = "man"; | 230 | my $output_mode = "man"; |
231 | my $no_doc_sections = 0; | ||
228 | my %highlights = %highlights_man; | 232 | my %highlights = %highlights_man; |
229 | my $blankline = $blankline_man; | 233 | my $blankline = $blankline_man; |
230 | my $modulename = "Kernel API"; | 234 | my $modulename = "Kernel API"; |
@@ -329,6 +333,8 @@ while ($ARGV[0] =~ m/^-(.*)/) { | |||
329 | usage(); | 333 | usage(); |
330 | } elsif ($cmd eq '-filelist') { | 334 | } elsif ($cmd eq '-filelist') { |
331 | $filelist = shift @ARGV; | 335 | $filelist = shift @ARGV; |
336 | } elsif ($cmd eq '-no-doc-sections') { | ||
337 | $no_doc_sections = 1; | ||
332 | } | 338 | } |
333 | } | 339 | } |
334 | 340 | ||
@@ -380,6 +386,10 @@ sub dump_doc_section { | |||
380 | my $name = shift; | 386 | my $name = shift; |
381 | my $contents = join "\n", @_; | 387 | my $contents = join "\n", @_; |
382 | 388 | ||
389 | if ($no_doc_sections) { | ||
390 | return; | ||
391 | } | ||
392 | |||
383 | if (($function_only == 0) || | 393 | if (($function_only == 0) || |
384 | ( $function_only == 1 && defined($function_table{$name})) || | 394 | ( $function_only == 1 && defined($function_table{$name})) || |
385 | ( $function_only == 2 && !defined($function_table{$name}))) | 395 | ( $function_only == 2 && !defined($function_table{$name}))) |