[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Creating autotest testsuite gets stuck if package.m4.in contains unr
From: |
Ralf Wildenhues |
Subject: |
Re: Creating autotest testsuite gets stuck if package.m4.in contains unresolved substitutions |
Date: |
Sat, 6 Feb 2010 14:59:03 +0100 |
User-agent: |
Mutt/1.5.20 (2009-12-10) |
Hello Niels,
* Niels Lohmann wrote on Fri, Feb 05, 2010 at 11:50:10AM CET:
> we have a project where we use the configure script to search for some
> helper tools and write the paths to the package.m4 for the autotest
> test suite. We do this with
>
> configure.ac:
> AC_PATH_PROGS(WGET, [wget], not found)
> AC_PATH_PROGS(HEAD, [head], not found)
> AC_PATH_PROGS(TAIL, [tail], not found)
> ...
> AC_CONFIG_FILES(tests/package.m4)
>
> tests/package.m4.in:
> m4_define([WGET], address@hidden@])
> m4_define([HEAD], address@hidden@])
> m4_define([TAIL], address@hidden@])
> ...
>
> A testcase using WGET can then check whether or not it is set to "not
> found" and either continue the test or skip it.
>
> This all works, but if (by accident), a check in configure.ac is
> deleted, say than one for WGET, then tests/package.m4 ends up with an
> unresolved substitution:
>
> m4_define([WGET], address@hidden@])
[...]
> I have very little knowledge about what's going on in autom4te, and I
> know that this scenario is a user error. However, I think that
> Autoconf should give a warning if substitution remain unresolved --
> anything but an infinite loop would be helpful.
autom4te can give user errors for strings that should not appear in the
output; see the m4_pattern_forbid documentation.
But say, why don't you just use simple shell variables instead?
tests/package.m4.in:
WGET='@WGET@'
That would strike me as a more natural approach.
Cheers,
Ralf
Re: Creating autotest testsuite gets stuck if package.m4.in contains unresolved substitutions, Eric Blake, 2010/02/06