forked from coccinelle/coccinelle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.txt
111 lines (70 loc) · 2.85 KB
/
install.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
** Compilation **
You must first install a recent version of
- OCaml (at least 3.09.2),
see http://caml.inria.fr/download.en.html
At least, OCaml 3.11 is required to use the OCaml scripting
feature in the SmPL code.
- The Menhir parser generator (at least 20080912),
see http://cristal.inria.fr/~fpottier/menhir/
(unless you got a version of the coccinelle source with
the SmPL parser pre-generated)
- Python and its development files (python-dev)
(unless you run configure with the --without-python option)
On Debian/Ubuntu, install the following packages
- ocaml-native-compilers (or alternatively ocaml)
- ocaml-findlib
- libpycaml-ocaml-dev
- libsexplib-camlp4-dev
- menhir and libmenhir-ocaml-dev
On Fedora, install the following packages
- ocaml
- ocaml-findlib
- ocaml-sexplib-devel
Note that on Fedora, there is currently not
package for menhir and pycaml.
Then simply type
./configure
make depend
make
make install
'make' will compile the bytecode version by default. You could use
'make all.opt' to have the optimized version. If you compile both,
'make install' will take care of that and install both, spatch and
spatch.opt. If you use only one of them, 'make install' will install
the one you have compiled, either spatch ou spatch.opt, under the
front-end spatch. You could use 'make world' to compile the bytecode
and the optimized code version.
We provide the files generated by menhir in the tarball. However,
'make distclean' will remove them. You could either restore them from
the tarball or install menhir. Using 'make clean' should be safe with
regards to these files.
Note: The test target is intended for developers. In particular, you
should not expect that every test will pass.
In order to use the OCaml scripting feature in SmPL, you must compile
Coccinelle with at least OCaml version 3.11.
** Bash integration **
To have completion under Bash, you can execute the following command:
make install-bash
It will install the shell script 'scripts/spatch.bash_completion'
in /etc/bash_completion.d/spatch
You can manually copy that file elsewhere if you have a different
bash_completion directory.
** Runtime dependencies **
- Basic shell commands:
- ls, cat, cp, mv, rm, grep, mkdir, find
- Developper tool: diff
** Optional runtime dependencies **
- To quickly apply the semantic patches
- glimpse indexer
- To use OCaml scripting feature in SmPL
- ocaml-native-compilers or ocaml-nox
- ocaml-findlib
- To generate a PDF of the control flow graph with '-graphical_trace'
- pdftk and graphviz (with PDF support)
** Dependencies for additional tools **
git, pushd, popd, sed, diffstat, cpp
** Uninstall **
To uninstall Coccinelle, you should use the following command
make uninstall
To also remove the bash completion script, run
make uninstall-bash