[英]Autoconf/Automake: How to avoid passing the “check” option to AC_CONFIG_SUBDIRS
I'm using Autoconf to build my c++ project. 我正在使用Autoconf来构建我的c ++项目。 It uses third party code which is also built with the help of Autoconf/Automake. 它使用第三方代码,该代码也是在Autoconf / Automake的帮助下构建的。 So in my configure.ac
I've got the following line: 因此,在我的configure.ac
有以下一行:
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. 一切正常,但是如果执行make check
,我也使用该功能让测试自动进行-这也由第三方代码完成。 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
? 因此,有什么方法可以避免将check
选项传递到子目录的Makefile
?
Update: Overriding check-recursive
does not seem to be an option, as my top-level Makefile.am looks (more or less) like this: 更新:覆盖check-recursive
似乎不是一个选择,因为我的顶层Makefile.am看起来(或多或少)如下:
SUBDIRS=library src
So disabling checking on this level would also disable the checking inside my src
folder. 因此,禁用此级别的检查也会禁用src
文件夹中的检查。 And that's not what I want to achieve. 那不是我想要实现的。 I just want to disable the checking in the library
directory. 我只想禁用library
目录中的检查。
Overriding check-recursive
in your Makefile.am
should work: 在Makefile.am
覆盖check-recursive
应该可以:
check-recursive:
@true
or, if you only wanted to check in a specific directory: 或者,如果您只想签入特定目录:
check-recursive:
$(MAKE) -C src check
according to the autoconf manual, it will execute a configure.gnu script in the subdirectory if it finds one. 根据autoconf手册,如果找到子目录,它将在子目录中执行configure.gnu脚本。 Theoretically that could be a script which adds a --disable-tests or similar option to a call to ./configure 从理论上讲,这可能是一个脚本,该脚本在对./configure的调用中添加了--disable-tests或类似选项
That said, I've yet to get this to work on a project of my own. 就是说,我还没有将其用于我自己的项目。 :-/ :-/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.