Subject: bug#7819: closed (Re: bug#7819: automake does not really automatically distribute all the files it's advertised to.)

From: [email-masked] (GNU bug Tracking System)
Date: Thu, 23 Jun 2011 09:03:02 +0000

Your bug report

#7819: automake does not really automatically distribute all the files it's advertised to.

which was filed against the automake package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
7819: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=7819
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#7819: automake does not really automatically distribute all the files it's advertised to.
From: Stefano Lattarini <[email-masked]>
To: [email-masked]
Cc: Ralf Wildenhues <[email-masked]>, [email-masked]
Date: Thu, 23 Jun 2011 11:02:29 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

References:
  <http://lists.gnu.org/archive/html/automake-patches/2011-01/msg00181.html>
  <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=7819>

On Saturday 15 January 2011, Stefano Lattarini wrote:
> 
> On Monday 10 January 2011, Ralf Wildenhues wrote:
> > Hi Stefano,
> > 
> > * Stefano Lattarini wrote on Mon, Jan 10, 2011 at 08:50:13PM CET:
> > >   Files which are automatically distributed, if found:
> > >     ABOUT-GNU           README              config.rpath        ltcf-gcj.sh
> > >     ABOUT-NLS           THANKS              config.sub          ltconfig
> > >     AUTHORS             TODO                configure           ltmain.sh
> > >     BACKLOG             acconfig.h          configure.ac        mdate-sh
> > [...]
> > >   ...
> > > 
> > > But the above is not always correct, as some of these files are distributed
> > > *only* if other conditions are met.  For example, acconfig.h and aclocal.m4
> > > are distributed only if they really exists at automake runtime (having them
> > > as targets in Makefile.am won't work), config.h.bot and config.h.top are
> > > distributed only if the AC_CONFIG_HEADERS macro is used, and stamp-vti is
> > > distributed only if info_TEXINFOS and version.texi are used.
> > > 
> > > So, either the automake script or the automake help screen should be
> > > adjusted.
> > > 
> > > IMHO the current behaviour of automake is good enough, so I think we
> > > should adjust the automake help screen to read something like:
> > 
> > Agreed.  With many of the names, I have been wondering though whether we
> > should distribute them at all in arbitrary directories.  For example,
> > most scripts don't make that much sense outside of the toplevel or the
> > build-aux directories.
> > 
> > Then again, changing the current behavior here is quite likely to break
> > some existing package setups, and even silently and only upon 'make
> > dist' (so it might never show up for the developer), so that I'm not
> > inclined to change this lightly.
> > 
> > Documenting the existing behavior better sounds like a good idea to me.
> > 
> > Thanks for the report,
> > Ralf
> >
> 
> The attached two-patch series should fix the bug, by making it clear
> in the documentation and in the help screen that certain files are
> automatically distributed only under certain conditions or in certain
> situations (without fully specifying which conditions or situations,
> as that would be too detailed IMHO and make suboptimal behaviour
> more difficult to be changed in future).
> 
> OK for maint?
> 
> Regards,
>    Stefano
> 
> -*-*-
> 
> refactor: split 'usage' subroutine in automake
> 
> This change is related to automake bug#7819.
> 
> * automake.in (print_autodist_files): New subroutine,
> extracted from ...
> (usage): ... this, which now uses it.
> * tests/autodist-no-duplicate.test: New test.
> * tests/Makefile.am (TESTS): Update.
> ---
>  ChangeLog                        |   10 ++++
>  automake.in                      |   89 +++++++++++++++++++-------------------
>  tests/Makefile.am                |    1 +
>  tests/Makefile.in                |    1 +
>  tests/autodist-no-duplicate.test |   40 +++++++++++++++++
>  5 files changed, 97 insertions(+), 44 deletions(-)
>  create mode 100755 tests/autodist-no-duplicate.test
> 
> -*-*-
> 
> help: improve text about automatically-distributed files
> 
> This change fixes automake bug#7819.
> 
> * automake.in (usage): Distinguish between files that are always
> automatically distributed when found, and those which are only
> "under certain conditions".
> * doc/automake.texi (Basics of Distribution): Update accordingly.
> * tests/autodist-subdir.test: Update.
> * tests/autodist-no-duplicate.test: Likewise.
> * tests/autodist.test: Likewise.
> (configure.in): Remove useless call to AM_MAINTAINER_MODE.
> ---
>  ChangeLog                        |   11 +++++++++++
>  automake.in                      |    8 ++++++--
>  doc/automake.texi                |    4 +++-
>  tests/autodist-no-duplicate.test |   32 +++++++++++++++++++++-----------
>  tests/autodist-subdir.test       |   27 +--------------------------
>  tests/autodist.test              |   29 +----------------------------
>  6 files changed, 43 insertions(+), 68 deletions(-)
> 
>
I've pushed these patches to maint now (after rebasing), and merged
to master.

Regards,
  Stefano

Subject: automake does not really automatically distribute all the files it's advertised to.
From: Stefano Lattarini <[email-masked]>
To: [email-masked]
Date: Mon, 10 Jan 2011 20:50:13 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

Hello automakers.

From the automake manual, section 14.1 "Basics of Distribution":

 ``Automake also has a built-in list of commonly used files that are
   automatically included if they are found in the current directory
   (either physically, or as the target of a Makefile.am rule). This
   list is printed by "automake --help". ''

And here is the current list of files automake should distribute
automatically:

  $ automake --help
  Usage: /usr/bin/automake [OPTION] ... [Makefile]...
  ...
  Files which are automatically distributed, if found:
    ABOUT-GNU           README              config.rpath        ltcf-gcj.sh
    ABOUT-NLS           THANKS              config.sub          ltconfig
    AUTHORS             TODO                configure           ltmain.sh
    BACKLOG             acconfig.h          configure.ac        mdate-sh
    COPYING             aclocal.m4          configure.in        missing
    COPYING.DOC         ansi2knr.1          depcomp             mkinstalldirs
    COPYING.LESSER      ansi2knr.c          elisp-comp          py-compile
    COPYING.LIB         compile             install-sh          stamp-vti
    ChangeLog           config.guess        libversion.in       texinfo.tex
    INSTALL             config.h.bot        ltcf-c.sh           ylwrap
    NEWS                config.h.top        ltcf-cxx.sh
  ...

But the above is not always correct, as some of these files are distributed
*only* if other conditions are met.  For example, acconfig.h and aclocal.m4
are distributed only if they really exists at automake runtime (having them
as targets in Makefile.am won't work), config.h.bot and config.h.top are
distributed only if the AC_CONFIG_HEADERS macro is used, and stamp-vti is
distributed only if info_TEXINFOS and version.texi are used.

So, either the automake script or the automake help screen should be
adjusted.

IMHO the current behaviour of automake is good enough, so I think we
should adjust the automake help screen to read something like:

   Files automatically distributed if found:
     ...

   Files automatically distributed if found (under certain conditions):
     ...

I will attempt a patch soonish (I already have half-cooked testcases,
and the relevant code in automake.in seems quite clear); but as usual,
having the issue registered in the bug tracker "JFTR" won't hurt.

Regards,
  Stefano