summaryrefslogtreecommitdiff
path: root/build/world.sh
blob: 3b08dc78d278dfaeb6725d175c266ebae92b8f33 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/sh

#########################################################################
#                                                                       #
#                                 OCaml                                 #
#                                                                       #
#         Nicolas Pouillard, projet Gallium, INRIA Rocquencourt         #
#                                                                       #
#   Copyright 2008 Institut National de Recherche en Informatique et    #
#   en Automatique.  All rights reserved.  This file is distributed     #
#   under the terms of the Q Public License version 1.0.                #
#                                                                       #
#########################################################################

cd `dirname $0`
set -e
if [ -e ocamlbuild_mixed_mode ]; then
  echo ocamlbuild mixed mode detected
  echo 'please cleanup and re-launch (make clean ; ./build/distclean.sh)'
  exit 1
fi
case "$1" in
  all|a|al) mode=all;;
  byte|b|by|byt) mode=byte;;
  native|na|nat|nati|nativ) mode=native;;
  *) echo 'Unexpected target. Expected targets are: all,byte,native' \
       >/dev/stderr
     exit 1;;
esac
shift
./mkconfig.sh
./mkmyocamlbuild_config.sh
./boot-c-parts.sh
./boot.sh "$@"
./world."$mode".sh "$@"