summaryrefslogtreecommitdiffstats
path: root/lang/python3/patches/013-make-freeze-import-lib-into-an-override-able-var.patch
blob: be17d34fb26530c1bc007b1d58870147c6828cbb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
diff --git a/Makefile.pre.in b/Makefile.pre.in
index ce2c0aa..7df56bf 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -691,17 +691,19 @@ Programs/_testembed: Programs/_testembed.o $(LIBRARY) $(LDLIBRARY) $(PY3LIBRARY)
 ############################################################################
 # Importlib
 
+FREEZE_IMPORTLIB ?= ./Programs/_freeze_importlib
+
 Programs/_freeze_importlib.o: Programs/_freeze_importlib.c Makefile
 
 Programs/_freeze_importlib: Programs/_freeze_importlib.o $(LIBRARY_OBJS_OMIT_FROZEN)
 	$(LINKCC) $(PY_LDFLAGS) -o $@ Programs/_freeze_importlib.o $(LIBRARY_OBJS_OMIT_FROZEN) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST)
 
 Python/importlib_external.h: $(srcdir)/Lib/importlib/_bootstrap_external.py Programs/_freeze_importlib
-	./Programs/_freeze_importlib \
+	$(FREEZE_IMPORTLIB) \
 		$(srcdir)/Lib/importlib/_bootstrap_external.py Python/importlib_external.h
 
 Python/importlib.h: $(srcdir)/Lib/importlib/_bootstrap.py Programs/_freeze_importlib
-	./Programs/_freeze_importlib \
+	$(FREEZE_IMPORTLIB) \
 		$(srcdir)/Lib/importlib/_bootstrap.py Python/importlib.h