]> granicus.if.org Git - cronie/commitdiff
build-sys: add autotools helper script
authorSami Kerola <kerolasa@iki.fi>
Sat, 24 Nov 2012 10:18:54 +0000 (10:18 +0000)
committerTomas Mraz <tmraz@fedoraproject.org>
Mon, 26 Nov 2012 15:57:53 +0000 (16:57 +0100)
The script will help building when source code is checked out from git.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
autogen.sh [new file with mode: 0755]

diff --git a/autogen.sh b/autogen.sh
new file mode 100755 (executable)
index 0000000..088cfe5
--- /dev/null
@@ -0,0 +1,29 @@
+#!/bin/bash
+#
+# Generate autotool stuff, when code is checked out from SCM.
+
+SCRIPT_INVOCATION_SHORT_NAME=${0##*/}
+set -e # exit on errors
+# trap ERR is bashism, do not change shebang!
+trap 'echo "${SCRIPT_INVOCATION_SHORT_NAME}: exit on error"; exit 1' ERR
+set -o pipefail # make pipe writer failure to cause exit on error
+
+msg() {
+       echo "${SCRIPT_INVOCATION_SHORT_NAME}: ${@}"
+}
+
+test -f src/cron.c || {
+       msg "You must run this script in the top-level cronie directory"
+       exit 1
+}
+
+rm -rf autom4te.cache
+
+aclocal $AL_OPTS
+autoconf $AC_OPTS
+autoheader $AH_OPTS
+automake --add-missing $AM_OPTS
+
+msg "Now type './configure' and 'make' to compile."
+
+exit 0