[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
FYI: fix gnulib-tool directory searching [m4--devo--1.0--patch-19]
From: |
Gary V. Vaughan |
Subject: |
FYI: fix gnulib-tool directory searching [m4--devo--1.0--patch-19] |
Date: |
Thu, 7 Jul 2005 13:19:32 +0100 (BST) |
User-agent: |
mailnotify/0.6 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Applied to HEAD.
* looking for address@hidden/m4--devo--1.0--patch-18 to compare with
* comparing to address@hidden/m4--devo--1.0--patch-18
M bootstrap
M ChangeLog
* modified files
Index: Changelog
from Gary V. Vaughan <address@hidden>
* bootstrap: Allow user overriding of gnulib-tool location, and
correctly determine module source directories whether gnulib-tool
is given as a relative or absolute path, or is found by searching
PATH.
Reported by Eric Blake <address@hidden>
--- orig/bootstrap
+++ mod/bootstrap
@@ -1,17 +1,19 @@
#! /bin/sh
# helps bootstrapping M4, when checked out from CVS
-# requires GNU Autoconf, GNU Automake, GNU Gettext and GNU Libtool
+# requires GNU Gettext and bleeding edge GNU Autoconf, Automake & Libtool
+: ${AUTORECONF=autoreconf}
: ${AWK=awk}
-: ${SED=sed}
-: ${RM=rm -f}
: ${GNULIB_TOOL=gnulib-tool}
-: ${AUTORECONF=autoreconf}
+: ${LIBTOOLIZE=libtoolize}
+: ${RM=rm -f}
+: ${SED=sed}
ltdldir=ltdl
config_aux_dir=$ltdldir/config
config_macro_dir=$ltdldir/m4
+bailout_cb=:
# List dependencies here too; we don't extract them, otherwise dependent
# modules could end up being imported to src/ *and* gnu/!
@@ -37,6 +39,47 @@
echo $progname: ${1+"$@"}
}
+# func_error arg...
+# Echo program name prefixed message to standard error.
+func_error ()
+{
+ echo $progname: ${1+"$@"} >&2
+}
+
+
+## ---------------------------- ##
+## Find the gnulib module tree. ##
+## ---------------------------- ##
+
+case $GNULIB_TOOL in
+ /* ) gnulibdir=$GNULIB_TOOL ;; # absolute
+ */* ) gnulibdir=`pwd`/$GNULIB_TOOL ;; # relative
+ * ) gnulibdir=`which "$GNULIB_TOOL"` ;; # PATH search
+esac
+
+# Follow symlinks
+while test -h "$gnulibdir"; do
+
+ # Resolve symbolic link.
+ sedexpr1='s, -> ,#%%#,'
+ sedexpr2='s,^.*#%%#\(.*\)$,\1,p'
+ linkval=`LC_ALL=C ls -l "$gnulibdir" | $SED "$sedexpr1" | $SED -n
"$sedexpr2"`
+ test -n "$linkval" || break
+
+ case "$linkval" in
+ /* ) gnulibdir="$linkval" ;;
+ * ) gnulibdir=`echo "$gnulibdir" | sed -e 's,/[^/]*$,,'`/"$linkval"
;;
+ esac
+
+done
+
+gnulibdir=`echo "$gnulibdir" | $SED "$dirname"`
+
+
+## ---------------------- ##
+## Import Gnulib modules. ##
+## ---------------------- ##
+
func_echo "running: ${GNULIB_TOOL} --import"
${GNULIB_TOOL} --import
@@ -52,8 +95,12 @@
AC_DEFUN([gl_AC_TYPE_UINTMAX_T], [jm_AC_TYPE_UINTMAX_T])
EOF
+
+## --------------------------------- ##
+## Copy additional src only modules. ##
+## --------------------------------- ##
+
func_echo "fetching modules for src directory"
-gnulibdir=`which gnulib-tool | $SED "$dirname"`
for file in `${GNULIB_TOOL} --extract-filelist $src_modules`; do
@@ -66,16 +113,38 @@
;;
esac
- func_echo "copying file \`$dest'"
- cp $gnulibdir/$file $dest
+ # Be sure to show all copying errors before bailing out
+ if test -f $gnulibdir/$file; then
+ func_echo "copying file \`$dest'"
+ cp $gnulibdir/$file $dest
+ else
+ func_error "$gnulibdir/$file does not exist"
+ bailout_cb="exit 1"
+ fi
done
+$bailout_cb
-func_echo "running: libtoolize --ltdl=\"$ltdldir\" --force --copy"
-libtoolize --ltdl="$ltdldir" --force --copy
+
+## ----------- ##
+## Libtoolize. ##
+## ----------- ##
+
+func_echo "running: $LIBTOOLIZE --ltdl=\"$ltdldir\" --force --copy"
+$LIBTOOLIZE --ltdl="$ltdldir" --force --copy
+
+
+## ----------- ##
+## Autoreconf. ##
+## ----------- ##
func_echo "running: $AUTORECONF --force --verbose --install"
$AUTORECONF --force --verbose --install
+
+## ---------- ##
+## testsuite. ##
+## ---------- ##
+
(
func_echo "generating testsuite"
cd tests
- --
Gary V. Vaughan ())_. address@hidden,gnu.org}
Research Scientist ( '/ http://tkd.kicks-ass.net
GNU Hacker / )= http://www.gnu.org/software/libtool
Technical Author `(_~)_ http://sources.redhat.com/autobook
_________________________________________________________
This patch notification generated by tlaapply version 0.9
http://tkd.kicks-ass.net/arch/address@hidden/cvs-utils--tla--1.0
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Darwin)
iD8DBQFCzR3TFRMICSmD1gYRAsUpAKCBZgY2vkuDOp7UWDCHjxUsbrqlQQCguIbW
YBwgTR2LDHwL/O5rv5yt5Lw=
=vBqd
-----END PGP SIGNATURE-----
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- FYI: fix gnulib-tool directory searching [m4--devo--1.0--patch-19],
Gary V. Vaughan <=