From c412c75def6779003d7ad28dc7bcdf88e56d5599 Mon Sep 17 00:00:00 2001 From: Michael Meffie Date: Sat, 25 Mar 2023 16:43:07 -0400 Subject: [PATCH] doc: Fix the AFS::ukernel man page title The pod2man tool determines a man page title (set in the .TH macro) from the input filename, unless the -n (--name) option is specified. Our AFS::ukernel man page input file is named AFS.ukernel.pod to avoid colons in the filename (since colon characters are not supported on Windows), so the generated man page contains the title "AFS.ukernel" instead of "AFS::ukernel". Use the pod2man -n (--name) option when converting section 3 man pages to override the automatic title naming. This fixes the .TH macro in the generated AFS::ukernel.3 file. Fortunately, the -n (--name) option is only needed for section 3 man pages. Specifying the pod2man -n (--name) option is simpler and less invasive than renaming pod3/AFS.ukernel.pod to pod3/lib/AFS/ukernel.pod (which would also fix the embedded title). Change-Id: I495ea2d30ce1b34698519ffa34a39362c449ba09 Reviewed-on: https://gerrit.openafs.org/15363 Reviewed-by: Cheyenne Wills Reviewed-by: Mark Vitale Tested-by: BuildBot Reviewed-by: Benjamin Kaduk --- doc/man-pages/generate-man | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/man-pages/generate-man b/doc/man-pages/generate-man index 726e0cb065..c696bc0187 100755 --- a/doc/man-pages/generate-man +++ b/doc/man-pages/generate-man @@ -49,8 +49,9 @@ pod3=`ls pod3` if [ -n "$pod3" ] ; then cd pod3 for f in *.pod ; do - pod2man -c 'AFS Library Reference' -r 'OpenAFS' -s 3 "$f" \ - > ../man3/`echo "$f" | sed -e 's/\.pod$//' -e 's/^AFS\./AFS::/'`.3 + name=`echo "$f" | sed -e 's/\.pod$//' -e 's/^AFS\./AFS::/'` + pod2man -c 'AFS Library Reference' -r 'OpenAFS' -s 3 "$f" -n "$name" \ + > ../man3/${name}.3 # Perl module manpages are named AFS.foo instead of AFS::foo, since # we cannot have colons in filenames on Windows. So here, we assume # anything with "AFS." should be "AFS::" instead.