diff mbox series

[1/4] man: install all manpages that redirect to another manpage

Message ID 159950109644.567664.3395622067779955144.stgit@magnolia (mailing list archive)
State Accepted
Headers show
Series xfsprogs: various fixes for 5.9 | expand

Commit Message

Darrick J. Wong Sept. 7, 2020, 5:51 p.m. UTC
From: Darrick J. Wong <darrick.wong@oracle.com>

Some of the ioctl manpages do not contain any information other than a
pointer to a different manpage.  These aren't picked up by the install
scripts, so fix them so that they do.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
 include/buildmacros |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Christoph Hellwig Sept. 8, 2020, 2:34 p.m. UTC | #1
On Mon, Sep 07, 2020 at 10:51:36AM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <darrick.wong@oracle.com>
> 
> Some of the ioctl manpages do not contain any information other than a
> pointer to a different manpage.  These aren't picked up by the install
> scripts, so fix them so that they do.

While the makefile code looks like black magic it works here, so:

Reviewed-by: Christoph Hellwig <hch@lst.de>

:)
Darrick J. Wong Sept. 9, 2020, 7:11 p.m. UTC | #2
On Tue, Sep 08, 2020 at 03:34:49PM +0100, Christoph Hellwig wrote:
> On Mon, Sep 07, 2020 at 10:51:36AM -0700, Darrick J. Wong wrote:
> > From: Darrick J. Wong <darrick.wong@oracle.com>
> > 
> > Some of the ioctl manpages do not contain any information other than a
> > pointer to a different manpage.  These aren't picked up by the install
> > scripts, so fix them so that they do.
> 
> While the makefile code looks like black magic it works here, so:
> 
> Reviewed-by: Christoph Hellwig <hch@lst.de>
> 
> :)

TBH I've wondered why installing manpages isn't a simple matter of
creating the directory and copying the manpages into it, especially
since debuild already knows how to find and compress manpages in
whatever format is the debian default... but the less I have to do with
the rpm builds the better, so I left it alone. ;)

--D
Allison Henderson Sept. 11, 2020, 2:57 a.m. UTC | #3
On 9/7/20 10:51 AM, Darrick J. Wong wrote:
> From: Darrick J. Wong <darrick.wong@oracle.com>
> 
> Some of the ioctl manpages do not contain any information other than a
> pointer to a different manpage.  These aren't picked up by the install
> scripts, so fix them so that they do.
> 
> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Ok, makes sense
Reviewed-by: Allison Collins <allison.henderson@oracle.com>

> ---
>   include/buildmacros |    3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> 
> diff --git a/include/buildmacros b/include/buildmacros
> index f8d54200382a..6f34d7c528fa 100644
> --- a/include/buildmacros
> +++ b/include/buildmacros
> @@ -95,9 +95,10 @@ INSTALL_MAN = \
>   	@for d in $(MAN_PAGES); do \
>   		first=true; \
>   		for m in `$(AWK) \
> -			'/^\.S[h|H] NAME/ {ok=1; next} ok {print; exit}' $$d \
> +			'/^\.S[h|H] NAME/ {ok=1; next} /^\.so/ {printf("so %s\n", FILENAME); exit} ok {print; exit}' $$d \
>   			| $(SED) \
>   				-e 's/^\.Nm //' -e 's/,/ /g' -e 's/\\-.*//' \
> +				-e 's/^so \([_a-zA-Z]*\)\.[0-9]/\1/g' \
>   				-e 's/\\\f[0-9]//g' -e 's/  / /g;q'`; \
>   		do \
>   			[ -z "$$m" -o "$$m" = "\\" ] && continue; \
>
diff mbox series

Patch

diff --git a/include/buildmacros b/include/buildmacros
index f8d54200382a..6f34d7c528fa 100644
--- a/include/buildmacros
+++ b/include/buildmacros
@@ -95,9 +95,10 @@  INSTALL_MAN = \
 	@for d in $(MAN_PAGES); do \
 		first=true; \
 		for m in `$(AWK) \
-			'/^\.S[h|H] NAME/ {ok=1; next} ok {print; exit}' $$d \
+			'/^\.S[h|H] NAME/ {ok=1; next} /^\.so/ {printf("so %s\n", FILENAME); exit} ok {print; exit}' $$d \
 			| $(SED) \
 				-e 's/^\.Nm //' -e 's/,/ /g' -e 's/\\-.*//' \
+				-e 's/^so \([_a-zA-Z]*\)\.[0-9]/\1/g' \
 				-e 's/\\\f[0-9]//g' -e 's/  / /g;q'`; \
 		do \
 			[ -z "$$m" -o "$$m" = "\\" ] && continue; \