This is the mail archive of the
automake@gnu.org
mailing list for the automake project.
Re: $srcdir
- From: "Dr. David Kirkby" <drkirkby at ntlworld dot com>
- To: automake <automake at gnu dot org>, "autoconf at gnu dot org" <autoconf at gnu dot org>
- Date: Thu, 06 Mar 2003 00:54:29 +0000
- Subject: Re: $srcdir
- References: <3E666452.456A421F@ntlworld.com><3sllzt5pr9.fsf@sunset.dstc.edu.au>
Clinton Roy wrote:
>
> "Dr. David Kirkby" <drkirkby at ntlworld dot com> writes:
>
> > $srcdir, which I assumed refereed to the directory 'src' below the top
> > directory of a package, but seems to be undefined when I try to use
> > it. Putting 'echo $srcdir' in a test script, just echoes a blank line,
> > with no directory information.
>
> Just to confirm, you've added the script to the automake variable
> TESTS and are running the tests by invoking `make check' ?
Yes, I was doing that.
> echo $srcdir in my scratch script setup like above does work, for what
> it's worth.
>
> #!/bin/sh
>
> echo "source dir: $srcdir"
>
> make check
>
> ...
>
> source dir: .
> PASS: foo.sh
> ==================
> All 1 tests passed
> ==================
I would not work for me, but adding the
TESTS_ENVIRONMENT = srcdir=$(srcdir) top_srcdir=$(top_srcdir)
to Makefile.am did allow it to work.
--
Dr. David Kirkby,
Senior Research Fellow,
Department of Medical Physics,
University College London,
11-20 Capper St, London, WC1E 6JA.
Tel: 020 7679 6408 Fax: 020 7679 6269
Internal telephone: ext 46408
e-mail davek at medphys dot ucl dot ac dot uk