aboutsummaryrefslogtreecommitdiff
path: root/README.meson.md
blob: 2ebf620f196cfe4620c896a0bc1c8cf567ad40a3 (plain) (blame)
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
# Meson build system

DISCLAIMER: This is a work in progress. The meson build system will be maintained for a brief period alongside autotools.

## Motivation

  - We want to build a single, monolithic library libgnunet that is easier to use in, for example, mobile apps.
  - Autotools is complex and difficult to use. It also causes stale builds. Meson has a better developer experience.
  - Meson supports dynamic pkg-config generation.
  - Meson does out-of-tree builds
  - Meson makes it (almost) impossible to create dist tarballs that miss files/do not compile.


## Reasons to drop it again

  - Meson does not seem to support (automatic) dependency version detection without pkg-config.


## TODOs

  - Migrate tests
  - Portability defines set implicitly in configure.ac need to be identified and ported to meson.
  - Some (experimental) subsystems not yet ported.
  - 1:1 match of installed files must be verified.
  - Documentation must be updated.

## Use

To compile run:

```
$ meson setup $builddir
$ cd $builddir
$ meson configure -Dprefix=$PFX -Dexperimental=$BOOL
$ meson compile
```

to install:

```
$ meson install
```

to make tarball (runs tests unless specified to skip):

```
$ meson dist
```

to uninstall:

```
$ ninja uninstall
```

## Test

You can run the tests as:

```
$ meson test
```

you can run individual tests as:

```
$ meson test $TESTNAME
```

for example:


```
$ meson test test_gnsrecord_crypto
```

you can run test suites for components as:


```
$ meson test --suite util
```

performance tests are not included by default.
To also have performance tests available use the ```full``` setup:

```
$ meson test --setup full
```

You can use this switch also when running suites or individual tests.

## Open issues

  - All tests are always built: https://github.com/mesonbuild/meson/pull/6511
  - libtool versioning is different from soversion and version in meson