diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/kernel-doc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/scripts/kernel-doc b/scripts/kernel-doc index a3e23b10ae97..a325a0c890dc 100755 --- a/scripts/kernel-doc +++ b/scripts/kernel-doc | |||
@@ -328,6 +328,15 @@ while ($ARGV[0] =~ m/^-(.*)/) { | |||
328 | } | 328 | } |
329 | } | 329 | } |
330 | 330 | ||
331 | # get kernel version from env | ||
332 | sub get_kernel_version() { | ||
333 | my $version; | ||
334 | |||
335 | if (defined($ENV{'KERNELVERSION'})) { | ||
336 | $version = $ENV{'KERNELVERSION'}; | ||
337 | } | ||
338 | return $version; | ||
339 | } | ||
331 | 340 | ||
332 | # generate a sequence of code that will splice in highlighting information | 341 | # generate a sequence of code that will splice in highlighting information |
333 | # using the s// operator. | 342 | # using the s// operator. |
@@ -601,6 +610,7 @@ sub output_function_xml(%) { | |||
601 | print "<refmeta>\n"; | 610 | print "<refmeta>\n"; |
602 | print " <refentrytitle><phrase>".$args{'function'}."</phrase></refentrytitle>\n"; | 611 | print " <refentrytitle><phrase>".$args{'function'}."</phrase></refentrytitle>\n"; |
603 | print " <manvolnum>9</manvolnum>\n"; | 612 | print " <manvolnum>9</manvolnum>\n"; |
613 | print " <refmiscinfo class=\"version\">" . get_kernel_version() . "</refmiscinfo>\n"; | ||
604 | print "</refmeta>\n"; | 614 | print "</refmeta>\n"; |
605 | print "<refnamediv>\n"; | 615 | print "<refnamediv>\n"; |
606 | print " <refname>".$args{'function'}."</refname>\n"; | 616 | print " <refname>".$args{'function'}."</refname>\n"; |
@@ -677,6 +687,7 @@ sub output_struct_xml(%) { | |||
677 | print "<refmeta>\n"; | 687 | print "<refmeta>\n"; |
678 | print " <refentrytitle><phrase>".$args{'type'}." ".$args{'struct'}."</phrase></refentrytitle>\n"; | 688 | print " <refentrytitle><phrase>".$args{'type'}." ".$args{'struct'}."</phrase></refentrytitle>\n"; |
679 | print " <manvolnum>9</manvolnum>\n"; | 689 | print " <manvolnum>9</manvolnum>\n"; |
690 | print " <refmiscinfo class=\"version\">" . get_kernel_version() . "</refmiscinfo>\n"; | ||
680 | print "</refmeta>\n"; | 691 | print "</refmeta>\n"; |
681 | print "<refnamediv>\n"; | 692 | print "<refnamediv>\n"; |
682 | print " <refname>".$args{'type'}." ".$args{'struct'}."</refname>\n"; | 693 | print " <refname>".$args{'type'}." ".$args{'struct'}."</refname>\n"; |
@@ -761,6 +772,7 @@ sub output_enum_xml(%) { | |||
761 | print "<refmeta>\n"; | 772 | print "<refmeta>\n"; |
762 | print " <refentrytitle><phrase>enum ".$args{'enum'}."</phrase></refentrytitle>\n"; | 773 | print " <refentrytitle><phrase>enum ".$args{'enum'}."</phrase></refentrytitle>\n"; |
763 | print " <manvolnum>9</manvolnum>\n"; | 774 | print " <manvolnum>9</manvolnum>\n"; |
775 | print " <refmiscinfo class=\"version\">" . get_kernel_version() . "</refmiscinfo>\n"; | ||
764 | print "</refmeta>\n"; | 776 | print "</refmeta>\n"; |
765 | print "<refnamediv>\n"; | 777 | print "<refnamediv>\n"; |
766 | print " <refname>enum ".$args{'enum'}."</refname>\n"; | 778 | print " <refname>enum ".$args{'enum'}."</refname>\n"; |