GNU bug report logs - #18286
distcheck fails to detect missing files

Previous Next

Package: automake;

Reported by: Peter Johansson <trojkan <at> gmail.com>

Date: Mon, 18 Aug 2014 00:31:01 UTC

Severity: normal

Tags: patch

Done: Stefano Lattarini <stefano.lattarini <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefano Lattarini <stefano.lattarini <at> gmail.com>
To: Peter Johansson <trojkan <at> gmail.com>, 18286 <at> debbugs.gnu.org
Cc: Nicola Fontana <ntd <at> entidi.it>, "automake-patches <at> gnu.org" <automake-patches <at> gnu.org>
Subject: bug#18286: distcheck fails to detect missing files
Date: Mon, 22 Dec 2014 20:30:33 +0100
Reference: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=18286

On 08/18/2014 02:30 AM, Peter Johansson wrote:
> Hi,
>
> I have this snippet in my 'Makefile.am'
>
>
> include am/test_data.am
>
> $(srcdir)/am/test_data.am: $(srcdir)/test/data.txt $(srcdir)/am/test_data.am.in
>      cd $(srcdir) && $(SHELL) bootstrap am/test_data.am
>
>
> It first includes (at Automake time) a snippet, which is generated while bootstrapping. Now I forgot to include $(srcdir)/test/data.txt $(srcdir)/am/test_data.am.in in the distball, which caused the embarrassing
>
> make: *** No rule to make target `am/test_data.am.in', needed by `am/test_data.am'.  Stop.
>
> The surprising thing is that distcheck does not detect this problem,
> but 'make distcheck' passes through without problem.
>
This issue has been reported already in the past:

http://lists.gnu.org/archive/html/automake/2006-09/msg00008.html
http://lists.gnu.org/archive/html/automake/2013-01/msg00049.html

(BTW, sorry Nicola for missing your report and your fix
for so long!)

> The reason for
> this is probably because while $(srcdir)/test/data.txt does not exist,
> make also looks in $(srcdir)/$(srcdir)/test/data.txt and that file exists
> as it is part of my development directory. If I change my Makefile.am to
>
> $(srcdir)/am/test_data.am: test/data.txt am/test_data.am.in
>      cd $(srcdir) && $(SHELL) bootstrap am/test_data.am
>
> 'make distcheck' will detect the problem, but I have this habit of type
> $(srcdir) for things that are supposed to be in $(srcdir). Is that a bad
> habit?
>
It can sometimes lead to strange interactions, if not used consistently;
see http://lists.gnu.org/archive/html/automake/2006-09/msg00008.html
and follow-up messages.

But the issue you are experiencing is not due to that, but rather
to a bug/limitation of the current 'distcheck' implementation.

> A fix could be to let distcheck not work in $(distdir) but instead create
> 'tmp_/$(distdir)', builddir 'tmp_/$(distdir)/build_', and installdir
> 'tmp_/$(distdir)/inst_' which would hide the development files from the
> distcheck.
>
> What do you think?
>
Seems like a viable plan.  In such a setup, relatively to $(builddir),
$(srcdir) will be '..', while the "developement" copy of the source
tree will be in '../..'; so the incomplete tarball should be diagnosed.

Definitely a nice fix to have for Automake 1.15...  Let's see if I can
make it happen.




This bug report was last modified 10 years and 207 days ago.

Previous Next


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