Skip to content

Commit 942d377

Browse files
committed
meson: adjust our documentation to mention meson instead of autoconf
Signed-off-by: Pavel Hrdina <[email protected]> Reviewed-by: Peter Krempa <[email protected]> Reviewed-by: Neal Gompa <[email protected]>
1 parent 7e5d771 commit 942d377

8 files changed

+52
-78
lines changed

CONTRIBUTING.rst

+4-5
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,12 @@ your git clone run:
1212

1313
::
1414

15-
$ mkdir build && cd build
16-
$ ../autogen.sh
17-
$ make
15+
$ meson build
16+
$ ninja -C build
1817

1918
You'll find the freshly-built document in ``docs/contribute.html``.
2019

21-
If ``configure`` fails because of missing dependencies, you can set
20+
If ``meson setup`` fails because of missing dependencies, you can set
2221
up your system by calling
2322

2423
::
@@ -39,7 +38,7 @@ to run
3938

4039
::
4140

42-
$ sudo dnf install gcc make libtool autoconf automake rpm-build
41+
$ sudo dnf install gcc make ninja-build rpm-build
4342

4443
You might still be missing some dependencies if your distribution is
4544
shipping an old libvirt version, but that will get you much closer to

docs/advanced-tests.rst

+6-7
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ The basic requirement before submitting changes to libvirt is that
66

77
::
88

9-
$ make check
10-
$ make syntax-check
9+
$ ninja test
1110

1211
succeed after each commit.
1312

@@ -17,7 +16,7 @@ by running
1716

1817
::
1918

20-
$ make -C tests valgrind
19+
$ meson test --setup valgrind
2120

2221
`Valgrind <http://valgrind.org/>`__ is a test that checks for
2322
memory management issues, such as leaks or use of uninitialized
@@ -27,13 +26,13 @@ Some tests are skipped by default in a development environment,
2726
based on the time they take in comparison to the likelihood
2827
that those tests will turn up problems during incremental
2928
builds. These tests default to being run when building from a
30-
tarball or with the configure option --enable-expensive-tests;
29+
tarball or with the configure option -Dexpensive_tests=enabled;
3130
you can also force a one-time toggle of these tests by setting
3231
VIR_TEST_EXPENSIVE to 0 or 1 at make time, as in:
3332

3433
::
3534

36-
$ make check VIR_TEST_EXPENSIVE=1
35+
$ VIR_TEST_EXPENSIVE=1 ninja test
3736

3837
If you encounter any failing tests, the VIR_TEST_DEBUG
3938
environment variable may provide extra information to debug the
@@ -42,8 +41,8 @@ amounts of information:
4241

4342
::
4443

45-
$ VIR_TEST_DEBUG=1 make check (or)
46-
$ VIR_TEST_DEBUG=2 make check
44+
$ VIR_TEST_DEBUG=1 ninja test (or)
45+
$ VIR_TEST_DEBUG=2 ninja test
4746

4847
When debugging failures during development, it is possible to
4948
focus in on just the failing subtests by using VIR_TEST_RANGE.

docs/best-practices.rst

+2-3
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,8 @@ with minimal back-and-forth.
2525
self-contained if possible, with an explanation of each patch
2626
and an explanation of how the sequence of patches fits
2727
together. Moreover, please keep in mind that it's required to
28-
be able to compile cleanly (**including**
29-
``make check`` and ``make syntax-check``) after each
30-
patch. A feature does not have to work until the end of a
28+
be able to compile cleanly (**including** ``ninja test``) after
29+
each patch. A feature does not have to work until the end of a
3130
series, but intermediate patches must compile and not cause
3231
test-suite failures (this is to preserve the usefulness of
3332
``git bisect``, among other things).

docs/committer-guidelines.rst

+6-7
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,19 @@ objection on the list it should be good to go. If the patch
1212
touches a part of the code where you're not the main maintainer,
1313
or where you do not have a very clear idea of how things work,
1414
it's better to wait for a more authoritative feedback though.
15-
Before committing, please also rebuild locally, run 'make check
16-
syntax-check', and make sure you don't raise errors.
15+
Before committing, please also rebuild locally, run 'ninja test',
16+
and make sure you don't raise errors.
1717

1818
An exception to 'review and approval on the list first' is fixing
1919
failures to build:
2020

2121
- if a recently committed patch breaks compilation on a platform
2222
or for a given driver, then it's fine to commit a minimal fix
2323
directly without getting the review feedback first
24-
- if make check or make syntax-check breaks, if there is an
25-
obvious fix, it's fine to commit immediately. The patch should
26-
still be sent to the list (or tell what the fix was if
27-
trivial), and 'make check syntax-check' should pass too, before
28-
committing anything
24+
- if ninja test breaks, if there is an obvious fix, it's fine to
25+
commit immediately. The patch should still be sent to the list
26+
(or tell what the fix was if trivial), and 'ninja test' should
27+
pass too, before committing anything
2928
- fixes for documentation and code comments can be managed in the
3029
same way, but still make sure they get reviewed if non-trivial.
3130
- (ir)regular pulls from other repositories or automated updates,

docs/compiling.html.in

+18-24
Original file line numberDiff line numberDiff line change
@@ -9,51 +9,49 @@
99
<h2><a id="compiling">Compiling a release tarball</a></h2>
1010

1111
<p>
12-
libvirt uses the standard configure/make/install steps and mandates
12+
libvirt uses the standard setup/build/install steps and mandates
1313
that the build directory is different that the source directory:
1414
</p>
1515

1616
<pre>
1717
$ xz -c libvirt-x.x.x.tar.xz | tar xvf -
1818
$ cd libvirt-x.x.x
19-
$ mkdir build &amp;&amp; cd build
20-
$ ../configure</pre>
19+
$ meson build</pre>
2120

2221
<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
2423
behaviour.
2524
</p>
2625

2726
<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:
3028
</p>
3129

3230
<pre>
33-
$ ../configure <i>--help</i></pre>
31+
$ meson configure</pre>
3432

3533
<p>
3634
When you have determined which options you want to use (if any),
3735
continue the process.
3836
</p>
3937

4038
<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
4240
below. Using sudo is only required when installing to a location your
4341
user does not have write access to. Installing to a system location
4442
is a good example of this.
4543
</p>
4644

4745
<p>
4846
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
5048
without putting <b>sudo</b> before it.
5149
</p>
5250

5351
<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>
5755

5856
<p>
5957
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>
6361
<h2><a id="building">Building from a GIT checkout</a></h2>
6462

6563
<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
7066
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.
7268
</p>
7369

7470
<p>To build &amp; install libvirt to your home
7571
directory the following commands can be run:
7672
</p>
7773

7874
<pre>
79-
$ mkdir build &amp;&amp; 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>
8378

8479
<p>
8580
Be aware though, that binaries built with a custom prefix will not
@@ -89,9 +84,8 @@ $ <b>sudo</b> make install</pre>
8984
</p>
9085

9186
<pre>
92-
$ mkdir build &amp;&amp; cd build
93-
$ ../autogen.sh --system
94-
$ make
87+
$ meson build -Dsystem=true
88+
$ ninja -C build
9589
</pre>
9690

9791
<p>

docs/hacking.rst

+1-2
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ changes. That is:
3030

3131
::
3232

33-
$ make check
34-
$ make syntax-check
33+
$ ninja test
3534

3635
These tests help making sure that your changes don't introduce
3736
regressions in libvirt, as well as validating that any new code

docs/strategy.html.in

+7-20
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,12 @@
2222
in the C language.</dd>
2323
<dt>Python</dt>
2424
<dd>Various supporting build/test scripts are written in Python, with
25-
compatibility for Python 2 and 3.</dd>
25+
compatibility for Python 3.</dd>
2626
<dt>Perl</dt>
2727
<dd>Various supporting build/test scripts are written in Perl. It is
2828
also used for many syntax-check inline rules</dd>
2929
<dt>Shell</dt>
30-
<dd><code>configure</code>, generated by autoconf, is a shell script.
31-
Shell is also used for some simple build/test scripts. At runtime
30+
<dd>Shell is used for some simple build/test scripts. At runtime
3231
libvirt avoids shell except when using SSH tunnels to a remote
3332
host</dd>
3433
<dt>XSLT</dt>
@@ -38,14 +37,10 @@
3837
<dt>HTML</dt>
3938
<dd>The website documentation is all written in plain HTML. Some HTML
4039
is also auto-generated for API documentation</dd>
41-
<dt>M4</dt>
42-
<dd>The autoconf <code>configure</code> script uses a large number of
43-
M4 macros to generate its content</dd>
40+
<dt>Meson</dt>
41+
<dd>The core build system uses the new Meson build system</dd>
4442
<dt>make</dt>
45-
<dd>The core build system uses the traditional GNU make recipes</dd>
46-
<dt>automake</dt>
47-
<dd>The make recipes use automake's language extensions which are
48-
then turned into regular make rules</dd>
43+
<dd>The syntax-check uses make recipes</dd>
4944
<dt>awk/sed</dt>
5045
<dd>A number of the syntax-check inline rules involve use of awk/sed
5146
scripts</dd>
@@ -58,8 +53,8 @@
5853
The wide range of languages used present a knowledge burden for
5954
developers involved in libvirt, especially when there are multiple
6055
languages all used in the same problem spaces. This is most notable
61-
in the build system which uses a combination of shell, M4, make,
62-
automake, awk, sed, Perl and Python, with debugging requiring
56+
in the build system which uses a combination of Meson, shell, awk,
57+
sed, Perl and Python, with debugging requiring
6358
understanding of the interactions between many languages. The
6459
popularity of Perl has declined, while Python has become
6560
more popular. This directly influences the amount and quality of
@@ -119,14 +114,6 @@
119114
code.
120115
</p>
121116

122-
<p>
123-
The Meson build system is written in Python 3. This directly informs the
124-
choice of Python 3 as the language for all supporting build scripts,
125-
re-inforcing the other benefits of Python over Perl, Shell, M4,
126-
automake, etc. There is no intention to support Python 2 given Meson's
127-
requirement for Python 3.
128-
</p>
129-
130117
<p>
131118
Using the RST format for documentation allows for the use of XSLT to be
132119
eliminated from the build process. RST and the Sphinx toolkit are widely

docs/windows.html.in

+8-10
Original file line numberDiff line numberDiff line change
@@ -180,16 +180,14 @@
180180
</p>
181181

182182
<pre>
183-
mkdir build &amp;&amp; cd build
184-
../configure \
185-
--without-sasl \
186-
--without-polkit \
187-
--without-python \
188-
--without-libxl \
189-
--without-qemu \
190-
--without-lxc \
191-
--without-openvz \
192-
--without-libvirtd
183+
meson build \
184+
-Dsasl=disabled \
185+
-Dpolkit=disabled \
186+
-Ddriver_libxl=disabled \
187+
-Ddriver_qemu=disabled \
188+
-Ddriver_lxc=disabled \
189+
-Ddriver_openvz=disabled \
190+
-Ddriver_libvirtd=disabled
193191
</pre>
194192

195193
</body>

0 commit comments

Comments
 (0)