Commit 4b44595a7b8e0ebf3fce108df65d8cd6a6cf4910

Authored by Johannes Berg
Committed by Sam Ravnborg
1 parent b112e0f73f

kernel-doc: process functions, not DOC:

This flag is necessary for the next patch for docproc to output
only the functions and not DOC: sections when a function list
is requested.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>

Showing 1 changed file with 12 additions and 2 deletions Side-by-side Diff

... ... @@ -46,13 +46,16 @@
46 46 # Note: This only supports 'c'.
47 47  
48 48 # usage:
49   -# kernel-doc [ -docbook | -html | -text | -man ]
  49 +# kernel-doc [ -docbook | -html | -text | -man ] [ -no-doc-sections ]
50 50 # [ -function funcname [ -function funcname ...] ] c file(s)s > outputfile
51 51 # or
52 52 # [ -nofunction funcname [ -function funcname ...] ] c file(s)s > outputfile
53 53 #
54 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 59 # -function funcname
57 60 # If set, then only generate documentation for the given function(s) or
58 61 # DOC: section titles. All other functions and DOC: sections are ignored.
... ... @@ -211,7 +214,7 @@
211 214  
212 215  
213 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 218 print " [ -function funcname [ -function funcname ...] ]\n";
216 219 print " [ -nofunction funcname [ -nofunction funcname ...] ]\n";
217 220 print " c source file(s) > outputfile\n";
... ... @@ -225,6 +228,7 @@
225 228  
226 229 my $verbose = 0;
227 230 my $output_mode = "man";
  231 +my $no_doc_sections = 0;
228 232 my %highlights = %highlights_man;
229 233 my $blankline = $blankline_man;
230 234 my $modulename = "Kernel API";
... ... @@ -329,6 +333,8 @@
329 333 usage();
330 334 } elsif ($cmd eq '-filelist') {
331 335 $filelist = shift @ARGV;
  336 + } elsif ($cmd eq '-no-doc-sections') {
  337 + $no_doc_sections = 1;
332 338 }
333 339 }
334 340  
... ... @@ -379,6 +385,10 @@
379 385 sub dump_doc_section {
380 386 my $name = shift;
381 387 my $contents = join "\n", @_;
  388 +
  389 + if ($no_doc_sections) {
  390 + return;
  391 + }
382 392  
383 393 if (($function_only == 0) ||
384 394 ( $function_only == 1 && defined($function_table{$name})) ||