]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
Minor improvements in bootstrap script.
authorStefano Lattarini <stefano.lattarini@gmail.com>
Wed, 9 Jun 2010 22:49:26 +0000 (00:49 +0200)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Fri, 11 Jun 2010 04:30:45 +0000 (06:30 +0200)
* bootstrap: Consistently use two-spaces indentation.  Cosmetic
improvement to comments.
($me): New variable, containing program basename.
Prepend it to all error messages.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
ChangeLog
bootstrap

index 710dea6455c8c500af2b33f2ff233a70193ada89..d8623b2809bf2d682bf85c8f8fac77a1b1ebf996 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2010-06-11  Stefano Lattarini  <stefano.lattarini@gmail.com>
 
+       Minor improvements in bootstrap script.
+       * bootstrap: Consistently use two-spaces indentation.  Cosmetic
+       improvement to comments.
+       ($me): New variable, containing program basename.
+       Prepend it to all error messages.
+
        Testsuite now works with BSD make in parallel mode.
        * tests/defs.in: Unset variables __MKLVL__ and MAKE_JOBS_FIFO,
        which are exported by BSD make when run in parallel mode, and
index 2a86345db5d2d652d8c8f249f2463a2dbbd9576d..2e4bedcb13a69ea6380e6a91e1f85600f5fecd39 100755 (executable)
--- a/bootstrap
+++ b/bootstrap
@@ -2,9 +2,9 @@
 
 # This script helps bootstrap automake, when checked out from git.
 #
-# Copyright (C) 2002, 2003, 2004, 2007, 2008  Free Software Foundation,
-# Inc.
-# written by Pavel Roskin <proski@gnu.org> September 2002
+# Copyright (C) 2002, 2003, 2004, 2007, 2008, 2010 Free Software
+# Foundation, Inc.
+# Originally written by Pavel Roskin <proski@gnu.org> September 2002.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -19,7 +19,7 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Find the path separator
+# Find the path separator.
 echo "#! /bin/sh" >boot$$.sh
 echo  "exit 0"   >>boot$$.sh
 chmod +x boot$$.sh
@@ -30,29 +30,32 @@ else
 fi
 rm -f boot$$.sh
 
-# Don't ignore failures
+# Don't ignore failures.
 set -e
 
+# Set program basename.
+me=`echo "$0" | sed 's,^.*/,,'`
+
 # Find perl.  Code based on Autoconf, but without non-POSIX support.
 if test -z "$PERL"; then
-       save_IFS=$IFS
-       IFS=$PATH_SEPARATOR
-       for dir in $PATH; do
-               IFS=$save_IFS
-               test -z "$dir" && dir=.
-               if test -x "$dir/perl" && test ! -d "$dir/perl"; then
-                       PERL="$dir/perl"
-                       break
-               fi
-       done
+  save_IFS=$IFS
+  IFS=$PATH_SEPARATOR
+  for dir in $PATH; do
+    IFS=$save_IFS
+    test -z "$dir" && dir=.
+    if test -x "$dir/perl" && test ! -d "$dir/perl"; then
+      PERL="$dir/perl"
+      break
+    fi
+  done
 fi
 
 if test -z "$PERL"; then
-       echo "Cannot find perl" >&2
-       exit 1
+  echo "$me: cannot find perl" >&2
+  exit 1
 fi
 
-# Variables to substitute
+# Variables to substitute.
 VERSION=`sed -ne '/AC_INIT/s/^[^[]*\[[^[]*\[\([^]]*\)\].*$/\1/p' configure.ac`
 PACKAGE=automake
 datadir=.
@@ -62,35 +65,35 @@ PERL_THREADS=0
 # uses bash, not COMMAND.COM which doesn't quote arguments properly.
 # It's not used otherwise.
 if test -n "$DJDIR"; then
-    BOOTSTRAP_SHELL=/dev/env/DJDIR/bin/bash.exe
+  BOOTSTRAP_SHELL=/dev/env/DJDIR/bin/bash.exe
 else
-    BOOTSTRAP_SHELL=/bin/sh
+  BOOTSTRAP_SHELL=/bin/sh
 fi
 
-# Read the rule for calculating APIVERSION and execute it
+# Read the rule for calculating APIVERSION and execute it.
 apiver_cmd=`sed -ne 's/\[\[/[/g;s/\]\]/]/g;/^APIVERSION=/p' configure.ac`
 eval $apiver_cmd
 
-# Sanity checks
+# Sanity checks.
 if test -z "$VERSION"; then
-       echo "Cannot find VERSION" >&2
-       exit 1
+  echo "$me: cannot find VERSION" >&2
+  exit 1
 fi
 
 if test -z "$APIVERSION"; then
-       echo "Cannot find VERSION" >&2
-       exit 1
+  echo "$me: cannot find VERSION" >&2
+  exit 1
 fi
 
-# Make a dummy versioned directory for aclocal
+# Make a dummy versioned directory for aclocal.
 rm -rf aclocal-$APIVERSION
 mkdir aclocal-$APIVERSION
 if test -d automake-$APIVERSION; then
-       find automake-$APIVERSION -exec chmod u+wx '{}' ';'
+  find automake-$APIVERSION -exec chmod u+wx '{}' ';'
 fi
 rm -rf automake-$APIVERSION
-# Can't use `ln -s lib automake-$APIVERSION',
-# that would create a lib.exe stub under DJGPP 2.03.
+# Can't use `ln -s lib automake-$APIVERSION', that would create a
+# lib.exe stub under DJGPP 2.03.
 mkdir automake-$APIVERSION
 cp -rf lib/* automake-$APIVERSION
 
@@ -111,17 +114,17 @@ dosubst ()
 }
 
 
-# Create temporary replacement for lib/Automake/Config.pm
+# Create temporary replacement for lib/Automake/Config.pm.
 dosubst automake-$APIVERSION/Automake/Config.in \
-       automake-$APIVERSION/Automake/Config.pm
+        automake-$APIVERSION/Automake/Config.pm
 
-# Create temporary replacement for aclocal
+# Create temporary replacement for aclocal.
 dosubst aclocal.in aclocal.tmp
 
-# Overwrite amversion.m4
+# Overwrite amversion.m4.
 dosubst m4/amversion.in m4/amversion.m4
 
-# Create temporary replacement for automake
+# Create temporary replacement for automake.
 dosubst automake.in automake.tmp
 
 # Create tests/parallel-tests.am.
@@ -134,7 +137,7 @@ $PERL ./aclocal.tmp -I m4
 autoconf
 $PERL ./automake.tmp
 
-# Remove temporary files and directories
+# Remove temporary files and directories.
 rm -rf aclocal-$APIVERSION automake-$APIVERSION
 rm -f aclocal.tmp automake.tmp
 rm -f lib/Automake/Config.pm