Skip to content

bpo-47146: Eliminate a Race Between make regen-deepfreeze and make regen-global-objects #32162

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions Makefile.pre.in
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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

############################################################################
Expand Down