From cd8188d8328f1a27c030826b0d173e1fca2ce46b Mon Sep 17 00:00:00 2001 From: mintsuki Date: Tue, 7 Feb 2023 05:09:52 +0100 Subject: [PATCH] build: Fix race condition in root GNUmakefile.in --- GNUmakefile.in | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/GNUmakefile.in b/GNUmakefile.in index 7e218548..7a624261 100644 --- a/GNUmakefile.in +++ b/GNUmakefile.in @@ -103,8 +103,12 @@ $(call MKESCAPE,$(BINDIR))/limine-enroll-config: $(call MKESCAPE,$(BINDIR))/Make $(MAKE) -C '$(call SHESCAPE,$(BINDIR))' limine-enroll-config $(call MKESCAPE,$(BINDIR))/Makefile: $(call MKESCAPE,$(SRCDIR))/host/Makefile $(call MKESCAPE,$(SRCDIR))/host/.gitignore - $(MKDIR_P) '$(call SHESCAPE,$(BINDIR))' - cp '$(call SHESCAPE,$(SRCDIR))/host/Makefile' '$(call SHESCAPE,$(SRCDIR))/host/.gitignore' '$(call SHESCAPE,$(BINDIR))/' + if mkdir '$(call SHESCAPE,$(BINDIR))'; then \ + cp '$(call SHESCAPE,$(SRCDIR))/host/Makefile' '$(call SHESCAPE,$(SRCDIR))/host/.gitignore' '$(call SHESCAPE,$(BINDIR))/'; \ + else \ + while ! [ -f '$(call SHESCAPE,$(SRCDIR))/host/Makefile' ]; do true; done; \ + while ! [ -f '$(call SHESCAPE,$(SRCDIR))/host/.gitignore' ]; do true; done; \ + fi .PHONY: limine-deploy limine-deploy: