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/)