2 # SPDX-License-Identifier: GPL-2.0
4 # Author: Mauro Carvalho Chehab <mchehab@s-opensource.com>
6 # Produce manpages from kernel-doc.
7 # See Documentation/doc-guide/kernel-doc.rst for instructions
10 die "where do I put the results?\n";
16 if (/^\.TH \"[^\"]*\" 9 \"([^\"]*)\"/) {
17 if ($state == 1) { close OUT
}
19 $fn = "$ARGV[0]/$1.9";
20 print STDERR
"Creating $fn\n";
21 open OUT
, ">$fn" or die "can't open $fn: $!\n";
23 } elsif ($state != 0) {