Move meson to prepare(), to keep the build directory between builds

This greatly speeds up rebuilds when not much has changed and ccache
isn’t used.
This commit is contained in:
Emmanuel Gil Peyrot 2018-10-14 18:48:34 +02:00 committed by Drew DeVault
parent bd8d9da221
commit 54c712fdc1

View File

@ -28,10 +28,13 @@ pkgver() {
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
prepare() {
cd "${srcdir}/${_pkgname}"
meson -Dwerror=false --prefix /usr "$srcdir/build"
}
build() {
cd "${srcdir}/${_pkgname}"
rm -rf "$srcdir/build"
meson -Dwerror=false --prefix /usr "$srcdir/build"
ninja -C "$srcdir/build"
}