Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=53f049fa5f18730b61faaee582ea0e045fd44f49
Commit:     53f049fa5f18730b61faaee582ea0e045fd44f49
Parent:     cc0a8fbb7ce00f65dc337dd91389b7151f44ed30
Author:     Borislav Petkov <[EMAIL PROTECTED]>
AuthorDate: Tue May 8 00:30:54 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Tue May 8 11:15:13 2007 -0700

    kill warnings when building mandocs
    
    This patch shuts warnings of the sort:
    
    make -C /mnt/samsung_200/sam/kernel/trees/21-rc6/build \
        KBUILD_SRC=/mnt/samsung_200/sam/kernel/trees/21-rc6 \
        KBUILD_EXTMOD="" -f /mnt/samsung_200/sam/kernel/trees/21-rc6/Makefile 
mandocs
    make -f /mnt/samsung_200/sam/kernel/trees/21-rc6/scripts/Makefile.build 
obj=scripts/basic
    make -f /mnt/samsung_200/sam/kernel/trees/21-rc6/scripts/Makefile.build 
obj=Documentation/DocBook mandocs
      SRCTREE=/mnt/samsung_200/sam/kernel/trees/21-rc6/ 
/mnt/samsung_200/sam/kernel/trees/21-rc6/build/scripts/basic/docproc doc 
/mnt/samsung_200/sam/kernel/trees/21-rc6/Documentation/DocBook/wanbook.tmpl 
>Documentation/DocBook/wanbook.xml
      if grep -q refentry Documentation/DocBook/wanbook.xml; then xmlto man -m 
/mnt/samsung_200/sam/kernel/trees/21-rc6/Documentation/DocBook/stylesheet.xsl 
-o Documentation/DocBook/man Documentation/DocBook/wanbook.xml ; gzip -f 
Documentation/DocBook/man/*.9; fi
    Note: meta version: No productnumber or alternative     sppp_close
    Note: meta version: No [EMAIL PROTECTED]        sppp_close
    Note: Writing sppp_close.9
    Note: meta version: No productnumber or alternative     sppp_open
    Note: meta version: No [EMAIL PROTECTED]        sppp_open
    
    by adding a RefMiscInfo xml tag in the form of the current kernel version
    to the function, struct and enum definitions in files included by
    kernel-doc when building 'mandocs'.  However, the version string appears
    truncated on the manpage due to some constraints in the xml DTD for the man
    header, I believe, for the troff output is truncated too.
    
    Signed-off-by: Borislav Petkov <[EMAIL PROTECTED]>
    Cc: "Randy.Dunlap" <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 scripts/kernel-doc |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/scripts/kernel-doc b/scripts/kernel-doc
index a3e23b1..a325a0c 100755
--- a/scripts/kernel-doc
+++ b/scripts/kernel-doc
@@ -328,6 +328,15 @@ while ($ARGV[0] =~ m/^-(.*)/) {
     }
 }
 
+# get kernel version from env
+sub get_kernel_version() {
+    my $version;
+
+    if (defined($ENV{'KERNELVERSION'})) {
+       $version = $ENV{'KERNELVERSION'};
+    }
+    return $version;
+}
 
 # generate a sequence of code that will splice in highlighting information
 # using the s// operator.
@@ -601,6 +610,7 @@ sub output_function_xml(%) {
     print "<refmeta>\n";
     print " 
<refentrytitle><phrase>".$args{'function'}."</phrase></refentrytitle>\n";
     print " <manvolnum>9</manvolnum>\n";
+    print " <refmiscinfo class=\"version\">" . get_kernel_version() . 
"</refmiscinfo>\n";
     print "</refmeta>\n";
     print "<refnamediv>\n";
     print " <refname>".$args{'function'}."</refname>\n";
@@ -677,6 +687,7 @@ sub output_struct_xml(%) {
     print "<refmeta>\n";
     print " <refentrytitle><phrase>".$args{'type'}." 
".$args{'struct'}."</phrase></refentrytitle>\n";
     print " <manvolnum>9</manvolnum>\n";
+    print " <refmiscinfo class=\"version\">" . get_kernel_version() . 
"</refmiscinfo>\n";
     print "</refmeta>\n";
     print "<refnamediv>\n";
     print " <refname>".$args{'type'}." ".$args{'struct'}."</refname>\n";
@@ -761,6 +772,7 @@ sub output_enum_xml(%) {
     print "<refmeta>\n";
     print " <refentrytitle><phrase>enum 
".$args{'enum'}."</phrase></refentrytitle>\n";
     print " <manvolnum>9</manvolnum>\n";
+    print " <refmiscinfo class=\"version\">" . get_kernel_version() . 
"</refmiscinfo>\n";
     print "</refmeta>\n";
     print "<refnamediv>\n";
     print " <refname>enum ".$args{'enum'}."</refname>\n";
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to