]> git.notmuchmail.org Git - notmuch/blobdiff - devel/out-of-tree-build-check.sh
devel: add script to test out-of-tree builds
[notmuch] / devel / out-of-tree-build-check.sh
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