Autoconf/Automake:如何避免通过“检查” AC_CONFIG_SUBDIRS 的选项
我正在使用 Autoconf 来构建我的 C++ 项目。它使用第三方代码,这些代码也是在 Autoconf/Automake 的帮助下构建的。因此,在我的 configure.ac
中,我有以下行:
AC_CONFIG_SUBDIRS([subdirectoryname])
一切正常,但我还使用该功能在执行 make check
时自动进行测试 -这也是由第三方代码完成的。因为这些测试需要一段时间,所以每次我想测试自己的代码时都执行它们很烦人。那么有什么方法可以避免 check
选项传递到子目录的 Makefile
中吗?
更新:覆盖check-recursive
似乎不是一个选项,因为我的顶级Makefile.am看起来(或多或少)像这样:
SUBDIRS=library src
所以禁用对此的检查level 还会禁用我的 src 文件夹内的检查。这不是我想要实现的目标。我只想禁用 library
目录中的检查。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在
Makefile.am
中覆盖check-recursive
应该可以:或者,如果您只想签入特定目录:
Overriding
check-recursive
in yourMakefile.am
should work:or, if you only wanted to check in a specific directory:
根据autoconf手册,如果找到的话,它将执行子目录中的configure.gnu脚本。理论上,这可能是一个脚本,它将 --disable-tests 或类似选项添加到对 ./configure 的调用中。
也就是说,我还没有让它在我自己的项目上工作。 :-/
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. :-/