Commit ecd43674 authored by Gerd Stolpmann's avatar Gerd Stolpmann

check for "ocamlc -opaque" and use it if available

parent b5aa38ed
......@@ -400,6 +400,14 @@ ocaml -I +compiler-libs itest-aux/ppx.ml >/dev/null || {
enable_topfind_ppxopt=false
}
######################################################################
# Check for -opaque
echo "Checking for ocamlc -opaque..."
opaque="-opaque"
ocamlc -opaque || opaque=""
######################################################################
# Configure libraries
......@@ -609,6 +617,7 @@ if [ "$mingw_lib" != "" ]; then
echo "OCAMLC_FLAGS=-I \"${mingw_lib}\"" >>Makefile.config
echo "OCAMLOPT_FLAGS=-I \"${mingw_lib}\"" >>Makefile.config
fi
echo "OPAQUE=${opaque}" >>Makefile.config
# All OK
......
......@@ -154,19 +154,19 @@ depend: *.ml *.mli fl_meta.ml fl_metascanner.ml
# .src
.mml.cmo:
$(OCAMLC) -g -vmthread -c -impl $<
$(OCAMLC) $(OPAQUE) -g -vmthread -c -impl $<
.mml.cmx:
$(OCAMLOPT) -thread -c -impl $<
$(OCAMLOPT) $(OPAQUE) -thread -c -impl $<
.ml.cmx:
$(OCAMLOPT) -c $<
$(OCAMLOPT) $(OPAQUE) -c $<
.ml.cmo:
$(OCAMLC) -g -c $<
$(OCAMLC) $(OPAQUE) -g -c $<
.mli.cmi:
$(OCAMLC) -c $<
$(OCAMLC) $(OPAQUE) -c $<
#.src.ml:
# $(CAMLP4O) -impl $< -o $@
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment