diff -Naur Python-3.5.2-orig/Makefile.pre.in Python-3.5.2/Makefile.pre.in --- Python-3.5.2-orig/Makefile.pre.in 2016-07-12 14:22:20.694800700 +0300 +++ Python-3.5.2/Makefile.pre.in 2016-07-12 14:22:31.389800700 +0300 @@ -723,18 +723,18 @@ 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_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 +Python/importlib_external.h: $(srcdir)/Lib/importlib/_bootstrap_external.py Programs/_freeze_importlib$(EXE) if test "$(cross_compiling)" != "yes"; then \ - ./Programs/_freeze_importlib \ + ./Programs/_freeze_importlib$(EXE) \ $(srcdir)/Lib/importlib/_bootstrap_external.py Python/importlib_external.h; \ fi -Python/importlib.h: $(srcdir)/Lib/importlib/_bootstrap.py Programs/_freeze_importlib +Python/importlib.h: $(srcdir)/Lib/importlib/_bootstrap.py Programs/_freeze_importlib$(EXE) if test "$(cross_compiling)" != "yes"; then \ - ./Programs/_freeze_importlib \ + ./Programs/_freeze_importlib$(EXE) \ $(srcdir)/Lib/importlib/_bootstrap.py Python/importlib.h; \ fi @@ -1637,7 +1637,7 @@ 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) -rm -rf build profile-removal: diff -Naur Python-3.5.2-orig/Programs/_freeze_importlib.c Python-3.5.2/Programs/_freeze_importlib.c --- Python-3.5.2-orig/Programs/_freeze_importlib.c 2016-06-26 00:38:38.000000000 +0300 +++ Python-3.5.2/Programs/_freeze_importlib.c 2016-07-12 14:22:31.403800700 +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. */