Oops! Thanks for explanation — I didn’t wrap my head around in _that_
direction :-(


Sent from mobile

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

> Hi Andrew,
>
> Thanks for your feedback. I thought that I had made myself clear, but
> let me be more explicit.
>
> My use case/the purpose of this is to allow specially configured CI
> systems and able user machines to generate and then test the tarballs,
> while not preventing end users from being able to compile the software
> and run `make dist`. I don't want to patch the configure script either
> on the CI or on the user machines. There's, of course, more use cases.
>
> More visually:
>
> - End user machine/distro maintainer's image has no lzip => dist-lzip
> does nothing, they probably didn't need it in the first place, so they
> don't have to add a patch to configure.ac to remove that and regenerate
> the configure scripts/makefiles.
> - End user machine/distro maintainer's image has lzip => a lzip archive
> is built, whatever the user does with it is up to them.
> - My machine/my CI always has them, in order to allow multiple codec
> choices, so the archives are always tested anyway.
>
> --
> With Valediction,
> Kamila Szewczyk (https://iczelia.net)
>
> On 5/14/26 9:25 PM, Andrew W. Nosenko wrote:
> > 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]
> > saarland.de <mailto:[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 <http://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 <http://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 <http://local.mk>               |   1 +
> >      m4/optional.m4            | 161 ++++++++++++++++++++++++++++++++++++
> >      t/am-optional-automake.sh | 169
> ++++++++++++++++++++++++++++++++++++++
> >      t/list-of-tests.mk <http://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 <https://iczelia.net>)
> >
>
>

Reply via email to