Bug with ax_code_coverage.m4: warning about AM_DISTCHECK_CONFIGURE_FLAGS
Sébastien Wilmet <[email protected]> Sat, 19 Feb 2022 12:20:09 +0100
| Newsgroups | gmane.comp.sysutils.autoconf.archive-maintainers |
|---|---|
| Message-ID | <2759f65f8b4e220a3004dbe3ab49fbf8bfd01b1b.camel@informatique-libre.be> |
Hi,
When using ax_code_coverage.m4 (latest version), I have the following
warning:
-----
Makefile.am:7: warning: AM_DISTCHECK_CONFIGURE_FLAGS was already
defined in condition CODE_COVERAGE_ENABLED, which is included in
condition TRUE ...
aminclude_static.am:100: ... 'AM_DISTCHECK_CONFIGURE_FLAGS' previously
defined here
Makefile.am:3: 'aminclude_static.am' included from here
-----
The workaround that I use is to comment/remove the following line from
ax_code_coverage.m4:
A][M_DISTCHECK_CONFIGURE_FLAGS := \$(A][M_DISTCHECK_CONFIGURE_FLAGS) --disable-code-coverage
So, what the *.m4 file is trying to do, is (I suppose), to add
--disable-code-coverage to AM_DISTCHECK_CONFIGURE_FLAGS inside these
conditions:
-----
if CODE_COVERAGE_ENABLED
ifeq (\$(abs_builddir), \$(abs_top_builddir))
-----
So I manually add --disable-code-coverage in
AM_DISTCHECK_CONFIGURE_FLAGS in the top-level Makefile.am, here is a
simplified version:
-----
# A list of subdirs:
SUBDIRS = [...]
include $(top_srcdir)/aminclude_static.am
clean-local: code-coverage-clean
distclean-local: code-coverage-dist-clean
# Here the real Makefile.am contains other flags.
AM_DISTCHECK_CONFIGURE_FLAGS = --disable-code-coverage
-----
Many thanks for your work in autoconf-archive, by the way.
Best regards,
Sébastien