Hi Kurt,

Thanks a lot for elaborating.

[...]
> It's set to a shell script that set up environment variables like
> LD_LIBRARY_PATH.
> 

I think this should indeed be ok, *assuming that you are sourcing that script?*
(And put a semicolon at the end of TESTS_ENVIRONMENT.)

> Looking at the manual in 15.2.1:
> | The AM_TESTS_ENVIRONMENT and TESTS_ENVIRONMENT variables can be
> | used to run initialization code and set environment variables for
> | the test scripts.
> [...]
> | AM_TESTS_ENVIRONMENT = \
> | ## Some environment initializations are kept in a separate shell
> | ## file 'tests-env.sh', which can make it easier to also run tests
> | ## from the command line.
> |  . $(srcdir)/tests-env.sh; \
> 
> 
> Then in 15.2.3 it says:
> | the AM_TESTS_ENVIRONMENT and TESTS_ENVIRONMENT variables _cannot_ be use
> | to define a custom test runner; the LOG_COMPILER and LOG_FLAGS
> | (or their extension-specific counterparts) should be used instead:
> |
> | ## This is WRONG!
> | AM_TESTS_ENVIRONMENT = PERL5LIB='$(srcdir)/lib' $(PERL) -Mstrict -w
> | 
> | ## Do this instead.
> | AM_TESTS_ENVIRONMENT = PERL5LIB='$(srcdir)/lib'; export PERL5LIB;
> | LOG_COMPILER = $(PERL)
> | AM_LOG_FLAGS = -Mstrict -w
> 
> So the manual is contradicting itself.  And if it's not supported
> anymore, it's breaking an documented way of doing things.
> 

I don't quite see the contradiction here? The first example sources a shell
script to suck in variables defined in there; the second example, in the part
not marked *WRONG*, the variables are defined right here?

I am sure I must be missing something here, or is it maybe some bug in the rules
generated by automake that don't actually yield the behaviour as documented?

Best,
Michael

Attachment: pgp3Foup9QnsO.pgp
Description: PGP signature

Reply via email to