diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-01-16 16:20:38 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-01-16 16:20:38 +0100 |
commit | 4e640bd930d133889dbc9f9a77e29bab902e3b7d (patch) | |
tree | 40de12e8f80fb2e494845e6f14c64461221dc0bb /src/Make_mvc.mak | |
parent | d125001297ac76e0ed4759a9320ffb7872cf6242 (diff) | |
download | vim-git-4e640bd930d133889dbc9f9a77e29bab902e3b7d.tar.gz |
patch 7.4.1104v7.4.1104
Problem: Various problems building with MzScheme/Racket.
Solution: Make it work with new versions of Racket. (Yukihiro Nakadaira, Ken
Takata)
Diffstat (limited to 'src/Make_mvc.mak')
-rw-r--r-- | src/Make_mvc.mak | 55 |
1 files changed, 30 insertions, 25 deletions
diff --git a/src/Make_mvc.mak b/src/Make_mvc.mak index 6f0b84391..df5a748ce 100644 --- a/src/Make_mvc.mak +++ b/src/Make_mvc.mak @@ -755,43 +755,52 @@ PYTHON3_LIB = $(PYTHON3)\libs\python$(PYTHON3_VER).lib !ifndef MZSCHEME_VER MZSCHEME_VER = 205_000 !endif -CFLAGS = $(CFLAGS) -DFEAT_MZSCHEME -I $(MZSCHEME)\include -!if EXIST("$(MZSCHEME)\collects\scheme\base.ss") \ - || EXIST("$(MZSCHEME)\collects\scheme\base.rkt") \ - || EXIST("$(MZSCHEME)\collects\racket\base.rkt") -# for MzScheme >= 4 we need to include byte code for basic Scheme stuff -MZSCHEME_EXTRA_DEP = mzscheme_base.c -CFLAGS = $(CFLAGS) -DINCLUDE_MZSCHEME_BASE +!ifndef MZSCHEME_COLLECTS +MZSCHEME_COLLECTS=$(MZSCHEME)\collects !endif +CFLAGS = $(CFLAGS) -DFEAT_MZSCHEME -I "$(MZSCHEME)\include" !if EXIST("$(MZSCHEME)\lib\msvc\libmzsch$(MZSCHEME_VER).lib") MZSCHEME_MAIN_LIB=mzsch !else MZSCHEME_MAIN_LIB=racket !endif -!if EXIST("$(MZSCHEME)\lib\msvc\lib$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER).lib") \ - && !EXIST("$(MZSCHEME)\lib\msvc\libmzgc$(MZSCHEME_VER).lib") +!if (EXIST("$(MZSCHEME)\lib\lib$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER).dll") \ + && !EXIST("$(MZSCHEME)\lib\libmzgc$(MZSCHEME_VER).dll")) \ + || (EXIST("$(MZSCHEME)\lib\msvc\lib$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER).lib") \ + && !EXIST("$(MZSCHEME)\lib\msvc\libmzgc$(MZSCHEME_VER).lib")) !message Building with Precise GC MZSCHEME_PRECISE_GC = yes CFLAGS = $(CFLAGS) -DMZ_PRECISE_GC !endif !if "$(DYNAMIC_MZSCHEME)" == "yes" +!message MzScheme DLLs will be loaded dynamically +CFLAGS = $(CFLAGS) -DDYNAMIC_MZSCHEME !if "$(MZSCHEME_PRECISE_GC)" == "yes" -!error MzScheme with Precise GC cannot be loaded dynamically +# Precise GC does not use separate dll +CFLAGS = $(CFLAGS) \ + -DDYNAMIC_MZSCH_DLL=\"lib$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER).dll\" \ + -DDYNAMIC_MZGC_DLL=\"lib$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER).dll\" +!else +CFLAGS = $(CFLAGS) \ + -DDYNAMIC_MZSCH_DLL=\"lib$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER).dll\" \ + -DDYNAMIC_MZGC_DLL=\"libmzgc$(MZSCHEME_VER).dll\" !endif -!message MzScheme DLLs will be loaded dynamically -CFLAGS = $(CFLAGS) -DDYNAMIC_MZSCHEME \ - -DDYNAMIC_MZSCH_DLL=\"lib$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER).dll\" \ - -DDYNAMIC_MZGC_DLL=\"libmzgc$(MZSCHEME_VER).dll\" !else !if "$(MZSCHEME_DEBUG)" == "yes" CFLAGS = $(CFLAGS) -DMZSCHEME_FORCE_GC !endif !if "$(MZSCHEME_PRECISE_GC)" == "yes" # Precise GC does not use separate dll -MZSCHEME_LIB = $(MZSCHEME)\lib\msvc\lib$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER).lib +!if EXIST("$(MZSCHEME)\lib\lib$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER).def") +# create .lib from .def +MZSCHEME_LIB = lib$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER).lib +MZSCHEME_EXTRA_DEP = lib$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER).lib !else -MZSCHEME_LIB = $(MZSCHEME)\lib\msvc\libmzgc$(MZSCHEME_VER).lib \ - $(MZSCHEME)\lib\msvc\lib$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER).lib +MZSCHEME_LIB = "$(MZSCHEME)\lib\msvc\lib$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER).lib" +!endif +!else +MZSCHEME_LIB = "$(MZSCHEME)\lib\msvc\libmzgc$(MZSCHEME_VER).lib" \ + "$(MZSCHEME)\lib\msvc\lib$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER).lib" !endif !endif MZSCHEME_OBJ = $(OUTDIR)\if_mzsch.obj @@ -1059,7 +1068,6 @@ clean: - if exist dimm_i.c del dimm_i.c - if exist dimm.tlb del dimm.tlb - if exist dosinst.exe del dosinst.exe - - if exist mzscheme_base.c del mzscheme_base.c cd xxd $(MAKE) /NOLOGO -f Make_mvc.mak clean cd .. @@ -1172,13 +1180,10 @@ $(OUTDIR)/if_perlsfio.obj: $(OUTDIR) if_perlsfio.c $(INCL) $(OUTDIR)/if_mzsch.obj: $(OUTDIR) if_mzsch.c if_mzsch.h $(INCL) $(MZSCHEME_EXTRA_DEP) $(CC) $(CFLAGS) if_mzsch.c \ - -DMZSCHEME_COLLECTS=\"$(MZSCHEME:\=\\)\\collects\" -mzscheme_base.c: -!IF "$(MZSCHEME_MAIN_LIB)" == "racket" - $(MZSCHEME)\raco ctool --c-mods mzscheme_base.c ++lib scheme/base -!ELSE - $(MZSCHEME)\mzc --c-mods mzscheme_base.c ++lib scheme/base -!ENDIF + -DMZSCHEME_COLLECTS="\"$(MZSCHEME_COLLECTS:\=\\)\"" + +lib$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER).lib: + lib /DEF:"$(MZSCHEME)\lib\lib$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER).def" $(OUTDIR)/if_python.obj: $(OUTDIR) if_python.c if_py_both.h $(INCL) $(CC) $(CFLAGS) $(PYTHON_INC) if_python.c |