From 144f9c4381c145b8559ed5cf1faab93c82476f46 Mon Sep 17 00:00:00 2001 From: Jon Shallow Date: Thu, 25 Aug 2022 12:55:22 +0100 Subject: [PATCH] Manual pages: Update NAME section to contain all of the alternative names Update the NAME section with all of the alternative names. All the different files are already built. --- man/Makefile.am | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/man/Makefile.am b/man/Makefile.am index 293bbcb7..4a04b588 100644 --- a/man/Makefile.am +++ b/man/Makefile.am @@ -59,7 +59,14 @@ man7_MANS = $(MAN7) .txt.3: $(A2X) --doctype manpage --format manpage $< + @NEWLIST=`${SED} -ne '/^NAME/,/^SYNOPSIS/p;/^SYNOPSIS/q' $< | ${SED} 's/^- /\\\\\\\- /g' | egrep -v 'NAME|----|SYNOPSIS|^\$$' | tr '\n' ' '` ;\ + NAME=`echo $< | ${SED} -ne 's/^\(coap_[a-zA-Z_0-9]\+\).*$$/\1.3/p'` ;\ + ${SED} -i '/.SH "NAME"/{n;d;}' $${NAME} ;\ + ${SED} -i "/\.SH \"NAME\"/a $${NEWLIST}" $${NAME} $(A2X) --doctype manpage --format xhtml $< + @NEWLIST=`${SED} -ne '/^NAME/,/^SYNOPSIS/p;/^SYNOPSIS/q' $< | ${SED} 's^/^\\\\/^g' | egrep -v 'NAME|----|SYNOPSIS|^\$$' | tr '\n' ' '` ;\ + NAME=`echo $< | ${SED} -ne 's/^\(coap_[a-zA-Z_0-9]\+\).*$$/\1.html/p'` ;\ + ${SED} -i "s^Name

.*

^Name

$${NEWLIST}

^" $${NAME} .txt.5: $(A2X) --doctype manpage --format manpage $<