From: Sami Kerola Date: Sat, 24 Nov 2012 10:18:54 +0000 (+0000) Subject: build-sys: add autotools helper script X-Git-Tag: cronie1.4.10~21 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=89ea16617f274dc73e3211f82b968a474f826d9f;p=cronie build-sys: add autotools helper script The script will help building when source code is checked out from git. Signed-off-by: Sami Kerola --- diff --git a/autogen.sh b/autogen.sh new file mode 100755 index 0000000..088cfe5 --- /dev/null +++ b/autogen.sh @@ -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