diff --git a/Makefile.pre.in b/Makefile.pre.in index e2143a2..4ee959f 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -730,26 +730,26 @@ Programs/_testembed: Programs/_testembed.o $(LIBRARY) $(LDLIBRARY) $(PY3LIBRARY) Programs/_freeze_importlib.o: Programs/_freeze_importlib.c Makefile -Programs/_freeze_importlib: Programs/_freeze_importlib.o $(LIBRARY_OBJS_OMIT_FROZEN) +Programs/_freeze_importlib$(EXE): Programs/_freeze_importlib.o $(LIBRARY_OBJS_OMIT_FROZEN) $(LINKCC) $(PY_CORE_LDFLAGS) -o $@ Programs/_freeze_importlib.o $(LIBRARY_OBJS_OMIT_FROZEN) $(LIBS) $(MODLIBS) $(SYSLIBS) .PHONY: regen-importlib -regen-importlib: Programs/_freeze_importlib +regen-importlib: Programs/_freeze_importlib$(EXE) # Regenerate Python/importlib_external.h # from Lib/importlib/_bootstrap_external.py using _freeze_importlib - ./Programs/_freeze_importlib importlib._bootstrap_external \ + ./Programs/_freeze_importlib$(EXE) importlib._bootstrap_external \ $(srcdir)/Lib/importlib/_bootstrap_external.py \ $(srcdir)/Python/importlib_external.h.new $(UPDATE_FILE) $(srcdir)/Python/importlib_external.h $(srcdir)/Python/importlib_external.h.new # Regenerate Python/importlib.h from Lib/importlib/_bootstrap.py # using _freeze_importlib - ./Programs/_freeze_importlib importlib._bootstrap \ + ./Programs/_freeze_importlib$(EXE) importlib._bootstrap \ $(srcdir)/Lib/importlib/_bootstrap.py \ $(srcdir)/Python/importlib.h.new $(UPDATE_FILE) $(srcdir)/Python/importlib.h $(srcdir)/Python/importlib.h.new # Regenerate Python/importlib_zipimport.h from Lib/zipimport.py # using _freeze_importlib - ./Programs/_freeze_importlib zipimport \ + ./Programs/_freeze_importlib$(EXE) zipimport \ $(srcdir)/Lib/zipimport.py \ $(srcdir)/Python/importlib_zipimport.h.new $(UPDATE_FILE) $(srcdir)/Python/importlib_zipimport.h $(srcdir)/Python/importlib_zipimport.h.new @@ -1807,7 +1807,7 @@ clean: 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_importlib + -rm -f Programs/_testembed Programs/_freeze_importlib$(EXE) -find build -type f -a ! -name '*.gc??' -exec rm -f {} ';' -rm -f Include/pydtrace_probes.h -rm -f profile-gen-stamp diff -Naur Python-3.8.0-orig/Programs/_freeze_importlib.c Python-3.8.0/Programs/_freeze_importlib.c --- Python-3.8.0-orig/Programs/_freeze_importlib.c 2019-10-14 16:34:47.000000000 +0300 +++ Python-3.8.0/Programs/_freeze_importlib.c 2019-10-22 10:03:31.757808700 +0300 @@ -20,7 +20,7 @@ {0, 0, 0} /* sentinel */ }; -#ifndef MS_WINDOWS +#ifndef _MSC_VER /* On Windows, this links with the regular pythonXY.dll, so this variable comes from frozen.obj. In the Makefile, frozen.o is not linked into this executable, so we define the variable here. */