9

I'm using Autoconf to build my c++ project. It uses third party code which is also built with the help of Autoconf/Automake. So in my configure.ac I've got the following line:

AC_CONFIG_SUBDIRS([subdirectoryname])

Everything works fine, but I also use the feature to let tests be automatically made if make check is executed - which is done by the third party code as well. Because these tests take a while it's annoying to execute them each time I want to test my own code. So is there any way to avoid that the check option is passed to the subdirectory's Makefile?

Update: Overriding check-recursive does not seem to be an option, as my top-level Makefile.am looks (more or less) like this:

SUBDIRS=library src

So disabling checking on this level would also disable the checking inside my src folder. And that's not what I want to achieve. I just want to disable the checking in the library directory.

aRestless
  • 1,825
  • 2
  • 18
  • 27

2 Answers2

6

Overriding check-recursive in your Makefile.am should work:

check-recursive:
     @true

or, if you only wanted to check in a specific directory:

check-recursive:
     $(MAKE) -C src check
thiton
  • 35,651
  • 4
  • 70
  • 100
0

according to the autoconf manual, it will execute a configure.gnu script in the subdirectory if it finds one. Theoretically that could be a script which adds a --disable-tests or similar option to a call to ./configure

That said, I've yet to get this to work on a project of my own. :-/

swestrup
  • 4,079
  • 3
  • 22
  • 33
  • Sounds interesting. If you got something, let me know. – aRestless Dec 08 '11 at 20:26
  • If you are able and going to modify the subdirectory, better put a `GNUmakefile` in the library directory that does nothing on check and calls Makefile for everything else. – thiton Dec 09 '11 at 08:11
  • I am not able to modify the contents of the library directory (imported via svn external and so on...). That's the whole clue: I want to configure this from above. Making changes to the library directory would be easy. – aRestless Dec 09 '11 at 14:12