GNU bug report logs - #49317
dist: depends on $(BUILT_SOURCES), but has no reason to

Previous Next

Package: automake;

Reported by: Allison Karlitskaya <allison.karlitskaya <at> redhat.com>

Date: Thu, 1 Jul 2021 14:42:01 UTC

Severity: normal

Done: Karl Berry <karl <at> freefriends.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 49317 in the body.
You can then email your comments to 49317 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-automake <at> gnu.org:
bug#49317; Package automake. (Thu, 01 Jul 2021 14:42:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Allison Karlitskaya <allison.karlitskaya <at> redhat.com>:
New bug report received and forwarded. Copy sent to bug-automake <at> gnu.org. (Thu, 01 Jul 2021 14:42:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Allison Karlitskaya <allison.karlitskaya <at> redhat.com>
To: bug-automake <at> gnu.org
Subject: dist: depends on $(BUILT_SOURCES), but has no reason to
Date: Thu, 1 Jul 2021 13:52:44 +0200
BUILT_SOURCES solves a useful problem and we use it in our package for
a few things.  Its stated purpose (from the docs) is all about
compilation and dependency tracking.  It makes sense that
$(BUILT_SOURCES) should then be built as a prerequisite before any
targets that result in compilation: all, check, install-exec, ...

`make dist` doesn't compile the program, though: it distributes the
sources.  And usually generated files are not distributed.  If they
were to be disted, they could be listed explicitly for being disted
(for example in a _SOURCES variable or so).  We go out of the way to
put our compiled sources in nodist_ variables, and indeed, they're not
disted.

But because of the above dependency `make dist` still builds them (and
then ignores them).

Of course, there might be a edgecase where the disted tarball should
contain content that is output by a C program which needs to be
compiled and contains, itself, some generated sources.  Indeed, this
change was introduced in 2017, in this commit:

commit ac47c22e3c0c8b055cdd47ccd18621c56f807b37
Author:     Jim Meyering <meyering <at> fb.com>
AuthorDate: Thu Mar 20 12:31:32 2014 -0700
Commit:     Jim Meyering <meyering <at> fb.com>
CommitDate: Tue Nov 28 19:05:59 2017 -0800

    "make dist" did not depend on $(BUILT_SOURCES)

in response to this report:

    https://lists.gnu.org/r/bug-hello/2014-03/msg00016.html

GNU Hello builds its manpage (which it dists) by building and running
the binary and capturing its --help output.

A blanket depend on $(BUILT_SOURCES) for all automake-using projects
seems to be much too large of a hammer to solve that specific problem.

Thanks very much,

Allison Karlitskaya





Information forwarded to bug-automake <at> gnu.org:
bug#49317; Package automake. (Thu, 01 Jul 2021 22:16:02 GMT) Full text and rfc822 format available.

Message #8 received at 49317 <at> debbugs.gnu.org (full text, mbox):

From: Karl Berry <karl <at> freefriends.org>
To: allison.karlitskaya <at> redhat.com
Cc: 49317 <at> debbugs.gnu.org
Subject: Re: bug#49317: dist: depends on $(BUILT_SOURCES), but has no reason to
Date: Thu, 1 Jul 2021 16:15:16 -0600
    GNU Hello builds its manpage (which it dists) by building and running
    the binary and capturing its --help output.

This is quite common (among GNU packages anyway). So it is not
surprising Jim (hi Jim) committed a general solution.

    A blanket depend on $(BUILT_SOURCES) for all automake-using projects
    seems to be much too large of a hammer to solve that specific problem.

I tend to agree, but at this point I would not want to create an
incompatibility by undoing it. Instead, I guess a new option (for
AUTOMAKE_OPTIONS) would be needed. A patch would be welcome.

Jim, maybe you have other/more ideas ... --thanks, karl.





Information forwarded to bug-automake <at> gnu.org:
bug#49317; Package automake. (Fri, 02 Jul 2021 14:33:01 GMT) Full text and rfc822 format available.

Message #11 received at 49317 <at> debbugs.gnu.org (full text, mbox):

From: Allison Karlitskaya <allison.karlitskaya <at> redhat.com>
To: Karl Berry <karl <at> freefriends.org>
Cc: 49317 <at> debbugs.gnu.org
Subject: Re: bug#49317: dist: depends on $(BUILT_SOURCES), but has no reason to
Date: Fri, 2 Jul 2021 14:56:19 +0200
[Message part 1 (text/plain, inline)]
[PATCH] dist: add new "pure-dist" automake option

Since v1.15.1-204-gac47c22e3, "make dist" has been depending on
$(BUILT_SOURCES) to avoid problems when building some GNU packages which
need to compile themselves as part of building their tarballs (for
example, to generate manpage content from --help output).  This default
behaviour might be "too much" for other projects, though, so add a new
option "pure-dist" to disable it.

* NEWS:
* bin/automake.in:
* doc/automake.texi: Add a new option "pure-dist" to disable the
dependency of distdir: on $(BUILT_SOURCES).
* t/pure-dist.sh:
* t/impure-dist.sh: Add a pair of tests for a similar scenario with and
  without the option.

Fixes automake bug https://debbugs.gnu.org/49317
---
 NEWS                    |  3 ++
 bin/automake.in         |  3 +-
 doc/automake.texi       |  7 +++++
 lib/Automake/Options.pm |  1 +
 lib/am/distdir.am       |  5 ++++
 t/impure-dist.sh        |  1 +
 t/pure-dist.sh          | 66 +++++++++++++++++++++++++++++++++++++++++
 7 files changed, 85 insertions(+), 1 deletion(-)
 create mode 120000 t/impure-dist.sh
 create mode 100644 t/pure-dist.sh
[0001-dist-add-new-pure-dist-automake-option.patch (text/x-patch, attachment)]

Information forwarded to bug-automake <at> gnu.org:
bug#49317; Package automake. (Fri, 16 Jul 2021 01:38:01 GMT) Full text and rfc822 format available.

Message #14 received at 49317 <at> debbugs.gnu.org (full text, mbox):

From: Karl Berry <karl <at> freefriends.org>
To: allison.karlitskaya <at> redhat.com
Cc: 49317 <at> debbugs.gnu.org
Subject: Re: bug#49317: dist: depends on $(BUILT_SOURCES), but has no reason to
Date: Thu, 15 Jul 2021 19:37:25 -0600
Hi Allison - Jim finished pushing your patch a day or two
ago. Complications in testing. Thanks for the contribution! --karl





Reply sent to Karl Berry <karl <at> freefriends.org>:
You have taken responsibility. (Fri, 16 Jul 2021 01:38:02 GMT) Full text and rfc822 format available.

Notification sent to Allison Karlitskaya <allison.karlitskaya <at> redhat.com>:
bug acknowledged by developer. (Fri, 16 Jul 2021 01:38:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 13 Aug 2021 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 250 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.