X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=build-aux%2Fbootstrap;h=2087bab8fc534834a3edb5476fc644fd5abff432;hb=78008cd2e8a58cda0d3c279ba0ee20dbd7598317;hp=53f3817d362bcf9b38fadca742635c05ddb3f27b;hpb=9c9af489440fbc63e4c5eeb21b21aa5aa4520394;p=gnulib.git diff --git a/build-aux/bootstrap b/build-aux/bootstrap index 53f3817d3..2087bab8f 100755 --- a/build-aux/bootstrap +++ b/build-aux/bootstrap @@ -49,7 +49,7 @@ Options: not to have been checked out. --skip-po Do not download po files. -If the file bootstrap.conf exists in the current working directory, its +If the file $0.conf exists in the same directory as this script, its contents are read as shell variables to configure the bootstrap. Running without arguments will suffice in most cases. @@ -146,7 +146,13 @@ copy=false vc_ignore=auto # Override the default configuration, if necessary. -test -r bootstrap.conf && . ./bootstrap.conf +# Make sure that bootstrap.conf is sourced from the current directory +# if we were invoked as "sh bootstrap". +case "$0" in + */*) test -r "$0.conf" && . "$0.conf" ;; + *) test -r "$0.conf" && . ./"$0.conf" ;; +esac + if test "$vc_ignore" = auto; then vc_ignore= @@ -218,6 +224,20 @@ fi echo "$0: Bootstrapping from checked-out $package sources..." +# See if we can use gnulib's git-merge-changelog merge driver. +if test -d .git && (git --version) >/dev/null 2>/dev/null ; then + if git config merge.merge-changelog.driver >/dev/null ; then + : + elif (git-merge-changelog --version) >/dev/null 2>/dev/null ; then + echo "initializing git-merge-changelog driver" + git config merge.merge-changelog.name 'GNU-style ChangeLog merge driver' + git config merge.merge-changelog.driver 'git-merge-changelog %O %A %B' + else + echo "consider installing git-merge-changelog from gnulib" + fi +fi + + cleanup_gnulib() { status=$? rm -fr gnulib @@ -242,7 +262,8 @@ case ${GNULIB_SRCDIR--} in trap cleanup_gnulib 1 2 13 15 - git clone --depth 2 git://git.sv.gnu.org/gnulib || + git clone --help|grep depth > /dev/null && shallow='--depth 2' || shallow= + git clone $shallow git://git.sv.gnu.org/gnulib || cleanup_gnulib trap - 1 2 13 15 @@ -577,8 +598,16 @@ for command in \ 'automake --add-missing --copy --force-missing'; do if test "$command" = libtool; then - grep '^[ ]*AM_PROG_LIBTOOL\>' configure.ac >/dev/null || - continue + use_libtool=0 + # We'd like to use grep -E, to see if any of LT_INIT, + # AC_PROG_LIBTOOL, AM_PROG_LIBTOOL is used in configure.ac, + # but that's not portable enough (e.g., for Solaris). + grep '^[ ]*A[CM]_PROG_LIBTOOL' configure.ac >/dev/null \ + && use_libtool=1 + grep '^[ ]*LT_INIT' configure.ac >/dev/null \ + && use_libtool=1 + test $use_libtool = 0 \ + && continue command='libtoolize -c -f' fi echo "$0: $command ..."