diff options
author | Werner Koch <wk@gnupg.org> | 2014-01-09 19:14:09 +0100 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2014-01-10 11:11:13 +0100 |
commit | 99a48b2fcdf7c33fe553511c12f2ebb8eea5c634 (patch) | |
tree | 480af2728ba62d6c4d105f1c1269439c81a9779f /build-aux/build-all.sh | |
parent | Improve the speedo make script. (diff) | |
download | gnupg2-99a48b2fcdf7c33fe553511c12f2ebb8eea5c634.tar.xz gnupg2-99a48b2fcdf7c33fe553511c12f2ebb8eea5c634.zip |
Rename scripts/ to build-aux/
* scripts/: Rename to build-aux/
* Makefile.am: Adjust accordingly.
* configure.ac (AC_CONFIG_AUX_DIR): Change to build-aux.
Diffstat (limited to 'build-aux/build-all.sh')
-rwxr-xr-x | build-aux/build-all.sh | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/build-aux/build-all.sh b/build-aux/build-all.sh new file mode 100755 index 000000000..23af6203d --- /dev/null +++ b/build-aux/build-all.sh @@ -0,0 +1,65 @@ +#! /bin/bash +# A simple script to build all parts of GnuPG from the git repos. +# +# Copyright 2011 Free Software Foundation, Inc. +# +# This file is free software; as a special exception the author gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. +# +# This file is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +# Run this in another window: +#tail -n0 -F ~/tmp/gpg-tmp/b/{libgpg-error,libksba,libassuan,libgcrypt,gnupg}.log & + +p=$HOME/tmp/gpg-tmp +parts="libgpg-error libassuan libksba libgcrypt gnupg" +die=no +here="`pwd`" + +# Reject unsafe characters in $PWD and $HOME. We consider spaces as +# unsafe because it is too easy to get scripts wrong in this regard. +am_lf=' +' +case $here in + *[\;\\\"\#\$\&\'\`$am_lf\ \ ]*) + echo "unsafe working directory: \`$here'"; die=yes;; +esac +case $HOME in + *[\;\\\"\#\$\&\'\`$am_lf\ \ ]*) + echo "unsafe home directory: \`$HOME'"; die=yes;; +esac +test $die = yes && exit 1 + +# Check that all components are available +for i in $parts; do + if test -d $i ; then + : + else + die=yes + echo "component $i missing" + fi +done +test $die = yes && exit 1 + +mkdir $p || exit 1 +mkdir $p/b || exit 1 +for i in $parts; do + mkdir $p/b/$i || exit 1 +done + +export PATH=$p/bin:$PATH +export LD_LIBRARY_PATH=$p/lib + +prev= +cfg="configure --enable-maintainer-mode --prefix=$p" +for i in $parts; do + echo $i... + test -n "$prev" && cfg="$cfg --with-$prev-prefix=$p" + (cd $p/b/$i && eval $here/$i/$cfg && make && make check && make install) \ + > $p/b/$i.log 2>&1 \ + || { echo FAIL; break; } + prev=$i +done |