aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2007-10-24 18:08:48 -0400
committerSam Ravnborg <sam@ravnborg.org>2008-01-28 17:14:35 -0500
commit4b44595a7b8e0ebf3fce108df65d8cd6a6cf4910 (patch)
tree82a204d545bb50b910ddb6780ad17d8d1f8d14af /scripts
parentb112e0f73fe8e9e69e60bc9d6d16217795259c3c (diff)
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>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/kernel-doc14
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
213sub usage { 216sub 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
226my $verbose = 0; 229my $verbose = 0;
227my $output_mode = "man"; 230my $output_mode = "man";
231my $no_doc_sections = 0;
228my %highlights = %highlights_man; 232my %highlights = %highlights_man;
229my $blankline = $blankline_man; 233my $blankline = $blankline_man;
230my $modulename = "Kernel API"; 234my $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})))