Re: make mandocs fails in 2.6.10-bk2

From: Martin Waitz
Date: Sat Jan 01 2005 - 08:19:45 EST


hoi :)

On Fri, Dec 31, 2004 at 01:40:54AM +0100, Jesper Juhl wrote:
> juhl@dragon:~/download/kernel/linux-2.6.10-bk2$ make mandocs
> DOCPROC Documentation/DocBook/kernel-api.sgml
> docproc: /home/juhl/download/kernel/linux-2.6.10-bk2/drivers/net/net_init.c: No such file or directory
> /bin/sh: line 1: 4845 Segmentation fault
> SRCTREE=/home/juhl/download/kernel/linux-2.6.10-bk2/ scripts/basic/docproc doc Documentation/DocBook/kernel-api.tmpl >Documentation/DocBook/kernel-api.sgml
> make[1]: *** [Documentation/DocBook/kernel-api.sgml] Error 139
> make: *** [mandocs] Error 2
>
> removing the reference to net_init.c makes it continue a bit further but
> it still ends up failing with these errors :

that's right.
net_init.c was removed but the reference in the documentation was
overseen.

The other blocker in building documentation is an #ifdef between
the comment and the function prototype in include/linux/skbuff.h:942.

Building documentation works again with the patch below:

Index: Documentation/DocBook/kernel-api.tmpl
===================================================================
RCS file: /home/martin/src/linux/linux-cvs/linux-2.5/Documentation/DocBook/kernel-api.tmpl,v
retrieving revision 1.33
diff -u -p -r1.33 kernel-api.tmpl
--- Documentation/DocBook/kernel-api.tmpl 1 Dec 2004 07:11:50 -0000 1.33
+++ Documentation/DocBook/kernel-api.tmpl 30 Dec 2004 20:28:16 -0000
@@ -143,7 +143,6 @@ KAO -->
<chapter id="netdev">
<title>Network device support</title>
<sect1><title>Driver Support</title>
-!Edrivers/net/net_init.c
!Enet/core/dev.c
</sect1>
<sect1><title>8390 Based Network Cards</title>
Index: scripts/kernel-doc
===================================================================
RCS file: /home/martin/src/linux/linux-cvs/linux-2.5/scripts/kernel-doc,v
retrieving revision 1.21
diff -u -p -r1.21 kernel-doc
--- scripts/kernel-doc 8 Nov 2004 22:45:49 -0000 1.21
+++ scripts/kernel-doc 30 Dec 2004 21:55:55 -0000
@@ -1578,13 +1578,13 @@ sub process_state3_function($$) {
my $x = shift;
my $file = shift;

- if ($x =~ m#\s*/\*\s+MACDOC\s*#io) {
+ if ($x =~ m#\s*/\*\s+MACDOC\s*#io || ($x =~ /^#/ && $x !~ /^#define/)) {
# do nothing
}
elsif ($x =~ /([^\{]*)/) {
$prototype .= $1;
}
- if (($x =~ /\{/) || ($x =~ /\#/) || ($x =~ /;/)) {
+ if (($x =~ /\{/) || ($x =~ /\#define/) || ($x =~ /;/)) {
$prototype =~ s@/\*.*?\*/@@gos; # strip comments.
$prototype =~ s@[\r\n]+@ @gos; # strip newlines/cr's.
$prototype =~ s@^\s+@@gos; # strip leading spaces

--
Martin Waitz

Attachment: signature.asc
Description: Digital signature