mkosi.build: Silence "Entering directory" message from ninja
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Sat, 9 Jan 2021 16:32:00 +0000 (17:32 +0100)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Sat, 9 Jan 2021 17:05:57 +0000 (18:05 +0100)
When using `ninja -C "$BUILDDIR"`, ninja prints an annoying log
message about entering the directory that cannot be silenced. Let's
manually move in and out of the build directory instead.

mkosi.build

index 5da5207fb5ea6808d77d7824ac4a785c7c08acf6..0e90480c6dcb414a98b6ca953e60abd94810ecfa 100755 (executable)
@@ -87,14 +87,16 @@ if [ ! -f "$BUILDDIR"/build.ninja ] ; then
         meson "$BUILDDIR" -D "sysvinit-path=$sysvinit_path" -D "rootprefix=$rootprefix" -D man=false -D "nobody-user=$nobody_user" -D "nobody-group=$nobody_group"
 fi
 
-ninja -C "$BUILDDIR" all
+cd "$BUILDDIR"
+ninja
 if [ "$WITH_TESTS" = 1 ] ; then
         for id in 1 2 3; do
                 groupadd -g $id testgroup$id || :
         done
 
-        ninja -C "$BUILDDIR" test
+        ninja test
 fi
+cd "$SRCDIR"
 
 # Ubuntu Focal is stuck with meson 0.53.0.
 if [ "$(meson -v | cut -d . -f 2)" -gt 53 ] ; then