-
- Downloads
Makefile: Fix parallel builds.
Creating directories with "install -d" suffers from a race condition, because, although it first-order avoids creating directories that already exist, if multiple instances attempt to create a given directory at the same time, the error due to a collision is not correctly handled. To get around this, we make separate recipes for directory creation, with dependencies on them in the rules that populate them. Unfortunately, this makes the automatic variables useless for some of the populating commands, since they include the directories. In such cases, we need to use explicit variables for the input files. Maintaining the unused ability to put static and dynamic libraries in separate directories (while not actually being separate) would have complicated things, so that capability has been dropped. This special treatment of directories is not applied to the installation of headers, since that's a complicated multi-directory target only used in a single recipe, and hence not vulnerable to parallelism. TESTED: All builds now succeed with parallelism, including those that previously exhibited a failure.
Loading
Please register or sign in to comment