nixpkgs-suyu/pkgs/os-specific/linux/nvidia-x11/nvidia-setttings-parallel-build.patch
Daniël de Kok 4db1c8b199 nvidia-settings: fix parallel build race condition
Fix a race condition that occurs in parallel builds of
nvidia-settings, frequently ending in the following error:

/bin/bash: _out/Linux_x86_64/antialias.png.h: No such file or directory
make[1]: *** [Makefile:320: _out/Linux_x86_64/antialias.png.h] Error 1

Upstream issue and fix from:
https://github.com/NVIDIA/nvidia-settings/issues/59
2021-02-02 08:33:24 +01:00

12 lines
431 B
Diff

diff --git a/src/Makefile b/src/Makefile
index acbb1b8..fe97103 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -242,6 +242,7 @@ endif
define BINARY_DATA_HEADER_RULE
$$(OUTPUTDIR)/$(notdir $(1)).h:
+ $(at_if_quiet)$(MKDIR) $$(OUTPUTDIR)
$(at_if_quiet){ \
$$(PRINTF) "extern const char _binary_$(subst .,_,$(notdir $(1)))_start[];\n"; \
$$(PRINTF) "extern const char _binary_$(subst .,_,$(notdir $(1)))_end[];\n"; \