public inbox for
 help / color / mirror / Atom feed
From: Mark Wielaard <>
Cc: Mark Wielaard <>
Subject: [COMMITTED] automake: Add std-options to check --version and --help work as intended.
Date: Wed,  5 May 2021 21:32:33 +0200	[thread overview]
Message-ID: <> (raw)

Now that we rely on --version and --help to generate documentation make
sure that make distcheck checks those standard options work correctly.
Also adjust[.1] rules slightly to make sure they the
scripts are also checked (bin_SCRIPTS are, but dist_bin_SCRIPTS aren't).

	* (AM_INIT_AUTOMAKE): Add std-options.
	* (dist_bin_SCRIPTS): Change into...
	(bin_SCRIPTS): ... this, using top_srcdir.
	(TOP_CONFIGURE_AC): New variable, with comment explaining when
	.1 man pages are (re)generated.
	(debugedit.1): Use TOP_CONFIGURE_AC as dependency.
	(sepdebugcrcfix.1): Likewise.
	( Likewise and depend on top_srcdir script.

Signed-off-by: Mark Wielaard <>
---  | 12 ++++++++---- |  2 +-
 2 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/ b/
index b26d238..5bf003b 100644
--- a/
+++ b/
@@ -25,7 +25,7 @@ AM_CFLAGS = -Wall
 bin_PROGRAMS = debugedit sepdebugcrcfix
 # Install in $(bindir) and distribute it.
-dist_bin_SCRIPTS = scripts/
+bin_SCRIPTS = $(top_srcdir)/scripts/
 debugedit_SOURCES = tools/debugedit.c \
 		    tools/hashtab.c \
@@ -41,19 +41,23 @@ sepdebugcrcfix_LDADD = @LIBELF_LIBS@
 # Manual pages are generated for dist
 dist_man_MANS = debugedit.1 sepdebugcrcfix.1
-debugedit.1: tools/debugedit.c $(top_srcdir)/
+# Common dependency for man pages. Man pages are only regenerated when
+# their main source is newer, or (version) is updated.
+TOP_CONFIGURE_AC = $(top_srcdir)/
+debugedit.1: tools/debugedit.c $(TOP_CONFIGURE_AC)
 	$(MAKE) $(AM_MAKEFLAGS) debugedit$(EXEEXT)
 	$(HELP2MAN) -N --output=$@ \
 	  --name='debug source path manipulation tool' \
-sepdebugcrcfix.1: tools/sepdebugcrcfix.c $(top_srcdir)/
+sepdebugcrcfix.1: tools/sepdebugcrcfix.c $(TOP_CONFIGURE_AC)
 	$(MAKE) $(AM_MAKEFLAGS) sepdebugcrcfix$(EXEEXT)
 	$(HELP2MAN) -N --output=$@ \
 	  --name='fixes CRC for separate .debug files' \
 	  ./sepdebugcrcfix$(EXEEXT) scripts/ $(top_srcdir)/ $(top_srcdir)/scripts/ $(TOP_CONFIGURE_AC)
 	$(HELP2MAN) -N --output=$@ \
 	  --name='finds debuginfo and processes it' \
diff --git a/ b/
index e7a7989..9e8b0ec 100644
--- a/
+++ b/
@@ -23,7 +23,7 @@ AC_CONFIG_HEADERS([config.h])
 # We are using foreign, not gnu, because we don't provide some
 # "standard" files like ChangeLog, AUTHORS, INSTALL, etc.
-AM_INIT_AUTOMAKE([foreign silent-rules subdir-objects
+AM_INIT_AUTOMAKE([foreign silent-rules subdir-objects std-options
                   no-dist-gzip dist-xz tar-pax
                   -Wall -Wno-portability])

             reply	other threads:[~2021-05-05 19:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-05 19:32 Mark Wielaard [this message]
2021-05-05 20:05 ` Mark Wielaard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).