summaryrefslogtreecommitdiff
path: root/autogen.sh
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2018-03-22 19:55:31 +0100
committerWerner Koch <wk@gnupg.org>2018-03-22 19:55:31 +0100
commit1b30d21c8780f5510815d4fb2523afad9fff85dc (patch)
tree28272712d8e2731bb9aafe45c4e6a5c3bd967b79 /autogen.sh
parent020c2fbb2871b34b16c62b31c7cb91aa5f750532 (diff)
downloadlibgpg-error-1b30d21c8780f5510815d4fb2523afad9fff85dc.tar.gz
build: Add option --git-build to autogen.sh
Diffstat (limited to 'autogen.sh')
-rwxr-xr-xautogen.sh26
1 files changed, 25 insertions, 1 deletions
diff --git a/autogen.sh b/autogen.sh
index 4b511bf..23d27f3 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -85,9 +85,10 @@ if test x"$1" = x"--help"; then
echo " --silent Silent operation"
echo " --force Pass --force to autoconf"
echo " --find-version Helper for configure.ac"
- echo " --build-TYPE Configure to cross build for TYPE"
+ echo " --git-build Run all commands to build from a Git"
echo " --print-host Print only the host triplet"
echo " --print-build Print only the build platform triplet"
+ echo " --build-TYPE Configure to cross build for TYPE"
echo ""
echo " ARGS are passed to configure in --build-TYPE mode."
echo " Configuration for this script is expected in autogen.rc"
@@ -159,6 +160,10 @@ case "$1" in
SILENT=" --silent"
shift
;;
+ --git-build)
+ myhost="git-build"
+ shift
+ ;;
--build-w32)
myhost="w32"
shift
@@ -187,6 +192,25 @@ esac
die_p
+# **** GIT BUILD ****
+# This is a helper to build from git.
+if [ "$myhost" = "git-build" ]; then
+ tmp="$(pwd)"
+ cd "$tsdir" || fatal "error cd-ing to $tsdir"
+ ./autogen.sh || fatal "error running ./autogen.sh"
+ cd "$tmp" || fatal "error cd-ing back to $tmp"
+ die_p
+ "$tsdir"/configure || fatal "error running $tsdir/configure"
+ die_p
+ make || fatal "error running make"
+ die_p
+ make check || fatal "error running male check"
+ die_p
+ exit 0
+fi
+# **** end GIT BUILD ****
+
+
# Source our configuration
if [ -f "${tsdir}/autogen.rc" ]; then
. "${tsdir}/autogen.rc"