[PATCH 4/6] kernel-doc: process functions, not DOC:

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <linux-kernel@...>
Cc: <akpm@...>, Johannes Berg <johannes@...>, <sam@...>
Date: Wednesday, October 24, 2007 - 6:08 pm

From: Johannes Berg <johannes@sipsolutions.net>

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>

---
 scripts/kernel-doc |   14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

--- linux-2.6.23-git19.orig/scripts/kernel-doc
+++ linux-2.6.23-git19/scripts/kernel-doc
@@ -46,13 +46,16 @@ use strict;
 # 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.
@@ -211,7 +214,7 @@ my $blankline_text = "";
 
 
 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";
@@ -225,6 +228,7 @@ if ($#ARGV==-1) {
 
 my $verbose = 0;
 my $output_mode = "man";
+my $no_doc_sections = 0;
 my %highlights = %highlights_man;
 my $blankline = $blankline_man;
 my $modulename = "Kernel API";
@@ -329,6 +333,8 @@ while ($ARGV[0] =~ m/^-(.*)/) {
 	usage();
     } elsif ($cmd eq '-filelist') {
 	    $filelist = shift @ARGV;
+    } elsif ($cmd eq '-no-doc-sections') {
+	    $no_doc_sections = 1;
     }
 }
 
@@ -380,6 +386,10 @@ sub dump_doc_section {
     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})))


-- 

-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 0/6] kernel-doc: add DOC: sections support, Randy Dunlap, (Wed Oct 24, 6:08 pm)
Re: [PATCH 0/6] kernel-doc: add DOC: sections support, Sam Ravnborg, (Fri Oct 26, 4:18 pm)
Re: [PATCH 0/6] kernel-doc: add DOC: sections support, Matt Mackall, (Thu Oct 25, 1:29 pm)
Re: [PATCH 0/6] kernel-doc: add DOC: sections support, Randy Dunlap, (Thu Oct 25, 1:36 pm)
Re: [PATCH 0/6] kernel-doc: add DOC: sections support, Matt Mackall, (Thu Oct 25, 3:21 pm)
Re: [PATCH 0/6] kernel-doc: add DOC: sections support, Johannes Berg, (Fri Oct 26, 6:48 am)
Re: [PATCH 0/6] kernel-doc: add DOC: sections support, Matt Mackall, (Fri Oct 26, 10:46 am)
Re: [PATCH 0/6] kernel-doc: add DOC: sections support, Johannes Berg, (Fri Oct 26, 4:32 pm)
[PATCH 3/6] kernel-doc: single DOC: selection, Randy Dunlap, (Wed Oct 24, 6:08 pm)
[PATCH 2/6] kernel-doc: init kernel version, Randy Dunlap, (Wed Oct 24, 6:08 pm)
[PATCH 4/6] kernel-doc: process functions, not DOC:, Randy Dunlap, (Wed Oct 24, 6:08 pm)
[PATCH 5/6] kernel-doc: use no-doc option, Randy Dunlap, (Wed Oct 24, 6:08 pm)
[PATCH 1/6] kernel-doc: fix xml output mode, Randy Dunlap, (Wed Oct 24, 6:08 pm)