From 2eb2fe897ad172856543e09aee26db4f52090904 Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Thu, 26 Feb 2009 14:27:34 -0700 Subject: Make bootstrap easier on Solaris. * bootstrap: Add GNULIB_SRCDIR. Useful when a wrapper script gnulib-tool exists earlier on the path to work around /bin/sh failure in parsing $GNULIB_SRCDIR/gnulib-tool. Signed-off-by: Eric Blake (cherry picked from commit 90a0154d6ef1effe64c199eb61a06430199aaa91) --- ChangeLog | 7 +++++++ bootstrap | 25 +++++++++++++++---------- 2 files changed, 22 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index 30f1c16e..bd3bfc70 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2009-03-13 Eric Blake + + Make bootstrap easier on Solaris. + * bootstrap: Add GNULIB_SRCDIR. Useful when a wrapper script + gnulib-tool exists earlier on the path to work around /bin/sh + failure in parsing $GNULIB_SRCDIR/gnulib-tool. + 2009-03-13 Eric Blake Allow configuration choice in syscmd shell. diff --git a/bootstrap b/bootstrap index 7bd9f7ee..8bc30213 100755 --- a/bootstrap +++ b/bootstrap @@ -1,7 +1,8 @@ #! /bin/sh -# bootstrap (GNU M4) version 2008-09-16 -# Copyright (C) 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# bootstrap (GNU M4) version 2009-03-13 +# Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Free Software +# Foundation, Inc. # License GPLv3+: GNU GPL version 3 or later # This is free software: you are free to change and redistribute it. # There is NO WARRANTY, to the extent permitted by law. @@ -32,7 +33,8 @@ # You can also set the following variables to help $progname # locate the right tools: -# AUTOPOINT, AUTORECONF, AWK, GNULIB_TOOL, LIBTOOLIZE, M4, RM, SED +# AUTOPOINT, AUTORECONF, AWK, GNULIB_SRCDIR, GNULIB_TOOL, LIBTOOLIZE, +# M4, RM, SED # This script bootstraps a git or CVS checkout of GNU M4 by correctly calling # out to parts of the GNU Build Platform. Currently this requires GNU @@ -398,14 +400,17 @@ ${LIBTOOLIZE} --force --copy --install ## Find the gnulib module tree. ## ## ---------------------------- ## -case $GNULIB_TOOL in +if test -n "$GNULIB_SRCDIR" && test -d "$GNULIB_SRCDIR" ; then + gnulibdir=$GNULIB_SRCDIR +else + case $GNULIB_TOOL in /* ) gnulibdir=$GNULIB_TOOL ;; # absolute */* ) gnulibdir=`pwd`/$GNULIB_TOOL ;; # relative * ) gnulibdir=`which "$GNULIB_TOOL"` ;; # PATH search -esac + esac -# Follow symlinks -while test -h "$gnulibdir"; do + # Follow symlinks + while test -h "$gnulibdir"; do # Resolve symbolic link. sedexpr1='s, -> ,#%%#,' @@ -418,9 +423,9 @@ while test -h "$gnulibdir"; do * ) gnulibdir=`echo "$gnulibdir" | sed -e 's,/[^/]*$,,'`/"$linkval" ;; esac -done - -gnulibdir=`echo "$gnulibdir" | $SED "$dirname"` + done + gnulibdir=`echo "$gnulibdir" | $SED "$dirname"` +fi ## ---------------------- ## -- cgit v1.2.1