Coccinelle release 0.2.5-rc3
[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
24 Then simply type
25 ./configure
26 make depend
27 make
28 make install
29
30
31
32
33
34 'make' will compile the bytecode version by default. You could use
35 'make all.opt' to have the optimized version. If you compile both,
36 'make install' will take care of that and install both, spatch and
37 spatch.opt. If you use only one of them, 'make install' will install
38 the one you have compiled, either spatch ou spatch.opt, under the
39 front-end spatch. You could use 'make world' to compile the bytecode
40 and the optimized code version.
41
42 We provide the files generated by menhir in the tarball. However,
43 'make distclean' will remove them. You could either restore them from
44 the tarball or install menhir. Using 'make clean' should be safe with
45 regards to these files.
46
47 Note: The test target is intended for developers. In particular, you
48 should not expect that every test will pass.
49
50
51 In order to use the OCaml scripting feature in SmPL, you must compile
52 Coccinelle with at least OCaml version 3.11.
53
54
55
56 ** Bash integration **
57
58 To have completion under Bash, you can execute the following command:
59
60 make install-bash
61
62 It will install the shell script 'scripts/spatch.bash_completion'
63 in /etc/bash_completion.d/spatch
64
65 You can manually copy that file elsewhere if you have a different
66 bash_completion directory.
67
68
69
70 ** Runtime dependencies **
71
72 - Basic shell commands:
73 - ls, cat, cp, mv, rm, grep, mkdir, find
74 - Developper tool: diff
75
76
77 ** Optional runtime dependencies **
78
79 - To quickly apply the semantic patches
80 - glimpse indexer
81
82 - To use OCaml scripting feature in SmPL
83 - ocaml-native-compilers or ocaml-nox
84 - ocaml-findlib
85
86 - To generate a PDF of the control flow graph with '-graphical_trace'
87 - pdftk and graphviz (with PDF support)
88
89
90
91 ** Dependencies for additional tools **
92
93 git, pushd, popd, sed, diffstat, cpp
94
95 ** Uninstall **
96
97 To uninstall Coccinelle, you should use the following command
98
99 make uninstall
100
101
102 To also remove the bash completion script, run
103
104 make uninstall-bash