patch 7.4.1031
Problem: Can't build with Python interface using MingW. Solution: Update the Makefile. (Yasuhiro Matsumoto)
This commit is contained in:
@ -232,6 +232,10 @@ or you can use 'MinGW-w64' compiler.
|
||||
|
||||
http://mingw-w64.sourceforge.net/
|
||||
|
||||
Or a compiler provided on msys2:
|
||||
|
||||
https://msys2.github.io/
|
||||
|
||||
Once you have downloaded the compiler binaries, unpack them on your hard disk
|
||||
somewhere, and put them on your PATH. If you are on Win95/98 you can edit
|
||||
your AUTOEXEC.BAT file with a line like:
|
||||
@ -239,7 +243,14 @@ your AUTOEXEC.BAT file with a line like:
|
||||
set PATH=C:\MinGW\bin;%PATH%
|
||||
|
||||
or on NT/2000/XP, go to the Control Panel, (Performance and Maintenance),
|
||||
System, Advanced, and edit the environment from there.
|
||||
System, Advanced, and edit the environment from there. If you use msys2
|
||||
compilers, set your installed paths:
|
||||
|
||||
C:\msys2\mingw32\bin
|
||||
|
||||
for 32bit. And 64bit:
|
||||
|
||||
C:\msys2\mingw64\bin
|
||||
|
||||
Test if gcc is on your path. From a CMD (or COMMAND on '95/98) window:
|
||||
|
||||
@ -355,7 +366,18 @@ easily:
|
||||
Now just do:
|
||||
make -f Make_ming.mak gvim.exe
|
||||
|
||||
and you will end up with a Python-enabled, Win32 version. Enjoy!
|
||||
And if you use msys2 to build python support (as one line):
|
||||
|
||||
mingw32-make -f Make_ming.mak PYTHON=c:/msys64/mingw64
|
||||
PYTHON_HOME=c:/msys64/mingw64
|
||||
PYTHONINC=-Ic:/msys64/mingw64/include/python2.7
|
||||
DYNAMIC_PYTHON=yes
|
||||
PYTHON_VER=27
|
||||
DYNAMIC_PYTHON_DLL=libpython2.7.dll
|
||||
ARCH=x86-64
|
||||
STATIC_STDCPLUS=yes
|
||||
|
||||
You will end up with a Python-enabled, Win32 version. Enjoy!
|
||||
|
||||
|
||||
7. Building with MzScheme support
|
||||
|
||||
@ -212,7 +212,13 @@ DYNAMIC_PYTHON=yes
|
||||
endif
|
||||
|
||||
ifndef PYTHON_VER
|
||||
PYTHON_VER=22
|
||||
PYTHON_VER=27
|
||||
endif
|
||||
ifndef DYNAMIC_PYTHON_DLL
|
||||
DYNAMIC_PYTHON_DLL=python$(PYTHON_VER).dll
|
||||
endif
|
||||
ifdef PYTHON_HOME
|
||||
PYTHON_HOME_DEF=-DPYTHON_HOME=\"$(PYTHON_HOME)\"
|
||||
endif
|
||||
|
||||
ifeq (no,$(DYNAMIC_PYTHON))
|
||||
@ -220,12 +226,14 @@ PYTHONLIB=-L$(PYTHON)/libs -lpython$(PYTHON_VER)
|
||||
endif
|
||||
# my include files are in 'win32inc' on Linux, and 'include' in the standard
|
||||
# NT distro (ActiveState)
|
||||
ifndef PYTHONINC
|
||||
ifeq ($(CROSS),no)
|
||||
PYTHONINC=-I $(PYTHON)/include
|
||||
else
|
||||
PYTHONINC=-I $(PYTHON)/win32inc
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
# Python3 interface:
|
||||
# PYTHON3=[Path to Python3 directory] (Set inside Make_cyg.mak or Make_ming.mak)
|
||||
@ -772,7 +780,7 @@ INCL = vim.h feature.h os_win32.h os_dos.h ascii.h keymap.h term.h macros.h \
|
||||
gui.h
|
||||
|
||||
$(OUTDIR)/if_python.o : if_python.c if_py_both.h $(INCL)
|
||||
$(CC) -c $(CFLAGS) $(PYTHONINC) -DDYNAMIC_PYTHON_DLL=\"python$(PYTHON_VER).dll\" $< -o $@
|
||||
$(CC) -c $(CFLAGS) $(PYTHONINC) $(PYTHON_HOME_DEF) -DDYNAMIC_PYTHON_DLL=\"$(DYNAMIC_PYTHON_DLL)\" $< -o $@
|
||||
|
||||
$(OUTDIR)/if_python3.o : if_python3.c if_py_both.h $(INCL)
|
||||
$(CC) -c $(CFLAGS) $(PYTHON3INC) -DDYNAMIC_PYTHON3_DLL=\"PYTHON$(PYTHON3_VER).dll\" $< -o $@
|
||||
|
||||
@ -741,6 +741,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
1031,
|
||||
/**/
|
||||
1030,
|
||||
/**/
|
||||
|
||||
Reference in New Issue
Block a user