Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

docs: kernel-doc.rst: add documentation about man pages

kernel-doc-nano-HOWTO.txt has a chapter about man pages
production. While we don't have a working "make manpages"
target, add it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>

authored by

Mauro Carvalho Chehab and committed by
Jonathan Corbet
93626d7a bdb76f9e

+34
+34
Documentation/doc-guide/kernel-doc.rst
··· 452 452 453 453 Data structures visible in kernel include files should also be documented using 454 454 kernel-doc formatted comments. 455 + 456 + How to use kernel-doc to generate man pages 457 + ------------------------------------------- 458 + 459 + If you just want to use kernel-doc to generate man pages you can do this 460 + from the Kernel git tree:: 461 + 462 + $ scripts/kernel-doc -man $(git grep -l '/\*\*' |grep -v Documentation/) | ./split-man.pl /tmp/man 463 + 464 + Using the small ``split-man.pl`` script below:: 465 + 466 + 467 + #!/usr/bin/perl 468 + 469 + if ($#ARGV < 0) { 470 + die "where do I put the results?\n"; 471 + } 472 + 473 + mkdir $ARGV[0],0777; 474 + $state = 0; 475 + while (<STDIN>) { 476 + if (/^\.TH \"[^\"]*\" 9 \"([^\"]*)\"/) { 477 + if ($state == 1) { close OUT } 478 + $state = 1; 479 + $fn = "$ARGV[0]/$1.9"; 480 + print STDERR "Creating $fn\n"; 481 + open OUT, ">$fn" or die "can't open $fn: $!\n"; 482 + print OUT $_; 483 + } elsif ($state != 0) { 484 + print OUT $_; 485 + } 486 + } 487 + 488 + close OUT;