Coccinelle release 1.0.0-rc1
[bpt/coccinelle.git] / install.txt
CommitLineData
174d1640
C
1
2 ** Compilation **
3
4You must first install a recent version of
5 - OCaml (at least 3.09.2),
34e49164 6 see http://caml.inria.fr/download.en.html
174d1640
C
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),
34e49164
C
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)
34e49164 15
c491d8ee
C
16On Debian/Ubuntu, install the following packages
17 - ocaml-native-compilers (or alternatively ocaml)
ca417fcf
C
18 - ocaml-findlib
19 - libpycaml-ocaml-dev
c491d8ee
C
20 - libsexplib-camlp4-dev
21 - menhir and libmenhir-ocaml-dev
22
f537ebc4
C
23On Fedora, install the following packages
24 - ocaml
25 - ocaml-findlib
26 - ocaml-sexplib-devel
27
28Note that on Fedora, there is currently not
29package for menhir and pycaml.
c491d8ee 30
174d1640 31Then simply type
34e49164
C
32 ./configure
33 make depend
34 make
35 make install
36
b1b2de81 37
708f4980
C
38
39
40
174d1640
C
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
44spatch.opt. If you use only one of them, 'make install' will install
45the one you have compiled, either spatch ou spatch.opt, under the
46front-end spatch. You could use 'make world' to compile the bytecode
47and the optimized code version.
48
49We provide the files generated by menhir in the tarball. However,
50'make distclean' will remove them. You could either restore them from
51the tarball or install menhir. Using 'make clean' should be safe with
52regards to these files.
53
54Note: 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
59Coccinelle with at least OCaml version 3.11.
60
61
aba5c457
C
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
174d1640
C
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
708f4980 97
174d1640 98 ** Dependencies for additional tools **
9f8e26f4 99
174d1640 100 git, pushd, popd, sed, diffstat, cpp
aba5c457
C
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