m4-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

nicer bootstrap


From: Eric Blake
Subject: nicer bootstrap
Date: Thu, 26 Feb 2009 21:17:40 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

I recently gained access to a Solaris 10 machine, and had a tough time 
bootstrapping m4.  gnulib-tool won't run under Solaris /bin/sh, so I wrote a 
wrapper script to invoke it with bash.  But since we tried to grab files 
relative to gnulib-tool, and the wrapper script lived in a different directory, 
things fell apart.  I solved this by adding GNULIB_SRCDIR, the same variable 
used in coreutils' bootstrap script.


From: Eric Blake <address@hidden>
Date: Thu, 26 Feb 2009 10:26:22 -0700
Subject: [PATCH] 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 <address@hidden>
---
 ChangeLog |    7 +++++++
 bootstrap |   25 ++++++++++++++-----------
 2 files changed, 21 insertions(+), 11 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 1124a5e..696493c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2009-02-26  Eric Blake  <address@hidden>
+
+       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-02-19  Eric Blake  <address@hidden>

        Fix regression in translit.
diff --git a/bootstrap b/bootstrap
index f3a672e..1c558a7 100755
--- a/bootstrap
+++ b/bootstrap
@@ -1,10 +1,10 @@
 #! /bin/sh

-# bootstrap (GNU M4) version 2008-09-16
+# bootstrap (GNU M4) version 2009-02-26
 # Written by Gary V. Vaughan  <address@hidden>

-# Copyright (C) 2004, 2005, 2006, 2007, 2008 Free Software Foundation,
-# Inc.
+# Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Free Software
+# Foundation, Inc.

 # This file is part of GNU M4.
 #
@@ -29,7 +29,7 @@

 # You can also set the following variables to help $progname
 # locate the right tools:
-#   AUTORECONF, GNULIB_TOOL, M4, RM, SED
+#   AUTORECONF, GNULIB_SRCDIR, GNULIB_TOOL, 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
@@ -254,14 +254,17 @@ fi
 ## 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, -> ,#%%#,'
@@ -274,9 +277,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

 ## ---------------------- ##
 ## Import Gnulib modules. ##
-- 
1.6.1.2







reply via email to

[Prev in Thread] Current Thread [Next in Thread]