Skip to content

Commit 201f464

Browse files
committed
py.mk: Fix race condition building .mo files
By having an order-only dependency on the directory itself, the directory is sure to be created before the rule to create a .mo file is. This fixes a low-freqency error on github actions such as > msgfmt: error while opening "build/genhdr/en_US.mo" for writing: No such file or directory
1 parent 8384e46 commit 201f464

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

py/py.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ SRC_QSTR += $(HEADER_BUILD)/moduledefs.h
317317
# overall config, so they need to be caught
318318
MPCONFIGPORT_MK = $(wildcard mpconfigport.mk)
319319

320-
$(HEADER_BUILD)/$(TRANSLATION).mo: $(TOP)/locale/$(TRANSLATION).po
320+
$(HEADER_BUILD)/$(TRANSLATION).mo: $(TOP)/locale/$(TRANSLATION).po | $(HEADER_BUILD)
321321
$(Q)msgfmt -o $@ $^
322322

323323
$(HEADER_BUILD)/qstrdefs.preprocessed.h: $(PY_QSTR_DEFS) $(QSTR_DEFS) $(QSTR_DEFS_COLLECTED) mpconfigport.h $(MPCONFIGPORT_MK) $(PY_SRC)/mpconfig.h | $(HEADER_BUILD)

0 commit comments

Comments
 (0)