bpo-45886: Allow overriding freeze command for cross compiling (GH-29… · python/cpython@dd8ce9e

@@ -1008,6 +1008,9 @@ Python/deepfreeze/frozen_only.c: Python/frozen_modules/frozen_only.h $(DEEPFREEZ

10081008

############################################################################

10091009

# frozen modules (including importlib)

101010101011+

# Allow developers to override freeze_module command for cross building (bpo-45886)

1012+

FREEZE_MODULE?=Programs/_freeze_module

1013+10111014

# FROZEN_FILES_* are auto-generated by Tools/scripts/freeze_modules.py.

10121015

FROZEN_FILES_IN = \

10131016

Lib/importlib/_bootstrap.py \

@@ -1061,69 +1064,69 @@ Programs/_freeze_module: Programs/_freeze_module.o $(LIBRARY_OBJS_OMIT_FROZEN)

1061106410621065

# BEGIN: freezing modules

106310661064-

Python/frozen_modules/importlib._bootstrap.h: Programs/_freeze_module Lib/importlib/_bootstrap.py

1065-

Programs/_freeze_module importlib._bootstrap $(srcdir)/Lib/importlib/_bootstrap.py Python/frozen_modules/importlib._bootstrap.h

1067+

Python/frozen_modules/importlib._bootstrap.h: $(FREEZE_MODULE) Lib/importlib/_bootstrap.py

1068+

$(FREEZE_MODULE) importlib._bootstrap $(srcdir)/Lib/importlib/_bootstrap.py Python/frozen_modules/importlib._bootstrap.h

106610691067-

Python/frozen_modules/importlib._bootstrap_external.h: Programs/_freeze_module Lib/importlib/_bootstrap_external.py

1068-

Programs/_freeze_module importlib._bootstrap_external $(srcdir)/Lib/importlib/_bootstrap_external.py Python/frozen_modules/importlib._bootstrap_external.h

1070+

Python/frozen_modules/importlib._bootstrap_external.h: $(FREEZE_MODULE) Lib/importlib/_bootstrap_external.py

1071+

$(FREEZE_MODULE) importlib._bootstrap_external $(srcdir)/Lib/importlib/_bootstrap_external.py Python/frozen_modules/importlib._bootstrap_external.h

106910721070-

Python/frozen_modules/zipimport.h: Programs/_freeze_module Lib/zipimport.py

1071-

Programs/_freeze_module zipimport $(srcdir)/Lib/zipimport.py Python/frozen_modules/zipimport.h

1073+

Python/frozen_modules/zipimport.h: $(FREEZE_MODULE) Lib/zipimport.py

1074+

$(FREEZE_MODULE) zipimport $(srcdir)/Lib/zipimport.py Python/frozen_modules/zipimport.h

107210751073-

Python/frozen_modules/abc.h: Programs/_freeze_module Lib/abc.py

1074-

Programs/_freeze_module abc $(srcdir)/Lib/abc.py Python/frozen_modules/abc.h

1076+

Python/frozen_modules/abc.h: $(FREEZE_MODULE) Lib/abc.py

1077+

$(FREEZE_MODULE) abc $(srcdir)/Lib/abc.py Python/frozen_modules/abc.h

107510781076-

Python/frozen_modules/codecs.h: Programs/_freeze_module Lib/codecs.py

1077-

Programs/_freeze_module codecs $(srcdir)/Lib/codecs.py Python/frozen_modules/codecs.h

1079+

Python/frozen_modules/codecs.h: $(FREEZE_MODULE) Lib/codecs.py

1080+

$(FREEZE_MODULE) codecs $(srcdir)/Lib/codecs.py Python/frozen_modules/codecs.h

107810811079-

Python/frozen_modules/io.h: Programs/_freeze_module Lib/io.py

1080-

Programs/_freeze_module io $(srcdir)/Lib/io.py Python/frozen_modules/io.h

1082+

Python/frozen_modules/io.h: $(FREEZE_MODULE) Lib/io.py

1083+

$(FREEZE_MODULE) io $(srcdir)/Lib/io.py Python/frozen_modules/io.h

108110841082-

Python/frozen_modules/_collections_abc.h: Programs/_freeze_module Lib/_collections_abc.py

1083-

Programs/_freeze_module _collections_abc $(srcdir)/Lib/_collections_abc.py Python/frozen_modules/_collections_abc.h

1085+

Python/frozen_modules/_collections_abc.h: $(FREEZE_MODULE) Lib/_collections_abc.py

1086+

$(FREEZE_MODULE) _collections_abc $(srcdir)/Lib/_collections_abc.py Python/frozen_modules/_collections_abc.h

108410871085-

Python/frozen_modules/_sitebuiltins.h: Programs/_freeze_module Lib/_sitebuiltins.py

1086-

Programs/_freeze_module _sitebuiltins $(srcdir)/Lib/_sitebuiltins.py Python/frozen_modules/_sitebuiltins.h

1088+

Python/frozen_modules/_sitebuiltins.h: $(FREEZE_MODULE) Lib/_sitebuiltins.py

1089+

$(FREEZE_MODULE) _sitebuiltins $(srcdir)/Lib/_sitebuiltins.py Python/frozen_modules/_sitebuiltins.h

108710901088-

Python/frozen_modules/genericpath.h: Programs/_freeze_module Lib/genericpath.py

1089-

Programs/_freeze_module genericpath $(srcdir)/Lib/genericpath.py Python/frozen_modules/genericpath.h

1091+

Python/frozen_modules/genericpath.h: $(FREEZE_MODULE) Lib/genericpath.py

1092+

$(FREEZE_MODULE) genericpath $(srcdir)/Lib/genericpath.py Python/frozen_modules/genericpath.h

109010931091-

Python/frozen_modules/ntpath.h: Programs/_freeze_module Lib/ntpath.py

1092-

Programs/_freeze_module ntpath $(srcdir)/Lib/ntpath.py Python/frozen_modules/ntpath.h

1094+

Python/frozen_modules/ntpath.h: $(FREEZE_MODULE) Lib/ntpath.py

1095+

$(FREEZE_MODULE) ntpath $(srcdir)/Lib/ntpath.py Python/frozen_modules/ntpath.h

109310961094-

Python/frozen_modules/posixpath.h: Programs/_freeze_module Lib/posixpath.py

1095-

Programs/_freeze_module posixpath $(srcdir)/Lib/posixpath.py Python/frozen_modules/posixpath.h

1097+

Python/frozen_modules/posixpath.h: $(FREEZE_MODULE) Lib/posixpath.py

1098+

$(FREEZE_MODULE) posixpath $(srcdir)/Lib/posixpath.py Python/frozen_modules/posixpath.h

109610991097-

Python/frozen_modules/os.h: Programs/_freeze_module Lib/os.py

1098-

Programs/_freeze_module os $(srcdir)/Lib/os.py Python/frozen_modules/os.h

1100+

Python/frozen_modules/os.h: $(FREEZE_MODULE) Lib/os.py

1101+

$(FREEZE_MODULE) os $(srcdir)/Lib/os.py Python/frozen_modules/os.h

109911021100-

Python/frozen_modules/site.h: Programs/_freeze_module Lib/site.py

1101-

Programs/_freeze_module site $(srcdir)/Lib/site.py Python/frozen_modules/site.h

1103+

Python/frozen_modules/site.h: $(FREEZE_MODULE) Lib/site.py

1104+

$(FREEZE_MODULE) site $(srcdir)/Lib/site.py Python/frozen_modules/site.h

110211051103-

Python/frozen_modules/stat.h: Programs/_freeze_module Lib/stat.py

1104-

Programs/_freeze_module stat $(srcdir)/Lib/stat.py Python/frozen_modules/stat.h

1106+

Python/frozen_modules/stat.h: $(FREEZE_MODULE) Lib/stat.py

1107+

$(FREEZE_MODULE) stat $(srcdir)/Lib/stat.py Python/frozen_modules/stat.h

110511081106-

Python/frozen_modules/__hello__.h: Programs/_freeze_module Lib/__hello__.py

1107-

Programs/_freeze_module __hello__ $(srcdir)/Lib/__hello__.py Python/frozen_modules/__hello__.h

1109+

Python/frozen_modules/__hello__.h: $(FREEZE_MODULE) Lib/__hello__.py

1110+

$(FREEZE_MODULE) __hello__ $(srcdir)/Lib/__hello__.py Python/frozen_modules/__hello__.h

110811111109-

Python/frozen_modules/__phello__.h: Programs/_freeze_module Lib/__phello__/__init__.py

1110-

Programs/_freeze_module __phello__ $(srcdir)/Lib/__phello__/__init__.py Python/frozen_modules/__phello__.h

1112+

Python/frozen_modules/__phello__.h: $(FREEZE_MODULE) Lib/__phello__/__init__.py

1113+

$(FREEZE_MODULE) __phello__ $(srcdir)/Lib/__phello__/__init__.py Python/frozen_modules/__phello__.h

111111141112-

Python/frozen_modules/__phello__.ham.h: Programs/_freeze_module Lib/__phello__/ham/__init__.py

1113-

Programs/_freeze_module __phello__.ham $(srcdir)/Lib/__phello__/ham/__init__.py Python/frozen_modules/__phello__.ham.h

1115+

Python/frozen_modules/__phello__.ham.h: $(FREEZE_MODULE) Lib/__phello__/ham/__init__.py

1116+

$(FREEZE_MODULE) __phello__.ham $(srcdir)/Lib/__phello__/ham/__init__.py Python/frozen_modules/__phello__.ham.h

111411171115-

Python/frozen_modules/__phello__.ham.eggs.h: Programs/_freeze_module Lib/__phello__/ham/eggs.py

1116-

Programs/_freeze_module __phello__.ham.eggs $(srcdir)/Lib/__phello__/ham/eggs.py Python/frozen_modules/__phello__.ham.eggs.h

1118+

Python/frozen_modules/__phello__.ham.eggs.h: $(FREEZE_MODULE) Lib/__phello__/ham/eggs.py

1119+

$(FREEZE_MODULE) __phello__.ham.eggs $(srcdir)/Lib/__phello__/ham/eggs.py Python/frozen_modules/__phello__.ham.eggs.h

111711201118-

Python/frozen_modules/__phello__.spam.h: Programs/_freeze_module Lib/__phello__/spam.py

1119-

Programs/_freeze_module __phello__.spam $(srcdir)/Lib/__phello__/spam.py Python/frozen_modules/__phello__.spam.h

1121+

Python/frozen_modules/__phello__.spam.h: $(FREEZE_MODULE) Lib/__phello__/spam.py

1122+

$(FREEZE_MODULE) __phello__.spam $(srcdir)/Lib/__phello__/spam.py Python/frozen_modules/__phello__.spam.h

112011231121-

Python/frozen_modules/frozen_only.h: Programs/_freeze_module Tools/freeze/flag.py

1122-

Programs/_freeze_module frozen_only $(srcdir)/Tools/freeze/flag.py Python/frozen_modules/frozen_only.h

1124+

Python/frozen_modules/frozen_only.h: $(FREEZE_MODULE) Tools/freeze/flag.py

1125+

$(FREEZE_MODULE) frozen_only $(srcdir)/Tools/freeze/flag.py Python/frozen_modules/frozen_only.h

1123112611241127

# END: freezing modules

112511281126-

Tools/scripts/freeze_modules.py: Programs/_freeze_module

1129+

Tools/scripts/freeze_modules.py: $(FREEZE_MODULE)

1127113011281131

.PHONY: regen-frozen

11291132

regen-frozen: Tools/scripts/freeze_modules.py $(FROZEN_FILES_IN)