bug-automake
[Top][All Lists]
Advanced

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

bug#18286: distcheck fails to detect missing files


From: Peter Johansson
Subject: bug#18286: distcheck fails to detect missing files
Date: Mon, 18 Aug 2014 10:30:11 +1000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.7.0

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. 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?

A fix could be to let distcheck not work in $(distdir) but instead create 'tmp_/$(distdir)', builddir 'tmp_/$(distdir)/$(builddir)', and installdir 'tmp_/$(distdir)/inst_' which would hide the development files from the distcheck. What do you think?

Thanks,
Peter

--
Peter Johansson






reply via email to

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