@@ -33,55 +33,95 @@ packages.
33
33
34
34
Building from the [ libsigc++ release tarball] ( https://github.com/libsigcplusplus/libsigcplusplus/releases ) is easier than building from git.
35
35
36
+ It's easiest to build with Meson, if the tarball was made with Meson,
37
+ and to build with Autotools, if the tarball was made with Autotools.
38
+ Then you don't have to use maintainer-mode.
39
+
40
+ How do you know how the tarball was made? If it was made with Meson,
41
+ it contains files in untracked/build_scripts/, untracked/docs/ and possibly
42
+ other subdirectories of untracked/.
43
+
36
44
### Building from a tarball with Meson
37
45
46
+ Don't call the builddir 'build'. There is a directory called 'build' with
47
+ files used by Autotools.
48
+
38
49
For instance:
39
50
``` sh
40
- $ meson --prefix /usr/local --libdir lib yourbuilddir .
41
- $ cd yourbuilddir
51
+ # If the tarball was made with Autotools, you must enable maintainer-mode:
52
+ $ meson --prefix=/usr/local --libdir=lib -Dmaintainer-mode=true your_builddir .
53
+ # If the tarball was made with Meson:
54
+ $ meson --prefix=/usr/local --libdir=lib your_builddir .
55
+
56
+ # then
57
+ $ cd your_builddir
42
58
$ ninja
43
59
$ ninja install
60
+ # You can run the tests like so:
61
+ $ ninja test
44
62
```
45
63
46
- ### Building from a tarball with autotools
64
+ ### Building from a tarball with Autotools
47
65
48
66
For instance:
49
67
``` sh
68
+ # If the tarball was made with Autotools:
50
69
$ ./configure --prefix=/usr/local
70
+ # If the tarball was made with Meson, you must enable maintainer-mode:
71
+ $ ./autogen.sh --prefix=/usr/local
72
+
73
+ # then
51
74
$ make
52
75
$ make install
76
+ # You can build the examples and tests, and run the tests, like so:
77
+ $ make check
53
78
```
54
79
55
80
## Building from git
56
81
57
82
Building from git can be difficult so you should prefer building from a release
58
83
tarball unless you need to work on the libsigc++ code itself.
59
84
60
- To build from git you may use either the meson build (added in December 2019),
61
- the autotools build (used by most developers in the past) or CMake (should work too ).
85
+ jhbuild can be a good help. See the [ jhbuild repo ] ( https://gitlab.gnome.org/GNOME/jhbuild )
86
+ and the [ jhbuild wiki ] ( https://wiki.gnome.org/Projects/Jhbuild ) .
62
87
63
88
### Building from git with Meson
64
89
65
- You must have meson properly installed (meson, ninja, etc) and you
90
+ You must have Meson properly installed (meson, ninja, etc) and you
66
91
will also need [ mm-common] ( https://gitlab.gnome.org/GNOME/mm-common/ )
67
92
version 1.0.0 or higher.
68
93
94
+ Maintainer-mode is enabled by default when you build from a git clone.
95
+
96
+ Don't call the builddir 'build'. There is a directory called 'build' with
97
+ files used by Autotools.
98
+
69
99
``` sh
70
- $ meson --prefix /usr/local --libdir lib yourbuilddir .
71
- $ cd yourbuilddir
100
+ $ meson --prefix= /usr/local --libdir= lib your_builddir .
101
+ $ cd your_builddir
72
102
$ ninja
103
+ $ ninja install
104
+ # You can run the tests like so:
73
105
$ ninja test
106
+ # You can create a tarball like so:
107
+ $ ninja dist
74
108
```
75
109
76
- ### Building from git with autotools
110
+ ### Building from git with Autotools
77
111
78
- You must have autotools properly installed (autoconf, automake, etc) and you
112
+ You must have Autotools properly installed (autoconf, automake, etc) and you
79
113
will also need [ mm-common] ( https://gitlab.gnome.org/GNOME/mm-common/ ) .
80
114
81
115
``` sh
82
116
$ ./autogen.sh --prefix=/usr/local
83
117
$ make
118
+ $ make install
119
+ # You can build the examples and tests, and run the tests, like so:
84
120
$ make check
121
+ # You can create a tarball like so:
122
+ $ make distcheck
123
+ # or
124
+ $ make dist
85
125
```
86
126
87
127
### Building from git with CMake
0 commit comments