3 # split-man: create man pages from kernel-doc -man output
5 # Author: Tim Waugh <twaugh@redhat.com>
6 # Modified by: Christoph Hellwig <hch@infradead.org>
11 die "$0: where do I put the results?\n" unless ($#ARGV >= 0);
12 die "$0: can't create $ARGV[0]: $!\n" unless mkdir $ARGV[0], 0777;
17 s/&(\w+)/\\fB\1\\fP/g; # fix smgl uglinesses
18 if (/^\.TH \"[^\"]*\" 9 \"([^\"]*)\"/) {
19 close OUT unless ($state++ == 0);
20 my $fn = "$ARGV[0]/$1.9";
21 if (open OUT, ">$fn") {
22 print STDERR "creating $fn\n";
24 die "can't open $fn: $!\n";
28 } elsif ($state != 0) {