automake
[Top][All Lists]
Advanced

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

Re: non-recursive make and tests


From: Gary V . Vaughan
Subject: Re: non-recursive make and tests
Date: Tue, 31 Aug 2004 12:03:25 +0100

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Bob,

On 31 Aug 2004, at 06:08, Bob Friesenhahn wrote:
On Mon, 30 Aug 2004, Bob Friesenhahn wrote:

The $(srcdir) value passed is often essentially useless since it may just be '.'. It is difficult for the Makefile to produce better values except for perhaps offsets from @abs_top_srcdir@ and @abs_top_builddir@ substitutions. It may also be possible to play games by passing back-ticked shell script fragments rather than normal values in the TESTS_ENVIRONMENT specification.

Regardless, the tests themselves should not have to know their position in the source or build tree.

If I add this sort of junk to the top of my test scripts then they seem to pass the tests:

set -e
SRCDIR=`dirname $0`
SRCDIR=`cd $SRCDIR && pwd`
TOPSRCDIR=`cd $srcdir && pwd`
cd utilities || exit 1

MODEL_MIFF="${TOPSRCDIR}/Magick++/demo/model.miff"
.
.
.

Without the pwd's distcheck can't pass since srcdir may be passed as a useless '.'.

Unfortunately, with hundreds of such scripts, altering the test environment to convert to a non-recursive make is quite a penalty.

Many scripts could be one-liners if Automake can produce a per-directory test environment.

I made a stab at converting libtool to non-recursive make last year (I think) and had much the same problem. I think the general solution is to move to an Autotest based testsuite, where the input files are generated by the test rather than searched for in the source tree. Maybe you can emulate that behaviour by making your test input into here documents in the test scripts, without a whole scale move to Autotest?

Cheers,
        Gary.
- --
Gary V. Vaughan      ())_.  address@hidden,gnu.org}
Research Scientist   ( '/   http://tkd.kicks-ass.net
GNU Hacker           / )=   http://www.gnu.org/software/libtool
Technical Author   `(_~)_   http://sources.redhat.com/autobook

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (Darwin)

iD8DBQFBNFsBFRMICSmD1gYRAvmXAJ9b+/z3QyLJlvF/yqV6j67yHoiZEwCgjO3/
/4KCRgLIGY6u8TYeyDL5nY4=
=cRSu
-----END PGP SIGNATURE-----





reply via email to

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