diff options
author | Eric Snow <ericsnowcurrently@gmail.com> | 2022-03-28 20:56:05 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-28 20:56:05 (GMT) |
commit | 4c116f716bd1c174d6530b9a7a5ed3863927a109 (patch) | |
tree | 54d8dbb508f6258bec70b989d502107bc1ee4d98 /Makefile.pre.in | |
parent | 295114dcd32b3aad5453e5e15e9e1befa0e5ca01 (diff) | |
download | cpython-4c116f716bd1c174d6530b9a7a5ed3863927a109.zip cpython-4c116f716bd1c174d6530b9a7a5ed3863927a109.tar.gz cpython-4c116f716bd1c174d6530b9a7a5ed3863927a109.tar.bz2 |
bpo-47146: Eliminate a race between make regen-deepfreeze and make regen-global-objects. (gh-32162)
The race likely originated with gh-32061.
https://bugs.python.org/issue47146
Diffstat (limited to 'Makefile.pre.in')
-rw-r--r-- | Makefile.pre.in | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/Makefile.pre.in b/Makefile.pre.in index fb5dd6a..e6c6a6b 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -1136,7 +1136,10 @@ regen-frozen: Tools/scripts/freeze_modules.py $(FROZEN_FILES_IN) # Deepfreeze targets .PHONY: regen-deepfreeze -regen-deepfreeze: $(DEEPFREEZE_OBJS) +regen-deepfreeze: + @# Possibly generate globals first, to make sure _bootstrap_python builds. + $(PYTHON_FOR_REGEN) $(srcdir)/Tools/scripts/generate_global_objects.py + $(MAKE) $(DEEPFREEZE_OBJS) DEEPFREEZE_DEPS=$(srcdir)/Tools/scripts/deepfreeze.py $(FREEZE_MODULE_DEPS) $(FROZEN_FILES_OUT) @@ -1178,12 +1181,10 @@ regen-importlib: regen-frozen # Global objects .PHONY: regen-global-objects -regen-global-objects: $(srcdir)/Tools/scripts/generate_global_objects.py - $(PYTHON_FOR_REGEN) $(srcdir)/Tools/scripts/generate_global_objects.py - @# Run one more time after deepfreezing, to catch any globals added - @# there. This is necessary because the deep-frozen code isn't - @# commited to the repo. - $(MAKE) regen-deepfreeze +regen-global-objects: regen-deepfreeze + @# We already ran in once, before deepfreezing, to make sure + @# _bootstrap_python builds. Now we run it again to catch any + @# remaining globals, including those added by deepfreeze. $(PYTHON_FOR_REGEN) $(srcdir)/Tools/scripts/generate_global_objects.py ############################################################################ |