coccinelle release 0.2.5
[bpt/coccinelle.git] / install.txt
1
2 ** Compilation **
3
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)
15
16 On Debian/Ubuntu, install the following packages
17 - ocaml-native-compilers (or alternatively ocaml)
18 - ocaml-findlib
19 - libpycaml-ocaml-dev
20 - libsexplib-camlp4-dev
21 - menhir and libmenhir-ocaml-dev
22
23 On Fedora, install the following packages
24 - ocaml
25 - ocaml-findlib
26 - ocaml-sexplib-devel
27
28 Note that on Fedora, there is currently not
29 package for menhir and pycaml.
30
31 Then simply type
32 ./configure
33 make depend
34 make
35 make install
36
37
38
39
40
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.
48
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.
53
54 Note: The test target is intended for developers. In particular, you
55 should not expect that every test will pass.
56
57
58 In order to use the OCaml scripting feature in SmPL, you must compile
59 Coccinelle with at least OCaml version 3.11.
60
61
62
63 ** Bash integration **
64
65 To have completion under Bash, you can execute the following command:
66
67 make install-bash
68
69 It will install the shell script 'scripts/spatch.bash_completion'
70 in /etc/bash_completion.d/spatch
71
72 You can manually copy that file elsewhere if you have a different
73 bash_completion directory.
74
75
76
77 ** Runtime dependencies **
78
79 - Basic shell commands:
80 - ls, cat, cp, mv, rm, grep, mkdir, find
81 - Developper tool: diff
82
83
84 ** Optional runtime dependencies **
85
86 - To quickly apply the semantic patches
87 - glimpse indexer
88
89 - To use OCaml scripting feature in SmPL
90 - ocaml-native-compilers or ocaml-nox
91 - ocaml-findlib
92
93 - To generate a PDF of the control flow graph with '-graphical_trace'
94 - pdftk and graphviz (with PDF support)
95
96
97
98 ** Dependencies for additional tools **
99
100 git, pushd, popd, sed, diffstat, cpp
101
102 ** Uninstall **
103
104 To uninstall Coccinelle, you should use the following command
105
106 make uninstall
107
108
109 To also remove the bash completion script, run
110
111 make uninstall-bash