Automake: Change targets according to environment variable

208 views Asked by At

I want to be able to change the TESTS according to an environment variable like this

make check EXTRA=more

The makefile is generated with Automake. I don't want a configure-time solution via AM_CONDITIONAL. I also don't want to use make check TESTS=more since per default the test shouldn't be in TESTS.

The background is that there are tests that take a long time and shouldn't be run with a normal make check. Adding another target like make extracheck can be done but this doesn't give me the convenient parallel test harness from automake. If there is some variable in automake like TESTS_MORE that automagically works, I would love to hear it.

It should be possible to do it in plain make in a portable way. Someone mentioned here that automake would not touch a Makefile that I include but this is not what I observe. Also the documentation says that included files are interpreted by automake and not make.

If it isn't possible via environment variables, maybe you have a good alternative solution?

0

There are 0 answers