]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - mkosi.build
Add x-systemd.makefs option for fstab
[thirdparty/systemd.git] / mkosi.build
index 872841eb63e39e0b2386c46c9c22558646666713..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`
+# 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
 
-make check
-make install
+export LC_CTYPE=en_US.UTF-8
 
-mkdir -p $DESTDIR/etc
+sysvinit_path=`realpath /etc/init.d`
 
-cat > $DESTDIR/etc/issue <<EOF
+[ -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)