做:在子目录中单个目标禁用并行构建,只 [英] make: disable parallel building in subdirectory for single target only
问题描述
我有一个相当庞大的自动工具供电项目,生活在包括了很多子目录的目录的目录树。它有一个目标检查
(每个子目录,以及主要的目录)执行一大堆的自动化测试。在检查
目标递归构建的。
I have a rather huge autotools-powered project that lives in a directory tree consisting of a lot of directories with subdirectories. It's got a target check
(in each subdirectory as well as the main directory) that executes a whole lot of automated tests. The check
target is built recursively.
建筑,以及在并行测试(通过 -j
选项,以使)适用于大多数的目录。然而,有一个包含测试时,并行(定时灵敏度)执行不工作,但连续运行时通过一个目录。
Building as well as testing in parallel (via the -j
option to make) works for most of the directories. There is however one directory that contains test that don't work when executed in parallel (timing sensitivity), but pass when run serially.
现在的问题是:有没有办法强制make来构建检查
在仅这一个子目录串行目标,而构建一切并行
The question is: Is there a way to force make to build the check
target serially in just this one subdirectory while building everything else in parallel?
推荐答案
添加到您的的Makefile
:
.NOTPARALLEL:
请参阅GNU的文档制作这里。
See the documentation of GNU make here.
这篇关于做:在子目录中单个目标禁用并行构建,只的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!