mirror of
https://github.com/Z3Prover/z3
synced 2025-06-12 17:06:14 +00:00
ML API build fix
Signed-off-by: Christoph M. Wintersteiger <cwinter@microsoft.com>
This commit is contained in:
parent
d0588c0565
commit
3228c3ff5c
1 changed files with 19 additions and 8 deletions
|
@ -35,6 +35,7 @@ JNI_HOME=getenv("JNI_HOME", None)
|
||||||
OCAMLC=getenv("OCAMLC", "ocamlc")
|
OCAMLC=getenv("OCAMLC", "ocamlc")
|
||||||
OCAMLOPT=getenv("OCAMLOPT", "ocamlopt")
|
OCAMLOPT=getenv("OCAMLOPT", "ocamlopt")
|
||||||
OCAML_LIB=getenv("OCAML_LIB", None)
|
OCAML_LIB=getenv("OCAML_LIB", None)
|
||||||
|
OCAMLFIND=getenv("OCAMLFIND", "ocamlfind")
|
||||||
|
|
||||||
CXX_COMPILERS=['g++', 'clang++']
|
CXX_COMPILERS=['g++', 'clang++']
|
||||||
C_COMPILERS=['gcc', 'clang']
|
C_COMPILERS=['gcc', 'clang']
|
||||||
|
@ -357,6 +358,15 @@ def check_ml():
|
||||||
rmf('hello.cmx')
|
rmf('hello.cmx')
|
||||||
rmf('a.out')
|
rmf('a.out')
|
||||||
find_ml_lib()
|
find_ml_lib()
|
||||||
|
find_ocaml_find()
|
||||||
|
|
||||||
|
def find_ocaml_find():
|
||||||
|
global OCAMLFIND
|
||||||
|
if is_verbose():
|
||||||
|
print "Testing %s..." % OCAMLFIND
|
||||||
|
r = exec_cmd([OCAMLFIND, 'printconf'])
|
||||||
|
if r != 0:
|
||||||
|
OCAMLFIND=''
|
||||||
|
|
||||||
def find_ml_lib():
|
def find_ml_lib():
|
||||||
global OCAML_LIB
|
global OCAML_LIB
|
||||||
|
@ -1387,9 +1397,10 @@ class MLComponent(Component):
|
||||||
out.write('\n')
|
out.write('\n')
|
||||||
# Generate META file and package installation commands
|
# Generate META file and package installation commands
|
||||||
self.mk_ml_meta(os.path.join('src/api/ml/META'), os.path.join(BUILD_DIR, sub_dir, 'META'), VER_MAJOR, VER_MINOR, VER_BUILD, VER_REVISION)
|
self.mk_ml_meta(os.path.join('src/api/ml/META'), os.path.join(BUILD_DIR, sub_dir, 'META'), VER_MAJOR, VER_MINOR, VER_BUILD, VER_REVISION)
|
||||||
|
if OCAMLFIND != '':
|
||||||
out.write('ocamlfind_install: api/ml/z3.cma api/ml/z3.cmxa\n')
|
out.write('ocamlfind_install: api/ml/z3.cma api/ml/z3.cmxa\n')
|
||||||
out.write('\tocamlfind remove Z3\n')
|
out.write('\t%s remove Z3\n' % (OCAMLFIND))
|
||||||
out.write('\tocamlfind install Z3 api/ml/META api/ml/z3.cma api/ml/z3.cmxa api/ml/z3$(LIB_EXT) api/ml/libz3ml$(LIB_EXT) libz3$(SO_EXT)')
|
out.write('\t%s install Z3 api/ml/META api/ml/z3.cma api/ml/z3.cmxa api/ml/z3$(LIB_EXT) api/ml/libz3ml$(LIB_EXT) libz3$(SO_EXT)' % (OCAMLFIND))
|
||||||
if IS_WINDOWS:
|
if IS_WINDOWS:
|
||||||
out.write(' libz3$(LIB_EXT)')
|
out.write(' libz3$(LIB_EXT)')
|
||||||
out.write('\n')
|
out.write('\n')
|
||||||
|
@ -1821,7 +1832,7 @@ def mk_install(out):
|
||||||
for c in get_components():
|
for c in get_components():
|
||||||
c.mk_install_deps(out)
|
c.mk_install_deps(out)
|
||||||
out.write(' ')
|
out.write(' ')
|
||||||
if is_ml_enabled():
|
if is_ml_enabled() and OCAMLFIND != '':
|
||||||
out.write('ocamlfind_install')
|
out.write('ocamlfind_install')
|
||||||
out.write('\n')
|
out.write('\n')
|
||||||
out.write('\t@mkdir -p %s\n' % os.path.join('$(PREFIX)', 'bin'))
|
out.write('\t@mkdir -p %s\n' % os.path.join('$(PREFIX)', 'bin'))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue