3
- Coccinelle no longer needs ocaml-sexplib nor ocaml-extlib.
4
- Parallel building is possible when you do not build the bytecode
5
and native version of spatch simultaneously.
4
10
You must first install a recent version of
5
- OCaml (at least 3.09.2),
11
- OCaml (at least 3.10),
6
12
see http://caml.inria.fr/download.en.html
7
At least, OCaml 3.11 is required to use the OCaml scripting
13
At least, OCaml 3.12 is required to use the OCaml scripting
8
14
feature in the SmPL code.
9
15
- The Menhir parser generator (at least 20080912),
10
16
see http://cristal.inria.fr/~fpottier/menhir/
14
20
(unless you run configure with the --without-python option)
16
22
On Debian/Ubuntu, install the following packages
23
- pkg-config (optional, but strongly recommended)
17
24
- ocaml-native-compilers (or alternatively ocaml)
19
26
- libpycaml-ocaml-dev
20
- libsexplib-camlp4-dev
21
27
- menhir and libmenhir-ocaml-dev
23
29
On Fedora, install the following packages
30
- pkgconfig (optional, but strongly recommended)
28
Note that on Fedora, there is currently not
29
package for menhir and pycaml.
39
Note that on Fedora, there is currently not a
40
package for menhir and pycaml. However, coccinelle
41
bundles the sources of these packages and will use them
42
when needed. The bundled pycaml package has support for
46
./configure --enable-release
41
'make' will compile the bytecode version by default. You could use
42
'make all.opt' to have the optimized version. If you compile both,
43
'make install' will take care of that and install both, spatch and
44
spatch.opt. If you use only one of them, 'make install' will install
45
the one you have compiled, either spatch ou spatch.opt, under the
46
front-end spatch. You could use 'make world' to compile the bytecode
51
Other configuration flags of interest:
52
--prefix default: /usr/local
53
--disable-opt build the bytecode version
54
--with-python=PATH choose a specific python executable
55
--without-python no python scripting
56
--disable-ocaml no ocaml scripting
57
--disable-pycaml uses the bundled pycaml package instead of
58
a installed pycaml package.
59
--disable-pcre-syntax no pcre regexp syntax
60
--enable-release=world builds the optimized and unoptimized
62
See ./configure --help for more options
67
When the --enable-release flag was given to ./configure, 'make' will
68
build in release configuration (no debugging symbols, etc.). It
69
defaults to the optimized version, unless --disable-opt is given
70
to configure. You could use 'make opt-only' to compile the
71
optimized version only. Similarly, you can use 'make byte-only' for
72
the unoptimized version. 'make install' installs whichever version
73
was compiled, and installs a script 'spatch' (the frontend) that invokes
74
the 'best' one with proper environment variables.
75
You can also use 'make world' to compile the bytecode
47
76
and the optimized code version.
78
Make targets of interest:
79
opt-only, opt compiles just the optimized version
80
byt-only, byte compiles just the bytecode version
81
world compiles both + frontends + docs
82
all-release compiles the optimized version + frontends + docs
83
all-dev compiles the bytecode version + frontends
84
all default target: alias for either all-dev or all-release
85
all.opt compiles the optimized version + frontends
86
check run tests (note: not all tests are expected to succeed)
87
As these make targets may change in the future, it is preferred to set the
88
appropriate default using the --enable-release flag.
49
90
We provide the files generated by menhir in the tarball. However,
50
91
'make distclean' will remove them. You could either restore them from
51
92
the tarball or install menhir. Using 'make clean' should be safe with