4 You must first install a recent version of
5 - OCaml (at least 3.09.2),
6 see http://caml.inria.fr/download.en.html
7 At least, OCaml 3.11 is required to use the OCaml scripting
8 feature in the SmPL code.
9 - The Menhir parser generator (at least 20080912),
10 see http://cristal.inria.fr/~fpottier/menhir/
11 (unless you got a version of the coccinelle source with
12 the SmPL parser pre-generated)
13 - Python and its development files (python-dev)
14 (unless you run configure with the --without-python option)
16 On Debian/Ubuntu, install the following packages
17 - ocaml-native-compilers (or alternatively ocaml)
20 - libsexplib-camlp4-dev
21 - menhir and libmenhir-ocaml-dev
23 On Fedora, install the following packages
28 Note that on Fedora, there is currently not
29 package for menhir and pycaml.
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
47 and the optimized code version.
49 We provide the files generated by menhir in the tarball. However,
50 'make distclean' will remove them. You could either restore them from
51 the tarball or install menhir. Using 'make clean' should be safe with
52 regards to these files.
54 Note: The test target is intended for developers. In particular, you
55 should not expect that every test will pass.
58 In order to use the OCaml scripting feature in SmPL, you must compile
59 Coccinelle with at least OCaml version 3.11.
63 ** Bash integration **
65 To have completion under Bash, you can execute the following command:
69 It will install the shell script 'scripts/spatch.bash_completion'
70 in /etc/bash_completion.d/spatch
72 You can manually copy that file elsewhere if you have a different
73 bash_completion directory.
77 ** Runtime dependencies **
79 - Basic shell commands:
80 - ls, cat, cp, mv, rm, grep, mkdir, find
81 - Developper tool: diff
84 ** Optional runtime dependencies **
86 - To quickly apply the semantic patches
89 - To use OCaml scripting feature in SmPL
90 - ocaml-native-compilers or ocaml-nox
93 - To generate a PDF of the control flow graph with '-graphical_trace'
94 - pdftk and graphviz (with PDF support)
98 ** Dependencies for additional tools **
100 git, pushd, popd, sed, diffstat, cpp
104 To uninstall Coccinelle, you should use the following command
109 To also remove the bash completion script, run