9
9
<h2 ><a id =" compiling" >Compiling a release tarball</a ></h2 >
10
10
11
11
<p >
12
- libvirt uses the standard configure/make /install steps and mandates
12
+ libvirt uses the standard setup/build /install steps and mandates
13
13
that the build directory is different that the source directory:
14
14
</p >
15
15
16
16
<pre >
17
17
$ xz -c libvirt-x.x.x.tar.xz | tar xvf -
18
18
$ cd libvirt-x.x.x
19
- $ mkdir build && cd build
20
- $ ../configure</pre >
19
+ $ meson build</pre >
21
20
22
21
<p >
23
- The <i >configure </i > script can be given options to change its default
22
+ The <i >meson </i > script can be given options to change its default
24
23
behaviour.
25
24
</p >
26
25
27
26
<p >
28
- To get the complete list of the options it can take, pass it the
29
- <i >--help</i > option like this:
27
+ To get the complete list of the options run the following command:
30
28
</p >
31
29
32
30
<pre >
33
- $ ../configure < i >--help</ i > </pre >
31
+ $ meson configure </pre >
34
32
35
33
<p >
36
34
When you have determined which options you want to use (if any),
37
35
continue the process.
38
36
</p >
39
37
40
38
<p >
41
- Note the use of <b >sudo</b > with the <i >make install</i > command
39
+ Note the use of <b >sudo</b > with the <i >ninja install</i > command
42
40
below. Using sudo is only required when installing to a location your
43
41
user does not have write access to. Installing to a system location
44
42
is a good example of this.
45
43
</p >
46
44
47
45
<p >
48
46
If you are installing to a location that your user <i >does</i > have write
49
- access to, then you can instead run the <i >make install</i > command
47
+ access to, then you can instead run the <i >ninja install</i > command
50
48
without putting <b >sudo</b > before it.
51
49
</p >
52
50
53
51
<pre >
54
- $ ../configure <i >[possible options]</i >
55
- $ make
56
- $ <b >sudo</b > <i >make install</i ></pre >
52
+ $ meson build <i >[possible options]</i >
53
+ $ ninja -C build
54
+ $ <b >sudo</b > <i >ninja -C build install</i ></pre >
57
55
58
56
<p >
59
57
At this point you <b >may</b > have to run ldconfig or a similar utility
@@ -63,23 +61,20 @@ $ <b>sudo</b> <i>make install</i></pre>
63
61
<h2 ><a id =" building" >Building from a GIT checkout</a ></h2 >
64
62
65
63
<p >
66
- The libvirt build process uses GNU autotools, so after obtaining a
67
- checkout it is necessary to generate the configure script and Makefile.in
68
- templates using the <code >autogen.sh</code > command. By default when
69
- the <code >configure</code > script is run from within a GIT checkout, it
64
+ The libvirt build process uses Meson build system. By default when
65
+ the <code >meson</code > is run from within a GIT checkout, it
70
66
will turn on -Werror for builds. This can be disabled with
71
- --disable- werror, but this is not recommended.
67
+ --werror=false , but this is not recommended.
72
68
</p >
73
69
74
70
<p >To build & install libvirt to your home
75
71
directory the following commands can be run:
76
72
</p >
77
73
78
74
<pre >
79
- $ mkdir build && cd build
80
- $ ../autogen.sh --prefix=$HOME/usr
81
- $ make
82
- $ <b >sudo</b > make install</pre >
75
+ $ meson build --prefix=$HOME/usr
76
+ $ ninja -C build
77
+ $ <b >sudo</b > ninja -C build install</pre >
83
78
84
79
<p >
85
80
Be aware though, that binaries built with a custom prefix will not
@@ -89,9 +84,8 @@ $ <b>sudo</b> make install</pre>
89
84
</p >
90
85
91
86
<pre >
92
- $ mkdir build && cd build
93
- $ ../autogen.sh --system
94
- $ make
87
+ $ meson build -Dsystem=true
88
+ $ ninja -C build
95
89
</pre >
96
90
97
91
<p >
0 commit comments