automake-patches
[Top][All Lists]
Advanced

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

Re: [FYI] {master} docs: fix unportable example of AM_TESTS_ENVIRONMENT


From: Ralf Wildenhues
Subject: Re: [FYI] {master} docs: fix unportable example of AM_TESTS_ENVIRONMENT usage
Date: Thu, 30 Jun 2011 22:37:28 +0200

Hi Stefano,

* Stefano Lattarini wrote on Thu, Jun 23, 2011 at 10:56:31PM CEST:
> On Thursday 23 June 2011, Ralf Wildenhues wrote:
> > > -AM_TESTS_ENVIRONMENT = exec 9>&2; warn_fileno=9; export warn_fileno;
> > 
> > This example served two purposes: use of AM_TESTS_ENVIRONMENT, and
> > showing how to produce output while the test is running.  Your patch
> > removes the second feature.  Can we have it back, ideally in a portable
> > fashion?
> >
> Alas, no.  The only way to do that portably is to either:
>  1. add a trailing `; >&2' to AM_TESTS_ENVIRONMENT, *and* force the user
>     not to define TESTS_ENVIRONMENT; or
>  2. use TESTS_ENVIRONMENT, not AM_TESTS_ENVIRONMENT, in the Makefile.am
>     (still with a trailing `; >&2' obviously).

Actually, it used to be nonportable to put the redirection before the
command.  I'm fairly sure that's only with historic shells and not an
issue in practice any more (Sven Mascheck's pages will have the details
for the curious).

> In each case, the user's namespace is invaded, and we go against our own
> advice (in [1] we violate the "always terminate AM_TESTS_ENVIRONMENT with
> a semicolon" rule, in [2] we violate "don't define TESTS_ENVIRONMENT in
> the Makefile.am, it's user-reserved" rule).
> 
> Also, the example above belongs IMHO more in a FAQ rather than in a
> reference manual.

Are you volunteering to update the FAQ?  ;-)

Thanks,
Ralf



reply via email to

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