diff options
author | Lennart Poettering <lennart@poettering.net> | 2017-07-18 09:46:08 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-18 09:46:08 +0200 |
commit | 5230e31918a939e503536ecb6b2a83f55181e9f8 (patch) | |
tree | 65ccd6b3c94b27cb1bcfc7417ba9a4df2375e2a7 | |
parent | 6253abca7e849df79e6ee1ccd2f947a43ababc3e (diff) | |
parent | 70e760e3a73bf7b39fceb6a4c3ed09d055b591b5 (diff) | |
download | systemd-5230e31918a939e503536ecb6b2a83f55181e9f8.tar.gz |
Merge pull request #6349 from poettering/mkosi-builddir
mkosi builddir support
-rw-r--r-- | .gitignore | 12 | ||||
-rwxr-xr-x | mkosi.build | 16 |
2 files changed, 18 insertions, 10 deletions
diff --git a/.gitignore b/.gitignore index 8c4331e54f..aa20b80602 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ *.log *.o *.plist +*.py[co] *.stamp *.swp *.trs @@ -39,6 +40,8 @@ /exported-* /hostnamectl /image.raw +/image.raw.cache-pre-dev +/image.raw.cache-pre-inst /install-tree /journalctl /libtool @@ -46,6 +49,8 @@ /localectl /loginctl /machinectl +/mkosi.builddir/ +/mkosi.cache/ /mtd_probe /networkctl /scsi_id @@ -182,7 +187,6 @@ /test-daemon /test-date /test-device-nodes -/test-dnssec-complex /test-dhcp-client /test-dhcp-option /test-dhcp-server @@ -191,6 +195,7 @@ /test-dns-domain /test-dns-packet /test-dnssec +/test-dnssec-complex /test-efi-disk.img /test-ellipsize /test-engine @@ -252,9 +257,9 @@ /test-ndisc-rs /test-netlink /test-netlink-manual -/test-networkd-conf /test-network /test-network-tables +/test-networkd-conf /test-ns /test-nss /test-parse-util @@ -280,10 +285,10 @@ /test-seccomp /test-selinux /test-set -/test-sizeof /test-sigbus /test-signal-util /test-siphash24 +/test-sizeof /test-sleep /test-socket-util /test-stat-util @@ -316,7 +321,6 @@ /v4l_id Makefile.in __pycache__/ -*.py[co] aclocal.m4 config.h config.h.in diff --git a/mkosi.build b/mkosi.build index 2231118da5..a36460c6f5 100755 --- a/mkosi.build +++ b/mkosi.build @@ -20,15 +20,19 @@ # 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. +# 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=C.UTF-8 -meson build -ninja -C build all -ninja -C build test -ninja -C build install +test -f "$BUILDDIR"/build.ninja || meson "$BUILDDIR" +ninja -C "$BUILDDIR" all +ninja -C "$BUILDDIR" test +ninja -C "$BUILDDIR" install -mkdir -p $DESTDIR/etc +mkdir -p "$DESTDIR"/etc -cat > $DESTDIR/etc/issue <<EOF +cat > "$DESTDIR"/etc/issue <<EOF \S (built from systemd tree) Kernel \r on an \m (\l) |