[PATCH] debugedit: Add manual using help2man
Dmitry V. Levin
ldv@altlinux.org
Thu Apr 29 16:36:25 GMT 2021
On Thu, Apr 29, 2021 at 06:27:22PM +0200, Mark Wielaard wrote:
> This generates a debugedit.1 man page using help2man based on the
> debugedit --help output. The generated file is included in the dist
> so help2man isn't normally needed to build debugedit.
[...]
> diff --git a/Makefile.am b/Makefile.am
> index bd28eba..5042785 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -38,6 +38,15 @@ sepdebugcrcfix_SOURCES = tools/sepdebugcrcfix.c
> sepdebugcrcfix_CFLAGS = @LIBELF_CFLAGS@ $(AM_CFLAGS)
> sepdebugcrcfix_LDADD = @LIBELF_LIBS@
>
> +# Manual pages are generated for dist
> +dist_man_MANS = debugedit.1
> +
> +debugedit.1: tools/debugedit.c $(top_srcdir)/configure.ac
> + $(MAKE) $(AM_MAKEFLAGS) debugedit$(EXEEXT)
> + $(HELP2MAN) -N --output=$@ \
> + --name='debug source path manipulation tool' \
> + ./debugedit$(EXEEXT)
The usual way of generating debugedit.1 would be to make it depend on
debugedit$(EXEEXT) instead. Is this written to avoid any attempts to
regenerate debugedit.1 at build time?
--
ldv
More information about the Debugedit
mailing list