doc: Make all vos pages =include common options
[openafs.git] / doc / man-pages / generate-man
index 8e4fc4b..726e0cb 100755 (executable)
@@ -13,11 +13,15 @@ if [ ! -d pod1 ] ; then
     exit 1
 fi
 
-if ! pod2man pod1/afs.pod > /dev/null ; then
+if pod2man pod1/afs.pod > /dev/null ; then
+    :
+else
     echo 'pod2man not found, skipping man page generation' >&2
     exit 1
 fi
-if ! perl -e 'use Pod::Man 2.04' > /dev/null 2>&1 ; then
+if perl -e 'use Pod::Man 2.04' > /dev/null 2>&1 ; then
+    :
+else
     echo 'Pod::Man is older than the recommended version of 2.04 or later' >&2
     echo 'Continuing with man page generation anyway' >&2
 fi
@@ -25,6 +29,7 @@ fi
 # Create the directories.  We generate each section into its own directory
 # to make installation rules easier.
 [ -d man1 ] || mkdir man1
+[ -d man3 ] || mkdir man3
 [ -d man5 ] || mkdir man5
 [ -d man8 ] || mkdir man8
 
@@ -40,6 +45,18 @@ if [ -n "$pod1" ] ; then
     done
     cd ..
 fi
+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
+       # 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.
+    done
+    cd ..
+fi
 pod5=`ls pod5`
 if [ -n "$pod5" ] ; then
     cd pod5