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 212CF3857C60 for ; Wed, 5 May 2021 19:32:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 212CF3857C60 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 44149302BBED; Wed, 5 May 2021 21:32:35 +0200 (CEST) Received: by tarox.wildebeest.org (Postfix, from userid 1000) id EF277413CD48; Wed, 5 May 2021 21:32:34 +0200 (CEST) From: Mark Wielaard To: debugedit@sourceware.org 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 Message-Id: <20210505193233.20312-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: Wed, 05 May 2021 19:32:44 -0000 Now that we rely on --version and --help to generate documentation make sure that make distcheck checks those standard options work correctly. Also adjust find-debuginfo.sh[.1] rules slightly to make sure they the scripts are also checked (bin_SCRIPTS are, but dist_bin_SCRIPTS aren't). * configure.ac (AM_INIT_AUTOMAKE): Add std-options. * Makefile.am (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. (find-debuginfo.sh.1): Likewise and depend on top_srcdir script. Signed-off-by: Mark Wielaard --- Makefile.am | 12 ++++++++---- configure.ac | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/Makefile.am b/Makefile.am index b26d238..5bf003b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -25,7 +25,7 @@ AM_CFLAGS = -Wall bin_PROGRAMS = debugedit sepdebugcrcfix # Install find-debuginfo.sh in $(bindir) and distribute it. -dist_bin_SCRIPTS = scripts/find-debuginfo.sh +bin_SCRIPTS = $(top_srcdir)/scripts/find-debuginfo.sh 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 find-debuginfo.sh.1 -debugedit.1: tools/debugedit.c $(top_srcdir)/configure.ac +# Common dependency for man pages. Man pages are only regenerated when +# their main source is newer, or configure.ac (version) is updated. +TOP_CONFIGURE_AC = $(top_srcdir)/configure.ac + +debugedit.1: tools/debugedit.c $(TOP_CONFIGURE_AC) $(MAKE) $(AM_MAKEFLAGS) debugedit$(EXEEXT) $(HELP2MAN) -N --output=$@ \ --name='debug source path manipulation tool' \ ./debugedit$(EXEEXT) -sepdebugcrcfix.1: tools/sepdebugcrcfix.c $(top_srcdir)/configure.ac +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) -find-debuginfo.sh.1: scripts/find-debuginfo.sh $(top_srcdir)/configure.ac +find-debuginfo.sh.1: $(top_srcdir)/scripts/find-debuginfo.sh $(TOP_CONFIGURE_AC) $(HELP2MAN) -N --output=$@ \ --name='finds debuginfo and processes it' \ $(top_srcdir)/scripts/find-debuginfo.sh diff --git a/configure.ac b/configure.ac index e7a7989..9e8b0ec 100644 --- a/configure.ac +++ b/configure.ac @@ -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]) -- 2.18.4