dist target differences between cmake and autotools

Rob Gowin robg at gowin.net
Wed Jul 12 10:37:34 EDT 2017


On Wed, Jul 12, 2017 at 7:27 AM, Geert Janssens <geert.gnucash at kobaltwit.be>
wrote:

> On zondag 9 juli 2017 22:56:57 CEST John Ralls wrote:
> > > On Jul 9, 2017, at 1:17 PM, Geert Janssens <geert.gnucash at kobaltwit.be
> >
> > > wrote:
> > >
> > > Hi,
> > >
> > > I have tested the dist target in both cmake and autotools. I couldn't
> test
> > > the autotools dist generated by cmake because my autotools is too
> recent.
> > > So I have one tarball purely cmake and one tarball purely autotools.
> > >
> > > There are a few missed files that should be fixed on both sides I
> believe.
> > > Those are easy to fix by comparing a diff of the tarball content lists.
> > >
> > > The more interesting issue is though that the autotools based dist
> tarball
> > > doesn't contain a single CMakeLists.txt or the related cmake support
> > > files.
> > > And the other way around the cmake tarball doesn't contain the
> Makefile.in
> > > files (it does include Makefile.am) and the typical autotools related
> > > support files.
> > >
> > > Perhaps the latter is because of the autotools-too-recent issue I
> > > mentioned at the start.
> > >
> > > I wonder though what our eventual goal is: should the dist tarball
> support
> > > both cmake and autotools ?
> > >
> > > Or put differently should the tarballs being output by the different
> > > toolchains be identical and interchangeable ?
> > >
> > > Or is it time to make a definitive choice of build system ?
> > >
> > > I worry that if both toolchains generate dist tarballs that are not the
> > > same we will get mixups at some point and confusion as a result.
> > >
> > > Regards,
> > >
> > > Geert
> > >
> > > P.S. I have attached the contents of the two tarballs I have created
> with
> > > today's master for comparison.<cmake.lst><autotools.lst>
> >
> > I don't think it's because your autotools are "too recent", I think it's
> > because there are some problems with running the autotools part of cmake
> > distcheck on master. That step is required for creating the
> Makefile.in-s.
> >
> This has me confused.
>
> Shouldn't distcheck start with running "dist" to generate the tarball
> which is then unpacked and
> used as source for a "check" run ?
>
> If so and assuming we agree on supporting two build systems, I would
> conclude the dist step in
> a cmake environment should already include the Makefile.in files in the
> tarball, because those
> are also included when running make dist via autotools. There are a few
> other files generated
> during autogen.sh that are also shipped in the autotools generated dist
> tarball. To keep the
> discussion focussed I'm not going to mention all of them, but obviously
> they should get the
> same treatment.
>
> When I run dist after configuring my environment using cmake with default
> options and the
> ninja build system I get this error:
> $ ninja-build dist
>
> The only way for me to have a cmake/ninja based environment generate a
> dist tarball is to
> configure using cmake -DAUTOTOOLS_IN_DIST=OFF
>
> So that's why I said "my automake is too recent" and I can't get a dist
> tarball including the
> autotools related generated files.
>
> Am I missing something here ?
>
> Geert
> _______________________________________________
> gnucash-devel mailing list
> gnucash-devel at gnucash.org
> https://lists.gnucash.org/mailman/listinfo/gnucash-devel
>

Hi Geert,

For any version of automake except 1.15, the CMake 'dist' target will run
autogen.sh to create the various Makefile.in-s and include them in the dist
tarball. Independent of anything CMake related, autotools distcheck will
fail on systems using automake-1.15 (including Fedora 25) because in that
version the distcheck working directory has been changed  ([1], near
bottom) such that the missing files check in 'po' gets confused and fails.

In my original CMake distcheck commit, I had the autotools part do
'distcheck'.  I put in checks to prevent running the autotools distcheck if
automake-1.15 was detected. John mentioned in IRC that I did not need to
run distcheck, so I removed it in the second commit in the PR. I should
have then removed the automake version check at that point since it is no
longer need. I'll do that soon.

Regards,

Rob

[1] https://autotools.io/forwardporting/automake.html


More information about the gnucash-devel mailing list