Re: Equivalent of recursive make with meson/ninja?
- From: Sébastien Wilmet <swilmet gnome org>
- To: desktop-devel-list gnome org
- Subject: Re: Equivalent of recursive make with meson/ninja?
- Date: Sat, 11 Feb 2017 14:02:19 +0100
On Sat, Feb 11, 2017 at 11:54:40AM +0000, Tim-Philipp Müller wrote:
With meson/ninja, everything will end up in one single build.ninja file
(the equivalent to a Makefile).
You'd just do
touch foo.c
ninja
In two different terminal tabs though.
and it will only recompile/relink the bits that have changed, and
nothing else. It will be very very fast in most cases.
It'll also relink all the tests and rebuild the docs (GTK-Doc is very
slow).
You can also do:
touch foo.c
ninja -C ../build
if you prefer to be in the source dir.
Too long to type.
If you haven't got a full build yet and only want to build a single
target without building more than absolutely needed you can also just
do
ninja -C ../build src/libfoobar.so.1.2.3
or somesuch (tab completion for targets should just work if you have
the right bits installed), but I'd expect that the normal use case is
that you do a full build and then just rebuild when things change.
Yes I always do a full build first. autogen.sh/configure takes a lot of
time compared to meson, but once the full build is done, I just run make
commands which is fast enough.
You'll also notice that 'ninja' is near-instantaneous if there are no
changes, compared to recursive make which can take tens of seconds to
do nothing in that case. (Just as a data point, why the recursive ninja
thing is not really needed.)
What I don't like to do is to scroll up the build output to see the
warnings I'm interested in.
--
Sébastien
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]