summaryrefslogtreecommitdiff
path: root/INSTALL
blob: 28e4e9bd1c84b8146bd9b9e1a53cd0f39f75c8bb (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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
            Installing JoCaml on a Unix machine
            -----------------------------------

CONTEXT
  The JoCaml system is a modification of the Objective Caml system.
  As such, JoCaml installation is derived from Objective Caml installation.

  This distribution includes the 'INSTALL' file of Objective Caml under
  the name 'INSTALL_OCAML'. Here we focus on differences with Objective
  Caml installation.


* They are the same as the ones of Objective Caml,

* plus: the POSIX threads library 'phreads' is required.


1- Configure the system. From the top directory, do:

        ./configure

With respect to Objective Caml the "configure" script options are modified
as follows.

Suppressed options.

* All option relative to labltk are suppressed, since labltk is not supported.

* The -with-pthread and -no-pthread options are suppressed, JoCaml cannot
  be build without the native POSIX thread library.

Added options.

   JoCaml may have a 'companion' Objective Caml, so as to allow
   object level compatibility beetween JoCaml and OCaml. There are
   severe restructions: the version numbers of both systems should match.

-ocamlc <ocamlc bytecode compiler>
   If <ocamlc bytecode compiler> is executable, then the script runs it,
   to check version number and, when it matches with JoCaml version number,
   to extract the location of the Objective Caml library.
     By default, this option is activated with value 'ocamlc'

-ocamllib <dir>
   The Objective Caml library is <dir>. No version check is performed. Use
   this option at your own risk.

2- From the top directory, do:

        make world


4- If your platform is supported by the native-code compiler (as
reported during the autoconfiguration), you can now build the
native-code compiler. From the top directory, do:

        make opt

5- Compile fast versions of the Objective Caml compilers, by
compiling them with the native-code compiler (you have only compiled
them to bytecode so far).  Just do:

        make opt.opt

6- You can now install the JoCaml system. This will create the
JoCaml commands (in the binary directory selected during
autoconfiguration).

From the top directory, become superuser and do:

        umask 022       # make sure to give read & execute permission to all
        make install


The JoCaml commands are Ocaml commands prefixed by 'j'.
That is jocamlc, jocamlopt, jocamlrun, jocamlyacc, jocamllex, jocaml,
jocamlmktop, jocamlmklib, jocamldep.


Some of OCaml commands have no JoCaml equivalent: ocamldebug,
ocamlprof, ocamlcp, ocamldoc.



IF SOMETHING GOES WRONG:

Refer to the same section in file INSTALL_OCAML.