Full rebuild (ie. clean + build)

6,815 views
Skip to first unread message

johne53

unread,
Jun 7, 2018, 6:02:05 AM6/7/18
to The Meson Build System
I installed Meson a few months ago and used it to build a library called FriBiDi but I haven't had much cause to use Meson recently.

I just ran Meson and Ninja again and I was surprised to find that they hardly built anything (i.e.  the FriBiDi build is mostly still up-to-date).

Is there any way to force a full rebuild? Or to perform a "clean" operation (so that the next build will rebuild fully?)

Tim Müller

unread,
Jun 7, 2018, 6:19:18 AM6/7/18
to johne53, The Meson Build System
On Thu, 2018-06-07 at 03:02 -0700, johne53 wrote:

Hi John,

This will clean the build dir:

$ ninja -C builddir clean

This will force a reconfigure:

$ ninja -C builddir reconfigure

But you may also just as well nuke the entire builddir and just do a
fresh meson build from scratch:

$ [delete builddir]
$ meson builddir
$ ninja -C builddir

(Which you may have to do anyway when you upgrade the Meson version.)

Fribidi is a small codebase, so a build from scratch takes only a few
seconds in any case.

Cheers
-Tim

--
Tim Müller, Centricular Ltd - http://www.centricular.com

johne53

unread,
Jun 7, 2018, 9:03:58 AM6/7/18
to The Meson Build System
Thanks Tim,

What's confusing me is that if I just run meson (on FriBiDi) it produces 24 files. Running ninja then increases that to 201 files. But performing a 'clean' only gets rid of 63 files. It's probably not important but it's just got me a bit puzzled.
Reply all
Reply to author
Forward
0 new messages