But how/why maintainer will even enable that without ability to test
resulting tarballs? And if maintainer is able to create and test them, then
they may be non-operational with the same result.

In other words: I don’t see viable use-case for case of responsible
maintainers (and irresponsible ones should never reach such status).


Sent from mobile

On Thu, 14 May 2026 at 22:17, Kamila Szewczyk <[email protected]>
wrote:

> Some projects want to offer a recently-added archive format (such as
> dist-bzip3, which entered Automake in 1.18 - bug#73795, or dist-lzip)
> while remaining portable to systems whose installed Automake predates
> the option, or whose maintainer host lacks the matching compressor or
> archiver.  Listing dist-bzip3 or dist-lzip in AM_INIT_AUTOMAKE on such a
> system either fails at automake-time because the option is not
> recognized, or at make-dist-time because the tool is not on PATH.
>
> The new AM_OPTIONAL_AUTOMAKE macro covers exactly this case.  It
> sidesteps the default machinery offering more fault tolerance: at
> configure time it AC_CHECK_PROGs each requested tool; at config.status
> time it appends a guarded 'am--optional-dist-TOOL' rule to the generated
> top-level Makefile and pushes that rule onto DIST_TARGETS.  The recipe
> re-probes the tool with 'command -v' before running it, deletes any
> partial output on failure, and always exits 0 so the rest of 'make dist'
> is never disturbed. Unknown OPTIONS entries trigger an m4_warn(syntax)
> at autoreconf time and are otherwise ignored.
>
> The macro relies only on Automake's 'distdir' target and on
> $(am__tar), both present since Automake 1.10, so it works with any
> reasonably recent automake; there is no need to teach automake
> itself about the option.
>
> It is concieveable that this will be used in future for more than just
> codecs to make the adoption process of new features seamless in light of
> Automake's long release cycle and mild unhappiness of distro maintainers
> to ship new versions.
>
> * m4/optional.m4: New file.  Define AM_OPTIONAL_AUTOMAKE and its
> internal helpers _AM_OPTIONAL_AUTOMAKE_ONE, _AM_OPTIONAL_TAR, and
> _AM_OPTIONAL_ZIP.
> * m4/local.mk (dist_automake_ac_DATA): Distribute optional.m4.
> * t/am-optional-automake.sh: New test exercising the four
> documented scenarios (tool present; unknown option; tool absent at
> configure; tool present at configure but absent at 'make dist').
> * t/list-of-tests.mk (handwritten_TESTS): Add it.
> * doc/automake.texi (Public Macros): Document AM_OPTIONAL_AUTOMAKE.
> (The 'dist' rules): Cross-reference it from the dist-bzip3,
> dist-lzip, and dist-zstd descriptions.
> * NEWS: Mention the new macro under 1.18.2, not released yet.
> ---
>  NEWS                      |  14 ++++
>  doc/automake.texi         |  75 ++++++++++++++++-
>  m4/local.mk               |   1 +
>  m4/optional.m4            | 161 ++++++++++++++++++++++++++++++++++++
>  t/am-optional-automake.sh | 169 ++++++++++++++++++++++++++++++++++++++
>  t/list-of-tests.mk        |   1 +
>  6 files changed, 418 insertions(+), 3 deletions(-)
>  create mode 100644 m4/optional.m4
>  create mode 100644 t/am-optional-automake.sh
>
> --
> With Valediction,
> Kamila Szewczyk (https://iczelia.net)
>

Reply via email to