[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] "make dist" did not depend on $(BUILT_SOURCES)

From: Nick Bowler
Subject: Re: [PATCH] "make dist" did not depend on $(BUILT_SOURCES)
Date: Tue, 28 Nov 2017 23:35:37 -0500
User-agent: NeoMutt/20171027

On 2017-11-28 18:13 -0800, Jim Meyering wrote:
> On Tue, Nov 28, 2017 at 12:45 PM, Nick Bowler <address@hidden> wrote:
> > The Automake manual unequivocally states that BUILT_SOURCES files are
> > generated only when running 'make all', 'make check' or 'make install'.
> >
> > So if they are going to be generated on 'make dist' as well, then the
> > manual needs a corresponding update.
> Hi Nick,
> Thanks for the suggestion, but I do not think it is desired. "make
> dist" is already defined as building everything that goes into the
> distribution tarball, and that implies it must also build anything
> (e.g., from BUILT_SOURCES) that happens to be required to do that.

I agree that it *should* but not that it *must*, because BUILT_SOURCES
explicitly (by design) bypasses the usual prerequisite mechanisms.

If you use normal prerequisites instead of BUILT_SOURCS everything
works just fine wrt. distribution, of course, and is the approach I
would personally recommend in all cases.

> Perhaps more importantly, this is an implementation detail that feels
> like it should not be made part of the contract that the documentation
> provides ...

But now with the change applied, as it stands the documentation is
simply wrong.  For example, this passage from the manual (§9.4 Built

  "... BUILT_SOURCES is honored only by ‘make all’, ‘make check’ and
  ‘make install’."

is no longer true.  This error can be corrected without explicitly
documenting the new behaviour, for example by making the list of
targets non-exhaustive in nature.

Perhaps something like:

  ... BUILT_SOURCES is honored only by certain targets, including ‘make
  all’, ‘make check’ and ‘make install’.

Although not mentioning distribution at all means that someone reading
this section is left to figure out for themselves if and how these two
Automake features work together...

> ... in case some day automake tightens up "make dist" so it builds
> only those BUILT_SOURCES files that are actually required to build
> the tarball components.

There is need to worry about this ever happening, because computing
such a subset of BUILT_SOURCES is impossible in general.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]