Fix flexdll section in README (#1359)

Fix flexdll section in `README.win32.adoc`.
Pass the whole OCaml config to the Flexdll Makefile instead of a few chosen variables.
master
Damien Doligez 2017-10-05 16:48:08 +02:00 committed by GitHub
parent 3b98adfe2e
commit db88523db3
2 changed files with 7 additions and 5 deletions

View File

@ -566,6 +566,7 @@ flexdll/Makefile:
.PHONY: flexdll
flexdll: flexdll/Makefile flexlink
$(MAKE) -C flexdll \
OCAML_CONFIG_FILE=../config/Makefile \
MSVC_DETECT=0 CHAINS=$(FLEXDLL_CHAIN) NATDYNLINK=false support
# Bootstrapping flexlink - leaves a bytecode image of flexlink.exe in flexdll/
@ -575,8 +576,8 @@ flexlink: flexdll/Makefile
cp byterun/ocamlrun$(EXE) boot/ocamlrun$(EXE)
$(MAKE) -C stdlib COMPILER=../boot/ocamlc stdlib.cma std_exit.cmo
cd stdlib && cp stdlib.cma std_exit.cmo *.cmi ../boot
$(MAKE) -C flexdll MSVC_DETECT=0 TOOLCHAIN=$(TOOLCHAIN) \
TOOLPREF=$(TOOLPREF) CHAINS=$(FLEXDLL_CHAIN) NATDYNLINK=false \
$(MAKE) -C flexdll MSVC_DETECT=0 OCAML_CONFIG_FILE=../config/Makefile \
CHAINS=$(FLEXDLL_CHAIN) NATDYNLINK=false \
OCAMLOPT="../boot/ocamlrun ../boot/ocamlc -I ../boot" \
flexlink.exe
$(MAKE) -C byterun clean
@ -587,7 +588,7 @@ flexlink.opt:
cd flexdll && \
mv flexlink.exe flexlink && \
$(MAKE) OCAML_FLEXLINK="../boot/ocamlrun ./flexlink" MSVC_DETECT=0 \
TOOLCHAIN=$(TOOLCHAIN) TOOLPREF=$(TOOLPREF) \
OCAML_CONFIG_FILE=../config/Makefile \
OCAMLOPT="../ocamlopt.opt -I ../stdlib" flexlink.exe && \
mv flexlink.exe flexlink.opt && \
mv flexlink flexlink.exe

View File

@ -327,12 +327,13 @@ done in one of three ways:
OCaml is then compiled as normal for the port you require, except that before
compiling `world`, you must compile `flexdll`, i.e.:
make flexdll world [bootstrap] opt opt.opt install
make flexdll world [bootstrap] opt opt.opt flexlink.opt install
* You should ignore the error messages that say ocamlopt was not found.
* `make install` will install FlexDLL by placing `flexlink.exe`
(and the default manifest file for the Microsoft port) in `bin/` and the
FlexDLL object files in `lib/`.
* If you don't include `make opt.opt`, `flexlink.exe` will be a
* If you don't include `make flexlink.opt`, `flexlink.exe` will be a
bytecode program. `make install` always installs the "best"
`flexlink.exe` (i.e. there is never a `flexlink.opt.exe` installed).
* If you have populated `flexdll/`, you *must* run