Commit 41a14a40 authored by Stephane Glondu's avatar Stephane Glondu

Auto-detection of native compilation for the web server

parent 926a036c
ALL_TARGETS := all.otarget
ALL_TARGETS += $(if $(shell sh -c "command -v ocamlopt"),all-native.otarget)
minimal:
ocamlbuild minimal.otarget
all:
ocamlbuild all.otarget
ocamlbuild $(ALL_TARGETS)
check: minimal
demo/demo.sh
......
src/web/server.cmxs
......@@ -24,4 +24,10 @@ sed \
-e "s@_SRCDIR_@$PWD@g" \
demo/ocsigenserver.conf.in > $BELENIOS_RUNDIR/etc/ocsigenserver.conf
ocsigenserver -c $BELENIOS_RUNDIR/etc/ocsigenserver.conf "$@"
OCSIGENSERVER=ocsigenserver
if command -v ocsigenserver.opt > /dev/null; then
OCSIGENSERVER=ocsigenserver.opt
fi
exec $OCSIGENSERVER -c $BELENIOS_RUNDIR/etc/ocsigenserver.conf "$@"
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