automake
[Top][All Lists]
Advanced

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

Re: nodist_noinst_SCRIPTS and `make distcheck`


From: Nick Bowler
Subject: Re: nodist_noinst_SCRIPTS and `make distcheck`
Date: Mon, 20 Oct 2014 12:34:39 -0400
User-agent: Mutt/1.5.22 (2013-10-16)

On 2014-10-20 17:51 +0300, fr33domlover wrote:
> I have a script in my project, which creates the ChangeLog from the git log
> (it's the script from gnulib). Since the script is meant only for `make dist`,
> it's neither distributed nor installed. I didn't put it in any variable, not
> even nodist_noinst_SCRIPTS. Everything seemed to work, including `make dist`.

> Now I tried `make distcheck` for the first time. It fails because it cannot
> find the script. When it copies the srcdir content into a new temporary place,
> it simply "forgets" to take the script, maybe because there are no targets for
> it at all.
[snip details].

There are two related things that distcheck is testing here, and either
one of them may be tripping you up.

First, distcheck is checking that users can run "make dist" from your
tarball.

Second, distcheck is checking that all this works properly in VPATH
builds (i.e., with srcdir != builddir).

For the first point, in principle it is OK to have ChangeLog generated
automatically from your VCS.  But you need to be careful that the
distributed ChangeLog's prerequisites are present and that it is
up-to-date, so that "make dist" from the tarball does not attempt to
re-generate it (since obviously this process will not function).  One
way to solve this is to sidestep it entirely with a dist-hook, which can
test if you are building from VCS, then generate the ChangeLog as
appropriate.  Something like this (untested):

  dist-hook: dist-create-changelog
  dist-create-changelog:
        if test -d "$(srcdir)/.git"; then \
          : generate "$(distdir)/ChangeLog" here; \
        fi
  .PHONY: dist-create-changelog

Here we rely on the fact that Automake will automagically include
ChangeLog in the tarball if it is present in srcdir.  You may want to
also add a distcheck-hook to ensure that this actually happens.

For the second point, if you are not routinely testing VPATH builds
from your git tree at all, just be aware that distcheck may uncover bugs
related to this feature.

Hope that helps,
-- 
Nick Bowler, Elliptic Technologies (http://www.elliptictech.com/)



reply via email to

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