diff options
author | David Allsopp <david.allsopp@metastack.com> | 2018-07-26 15:16:11 +0100 |
---|---|---|
committer | David Allsopp <david.allsopp@metastack.com> | 2018-09-07 08:34:53 +0200 |
commit | c13c200f8779a0ade18bbed2c00924f0152e5eec (patch) | |
tree | 20fb3bbce2fb45c6e9ff06239051fdb36dc6878d /otherlibs/Makefile | |
parent | f359bf527d9f197a145f37f166299a2af0a187f7 (diff) | |
download | ocaml-c13c200f8779a0ade18bbed2c00924f0152e5eec.tar.gz |
Standardise setting and use of OCAML_FLEXLINK
Some Makefiles were using export to set OCAML_FLEXLINK "globally" while
others set a variable FLEXLINK_ENV and set the environment explicitly.
All Makefiles now use FLEXLINK_ENV and also only invoke it on linking
commands (rather than, for example, all invocations of ocamlopt).
Diffstat (limited to 'otherlibs/Makefile')
-rw-r--r-- | otherlibs/Makefile | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/otherlibs/Makefile b/otherlibs/Makefile index 22a4806c61..d3b8a4397b 100644 --- a/otherlibs/Makefile +++ b/otherlibs/Makefile @@ -22,9 +22,11 @@ include $(ROOTDIR)/Makefile.common CAMLRUN ?= $(ROOTDIR)/boot/ocamlrun ifeq "$(wildcard $(ROOTDIR)/flexdll/Makefile)" "" -export OCAML_FLEXLINK:= +FLEXLINK_ENV = else -export OCAML_FLEXLINK:=$(ROOTDIR)/boot/ocamlrun $(ROOTDIR)/flexdll/flexlink.exe +# FLEXLINK_ENV must have a space at the end +FLEXLINK_ENV = \ + OCAML_FLEXLINK="$(ROOTDIR)/boot/ocamlrun $(ROOTDIR)/flexdll/flexlink.exe" # endif CAMLC=$(CAMLRUN) $(ROOTDIR)/ocamlc -nostdlib -I $(ROOTDIR)/stdlib @@ -74,10 +76,11 @@ $(LIBNAME).cmxa: $(CAMLOBJS_NAT) $(CAMLOBJS_NAT) $(LINKOPTS) $(LIBNAME).cmxs: $(LIBNAME).cmxa lib$(CLIBNAME).$(A) - $(CAMLOPT) -shared -o $(LIBNAME).cmxs -I . $(LIBNAME).cmxa + $(FLEXLINK_ENV)$(CAMLOPT) -shared -o $(LIBNAME).cmxs -I . \ + $(LIBNAME).cmxa lib$(CLIBNAME).$(A): $(COBJS) - $(MKLIB) -oc $(CLIBNAME) $(COBJS) $(LDOPTS) + $(FLEXLINK_ENV)$(MKLIB) -oc $(CLIBNAME) $(COBJS) $(LDOPTS) install:: if test -f dll$(CLIBNAME)$(EXT_DLL); then \ |