devel: add script to test out-of-tree builds
authorJani Nikula <jani@nikula.org>
Mon, 11 Sep 2017 17:17:47 +0000 (20:17 +0300)
committerDavid Bremner <david@tethera.net>
Mon, 2 Oct 2017 10:25:06 +0000 (07:25 -0300)
Something I used for 'git bisect run', but we should really add this
as part of our process.

devel/out-of-tree-build-check.sh [new file with mode: 0755]

diff --git a/devel/out-of-tree-build-check.sh b/devel/out-of-tree-build-check.sh
new file mode 100755 (executable)
index 0000000..984b4b5
--- /dev/null
@@ -0,0 +1,15 @@
+#!/bin/sh
+# test out-of-tree builds in a temp directory
+# passes all args to make
+
+set -eu
+
+srcdir="$(cd "$(dirname "$0")"/.. && pwd)"
+builddir=$(mktemp -d)
+
+cd $builddir
+
+$srcdir/configure
+make "$@"
+
+rm -rf $builddir