Harden flexlink.opt target

If an error occurs while making flexlink.opt, the bytecode image was not
restored. It's now restored even if an error occurs while building the
native code image.
master
David Allsopp 2018-07-26 15:23:42 +01:00
parent c13c200f87
commit 171a97407d
1 changed files with 3 additions and 2 deletions

View File

@ -545,9 +545,10 @@ flexlink: flexdll/Makefile
flexlink.opt:
cd flexdll && \
mv flexlink.exe flexlink && \
$(MAKE) OCAML_FLEXLINK="../boot/ocamlrun ./flexlink" MSVC_DETECT=0 \
($(MAKE) OCAML_FLEXLINK="../boot/ocamlrun ./flexlink" MSVC_DETECT=0 \
OCAML_CONFIG_FILE=../config/Makefile \
OCAMLOPT="../ocamlopt.opt -I ../stdlib" flexlink.exe && \
OCAMLOPT="../ocamlopt.opt -I ../stdlib" flexlink.exe || \
(mv flexlink flexlink.exe && false)) && \
mv flexlink.exe flexlink.opt && \
mv flexlink flexlink.exe