FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

bpo-45696: Use a stamp file to speed up rebuild by tiran · Pull Request #29522 · python/cpython · GitHub

Repository navigation

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .in  (1) dotfile  (1) All 2 file types selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
1 change: 1 addition & 0 deletions .gitignore
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ Lib/lib2to3/*.pickle
Lib/test/data/*
!Lib/test/data/README
/_bootstrap_python
/_bootstrap_python-stamp
/Makefile
/Makefile.pre
Mac/Makefile
Expand Down
19 changes: 16 additions & 3 deletions Makefile.pre.in
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,9 @@ LIBOBJS= @LIBOBJS@

PYTHON= python$(EXE)
BUILDPYTHON= python$(BUILDEXE)

BOOTSTRAP= _bootstrap_python
BOOTSTRAP_STAMP= $(BOOTSTRAP)-stamp

PYTHON_FOR_REGEN?=@PYTHON_FOR_REGEN@
UPDATE_FILE=$(PYTHON_FOR_REGEN) $(srcdir)/Tools/scripts/update_file.py
Expand Down Expand Up @@ -628,7 +630,7 @@ platform: $(BUILDPYTHON) pybuilddir.txt
# problems by creating a dummy pybuilddir.txt just to allow interpreter
# initialization to succeed. It will be overwritten by generate-posix-vars
# or removed in case of failure.
pybuilddir.txt: $(BOOTSTRAP)
pybuilddir.txt: $(BOOTSTRAP_STAMP)
@echo "none" > ./pybuilddir.txt
./$(BOOTSTRAP) -S -m sysconfig --generate-posix-vars ;\
if test $$? -ne 0 ; then \
Expand Down Expand Up @@ -781,14 +783,25 @@ $(BOOTSTRAP): $(LIBRARY_OBJS_OMIT_FROZEN) \
Programs/python.o \
$(LIBS) $(MODLIBS) $(SYSLIBS)

# Use a stamp file to avoid recompiling the bootstrap interpreter and all
# deepfrozen files whenever a core file is changed, see bpo-45696.
# NOTE: $(.MAKE) is required for BSD make.
$(BOOTSTRAP_STAMP):
@if test -n "$(MAKE)"; then \
$(MAKE) $(BOOTSTRAP) || exit 2; \
else \
$(.MAKE) $(BOOTSTRAP) || exit 2; \
fi
@touch $@

############################################################################
# Deepfreeze targets

.PHONY: regen-deepfreeze
regen-deepfreeze: $(DEEPFREEZE_OBJS)

DEEPFREEZE_DEPS = \
$(BOOTSTRAP) \
$(BOOTSTRAP_STAMP) \
pybuilddir.txt \
$(srcdir)/Tools/scripts/deepfreeze.py

Expand Down Expand Up @@ -2195,7 +2208,7 @@ clean-retain-profile: pycremoval
find build -name '*.py[co]' -exec rm -f {} ';' || true
-rm -f pybuilddir.txt
-rm -f Lib/lib2to3/*Grammar*.pickle
-rm -f Programs/_testembed Programs/_freeze_module $(BOOTSTRAP)
-rm -f Programs/_testembed Programs/_freeze_module $(BOOTSTRAP) $(BOOTSTRAP_STAMP)
-rm -f Python/deepfreeze/*.[co]
-find build -type f -a ! -name '*.gc??' -exec rm -f {} ';'
-rm -f Include/pydtrace_probes.h
Expand Down

Back | FazBrowse Home | New Git URL