]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - mkosi.build
mount-util: shorten the loop a bit (#7545)
[thirdparty/systemd.git] / mkosi.build
index 94a6667e42f77635ee1a67e68b6577057713c669..c2693dedcfa182c5b957425882e3cbfaa4f2a25d 100755 (executable)
 # This is a build script for OS image generation using mkosi (https://github.com/systemd/mkosi).
 # Simply invoke "mkosi" in the project directory to build an OS image.
 
-./autogen.sh c
-make -j `nproc`
-make install
+# If mkosi.builddir/ exists mkosi will set $BUILDDIR to it, let's then use it
+# as out-of-tree build dir. Otherwise, let's make up our own builddir.
+[ -z "$BUILDDIR" ] && BUILDDIR=build
+
+export LC_CTYPE=en_US.UTF-8
+
+sysvinit_path=`realpath /etc/init.d`
+
+[ -f "$BUILDDIR"/build.ninja ] || meson "$BUILDDIR" -D "sysvinit-path=$sysvinit_path" -D default-hierarchy=unified -D man=false
+ninja -C "$BUILDDIR" all
+[ "$WITH_TESTS" = 0 ] || ninja -C "$BUILDDIR" test || ( RET="$?" ; cat "$BUILDDIR"/meson-logs/testlog.txt ; exit "$RET" )
+ninja -C "$BUILDDIR" install
+
+mkdir -p "$DESTDIR"/etc
+
+cat > "$DESTDIR"/etc/issue <<EOF
+\S (built from systemd tree)
+Kernel \r on an \m (\l)
+
+EOF