New configure script options to enable/disable byte/native targets
This commit is contained in:
parent
fb6755efb2
commit
65908e7ca3
4 changed files with 39 additions and 4 deletions
4
Makefile
4
Makefile
|
@ -1,6 +1,6 @@
|
|||
include config
|
||||
|
||||
.PHONY: all install
|
||||
.PHONY: all install uninstall clean
|
||||
|
||||
all:
|
||||
(cd compiler/; $(MAKE))
|
||||
|
@ -9,12 +9,10 @@ all:
|
|||
install:
|
||||
(cd compiler; $(MAKE) install)
|
||||
(cd lib; $(MAKE) install)
|
||||
$(INSTALL) tools/$(BZREAX) $(INSTALL_BINDIR)
|
||||
|
||||
uninstall:
|
||||
(cd compiler; $(MAKE) uninstall)
|
||||
(cd lib; $(MAKE) uninstall)
|
||||
$(RM) $(INSTALL_BINDIR)/$(BZREAX)
|
||||
|
||||
clean:
|
||||
(cd compiler; $(MAKE) clean)
|
||||
|
|
|
@ -21,6 +21,6 @@ STDLIB_DIR=@stdlib_dir@
|
|||
|
||||
OCAMLBUILD=STDLIB=$(STDLIB_DIR) @OCAMLBUILD@ -use-ocamlfind
|
||||
|
||||
TARGET=byte
|
||||
TARGET=@targets@
|
||||
ENABLE_SIMULATOR=@enable_simulator@
|
||||
ENABLE_CTRL2EPT_TRANSLATOR=@enable_ctrl2ept@
|
||||
|
|
25
configure
vendored
25
configure
vendored
|
@ -585,6 +585,7 @@ ac_subst_vars='ctrln_pp
|
|||
package_reatk_ctrlNbac
|
||||
LTLIBOBJS
|
||||
LIBOBJS
|
||||
targets
|
||||
enable_ctrl2ept
|
||||
enable_simulator
|
||||
stdlib_dir
|
||||
|
@ -666,6 +667,8 @@ enable_option_checking
|
|||
enable_simulator
|
||||
enable_local_stdlib
|
||||
enable_ctrl2ept
|
||||
enable_native
|
||||
enable_byte
|
||||
'
|
||||
ac_precious_vars='build_alias
|
||||
host_alias
|
||||
|
@ -1282,6 +1285,8 @@ Optional Features:
|
|||
--enable-simulator enable the graphical simulator
|
||||
--enable-local-stdlib use the in-sources standard library
|
||||
--enable-ctrl2ept enable the Controllable-Nbac entity translator
|
||||
--enable-native build native executables
|
||||
--enable-byte build bytecode executables
|
||||
|
||||
Report bugs to the package provider.
|
||||
_ACEOF
|
||||
|
@ -1891,6 +1896,22 @@ else
|
|||
fi
|
||||
|
||||
|
||||
# Check whether --enable-native was given.
|
||||
if test "${enable_native+set}" = set; then :
|
||||
enableval=$enable_native;
|
||||
else
|
||||
enable_native=no
|
||||
fi
|
||||
|
||||
|
||||
# Check whether --enable-byte was given.
|
||||
if test "${enable_byte+set}" = set; then :
|
||||
enableval=$enable_byte;
|
||||
else
|
||||
enable_byte=no
|
||||
fi
|
||||
|
||||
|
||||
# checking for ocamlc
|
||||
if test -n "$ac_tool_prefix"; then
|
||||
# Extract the first word of "${ac_tool_prefix}ocamlc", so it can be a program name with args.
|
||||
|
@ -4027,6 +4048,10 @@ else
|
|||
stdlib_dir=$libdir/heptagon
|
||||
fi
|
||||
|
||||
if test "$enable_byte" = "yes"; then targets="byte"; fi;
|
||||
if test "$enable_native" = "yes"; then targets="$targets native"; fi;
|
||||
if test "x$targets" = "x"; then targets="byte"; fi;
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
12
configure.in
12
configure.in
|
@ -16,6 +16,14 @@ AC_ARG_ENABLE(ctrl2ept,
|
|||
[ --enable-ctrl2ept enable the Controllable-Nbac entity translator],,
|
||||
enable_ctrl2ept=yes)
|
||||
|
||||
AC_ARG_ENABLE(native,
|
||||
[ --enable-native build native executables],,
|
||||
enable_native=no)
|
||||
|
||||
AC_ARG_ENABLE(byte,
|
||||
[ --enable-byte build bytecode executables],,
|
||||
enable_byte=no)
|
||||
|
||||
AC_PROG_OCAML
|
||||
if test "$OCAMLC" = "no"; then
|
||||
AC_MSG_ERROR([Please install the OCaml compiler])
|
||||
|
@ -81,6 +89,9 @@ else
|
|||
stdlib_dir=$libdir/heptagon
|
||||
fi
|
||||
|
||||
if test "$enable_byte" = "yes"; then targets="byte"; fi;
|
||||
if test "$enable_native" = "yes"; then targets="$targets native"; fi;
|
||||
if test "x$targets" = "x"; then targets="byte"; fi;
|
||||
|
||||
AC_SUBST(INSTALL)
|
||||
AC_SUBST(RM)
|
||||
|
@ -88,6 +99,7 @@ AC_SUBST(stdlib_dir)
|
|||
|
||||
AC_SUBST(enable_simulator)
|
||||
AC_SUBST(enable_ctrl2ept)
|
||||
AC_SUBST(targets)
|
||||
|
||||
AC_OUTPUT(config)
|
||||
|
||||
|
|
Loading…
Reference in a new issue