summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2023-10-05 20:26:37 (GMT)
committerGitHub <noreply@github.com>2023-10-05 20:26:37 (GMT)
commitfb6c4ed2bbb2a867d5f0b9a94656e4714be5d9c2 (patch)
tree7977f499364dd329a0bcab01997224931efecdca
parentd257479c2f6cbf3b69ed90062f00635832e4bf91 (diff)
downloadcpython-fb6c4ed2bbb2a867d5f0b9a94656e4714be5d9c2.zip
cpython-fb6c4ed2bbb2a867d5f0b9a94656e4714be5d9c2.tar.gz
cpython-fb6c4ed2bbb2a867d5f0b9a94656e4714be5d9c2.tar.bz2
gh-110429: Fix race condition in "make regen-all" (#110433)
"make regen-pegen" now creates a temporary file called "parser.c.new" instead of "parser.new.c". Previously, if "make clinic" was run in parallel with "make regen-all", clinic may try but fail to open "parser.new.c" if the temporay file was removed in the meanwhile.
-rw-r--r--Makefile.pre.in4
1 files changed, 2 insertions, 2 deletions
diff --git a/Makefile.pre.in b/Makefile.pre.in
index 97eb767..f1f5c85 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -1399,8 +1399,8 @@ regen-pegen:
PYTHONPATH=$(srcdir)/Tools/peg_generator $(PYTHON_FOR_REGEN) -m pegen -q c \
$(srcdir)/Grammar/python.gram \
$(srcdir)/Grammar/Tokens \
- -o $(srcdir)/Parser/parser.new.c
- $(UPDATE_FILE) $(srcdir)/Parser/parser.c $(srcdir)/Parser/parser.new.c
+ -o $(srcdir)/Parser/parser.c.new
+ $(UPDATE_FILE) $(srcdir)/Parser/parser.c $(srcdir)/Parser/parser.c.new
.PHONY: regen-ast
regen-ast: