automake
[Top][All Lists]
Advanced

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

Re: Launch bash script for functional testing with "make check" and "mak


From: Stefano Lattarini
Subject: Re: Launch bash script for functional testing with "make check" and "make distcheck"
Date: Thu, 10 Jan 2013 23:35:48 +0100

On 01/10/2013 08:57 PM, Timothée Flutre wrote:
> I updated M4, Autoconf and Automake to their latest version. In
> Makefile.am, I'm added only this:
> 
> AM_TESTS_ENVIRONMENT = \
>         myprog_abspath='$(abs_srcdir)'/../src/myprog; \
>         export myprog_abspath;
> 
> And now "make check" works! However, "make distcheck" doesn't. This is due
> to the fact that, for "make distcheck", the variable $(abs_srcdir) points
> to ~/mypkg/mypkg-1.0/_build/../test/ while I'd like it to point to
> ~/mypkg/mypkg-1.0/_build/test/.
> 
> I also tried with this:
> 
> AM_TESTS_ENVIRONMENT = \
>         myprog_abspath='$(abs_top_srcdir)'/src/myprog; \
>         export myprog_abspath;
> 
> "make check" still works but "make distchek" doesn't because
> $(abs_top_srcdir) now points to ~/mypkg/mypkg-1.0/_build/../ while I want
> it to point to ~/mypkg/mypkg-1.0/_build/.
> 
That's because I'm an idiot who fail to properly proof-read his own
messages :-/  The definition above should use '$(abs_top_builddir)'
rather than '$(abs_top_srcdir)' (unsurprisingly, the program is
built in the build directory, not in the source directory).  Sorry
for the confusion.

> To summarize, when using "make distcheck", "myprog" is not in
> ~/mypkg/mypkg-1.0/src/ but in ~/mypkg/mypkg-1.0/_build/src/. I don't
> understand the rationale underlying this behavior. Why does "distcheck"
> need to create _build? Any idea on how to solve my problem?
> 
> BTW I had a look at the code of Coreutils here,
> http://git.savannah.gnu.org/cgit/coreutils.git/tree/, but can't see any
> Makefile.am.
> 
<http://git.savannah.gnu.org/cgit/coreutils.git/tree/Makefile.am>

But actually, the code I was referring to is here:
<http://git.savannah.gnu.org/cgit/coreutils.git/tree/tests/local.mk>

> Thanks already for all your advice,
> Tim
> 

Regards,
  Stefano



reply via email to

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