From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gnu.wildebeest.org (wildebeest.demon.nl [212.238.236.112]) by sourceware.org (Postfix) with ESMTPS id D5E5E3958C3C for ; Thu, 29 Apr 2021 16:27:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org D5E5E3958C3C Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=klomp.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mark@klomp.org Received: from tarox.wildebeest.org (tarox.wildebeest.org [172.31.17.39]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by gnu.wildebeest.org (Postfix) with ESMTPSA id 177683075E92; Thu, 29 Apr 2021 18:27:29 +0200 (CEST) Received: by tarox.wildebeest.org (Postfix, from userid 1000) id CFF26413CB92; Thu, 29 Apr 2021 18:27:28 +0200 (CEST) From: Mark Wielaard To: debugedit@sourceware.org Cc: Mark Wielaard Subject: [PATCH] debugedit: Add manual using help2man Date: Thu, 29 Apr 2021 18:27:22 +0200 Message-Id: <20210429162722.21085-1-mark@klomp.org> X-Mailer: git-send-email 2.18.4 X-Spam-Status: No, score=-11.0 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: debugedit@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: debugedit development mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Apr 2021 16:27:34 -0000 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. * .gitignore: Add debugedit.1 * configure.ac: Add AM_MISSING_PROG for help2man. * Makefile.am (dist_man_MANS): Add debugedit.1 (debugedit.1): New rules. * tools/debugedit (helpText): Add FILE argument. Signed-off-by: Mark Wielaard --- .gitignore | 1 + Makefile.am | 9 +++++++++ configure.ac | 1 + tools/debugedit.c | 2 +- 4 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 7225070..55d4bfc 100644 --- a/.gitignore +++ b/.gitignore @@ -27,6 +27,7 @@ missing .dirstamp debugedit +debugedit.1 sepdebugcrcfix atconfig 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) + noinst_HEADERS= tools/ansidecl.h \ tools/hashtab.h \ tools/md5.h \ diff --git a/configure.ac b/configure.ac index c5adadf..e7a7989 100644 --- a/configure.ac +++ b/configure.ac @@ -43,6 +43,7 @@ AC_PROG_AWK AC_PROG_CC_C99 AC_PROG_LN_S AC_CHECK_TOOL([LD], [ld]) +AM_MISSING_PROG(HELP2MAN, help2man) # Only really an issue on 32bit platforms. Makes sure we'll get large off_t. AC_SYS_LARGEFILE diff --git a/tools/debugedit.c b/tools/debugedit.c index f84c7ef..c6975b2 100644 --- a/tools/debugedit.c +++ b/tools/debugedit.c @@ -3034,7 +3034,7 @@ static struct option optionsTable[] = static const char *optionsChars = "b:d:l:is:nV?"; static const char *helpText = - "Usage: %s [OPTION...]\n" + "Usage: %s [OPTION...] FILE\n" " -b, --base-dir=STRING base build directory of objects\n" " -d, --dest-dir=STRING directory to rewrite base-dir into\n" " -l, --list-file=STRING file where to put list of source and \n" -- 2.18.4