m4-patches
[Top][All Lists]
Advanced

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

branch-1_4 preparation for release


From: Eric Blake
Subject: branch-1_4 preparation for release
Date: Sat, 15 Jul 2006 15:30:29 -0600
User-agent: Thunderbird 1.5.0.4 (Windows/20060516)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Based on Gary's improvements to ./bootstrap on head, this will make the
1.4.5 release easier.

2006-07-15  Eric Blake  <address@hidden>

        * bootstrap: Backport --help, --version from head.
        (func_update): New function, for easily grabbing up-to-date files
        from gnulib.
        * Makefile.maint (web-manual): Fix for VPATH builds.

- --
Life is short - so eat dessert first!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEuV5084KuGfSFAYARAleTAJ98v7wWi4q3sp37RakC9y/G6x4RjQCgpLrB
hP+lE1aID21upm6mTfjrSlo=
=bCo/
-----END PGP SIGNATURE-----
Index: Makefile.maint
===================================================================
RCS file: /sources/m4/m4/Attic/Makefile.maint,v
retrieving revision 1.1.2.6
diff -u -p -r1.1.2.6 Makefile.maint
--- Makefile.maint      13 Jul 2006 12:50:47 -0000      1.1.2.6
+++ Makefile.maint      15 Jul 2006 21:26:38 -0000
@@ -181,7 +181,7 @@ XDELTA_OPTIONS = -9
 
 .PHONY: delta-xdelta
 delta-xdelta: prev-tarball new-tarball got-xdelta
-## Generate the delta file (xdelta has wierd exit statuses, so we need to
+## Generate the delta file (xdelta has weird exit statuses, so we need to
 ## add some shell code to keep make happy), and then generate the signatures
 ## for FSF ftp-upload:
        ofile="$(PACKAGE)-$(LASTRELEASE)-$(VERSION).xdelta"; \
@@ -196,7 +196,7 @@ delta-xdelta: prev-tarball new-tarball g
 
 .PHONY: web-manual
 web-manual:
-       @cd ./doc; \
+       @cd "$(abs_srcdir)/doc"; \
          $(SHELL) "$(abs_srcdir)/gendocs.sh" $(PACKAGE) \
            "GNU $(PACKAGE)- GNU macro processor"
        @echo " *** Upload the doc/manual directory to web-cvs."
Index: bootstrap
===================================================================
RCS file: /sources/m4/m4/bootstrap,v
retrieving revision 1.31.2.2
diff -u -p -r1.31.2.2 bootstrap
--- bootstrap   15 Jun 2006 13:08:45 -0000      1.31.2.2
+++ bootstrap   15 Jul 2006 21:26:38 -0000
@@ -1,11 +1,47 @@
 #! /bin/sh
 
-# Helps bootstrapping M4, when checked out from CVS.
-# Requires GNU Autoconf 2.59 or later, GNU Automake 1.9.6 or later,
-# and a recent CVS checkout of gnulib.
+# bootstrap (GNU M4) version 2006-07-15
+# Written by Gary V. Vaughan  <address@hidden>
+
+# Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
+# This is free software; see the source for copying conditions.  There is NO
+# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+# 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
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, a copy can be downloaded from
+# http://www.gnu.org/copyleft/gpl.html, or by writing to the Free
+# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+# MA 02110-1301, USA.
+
+# Usage: $progname [options]
+
+# -v      --version          print version information
+# -h,-?   --help             print short or long help message
+
+# You can also set the following variables to help $progname
+# locate the right tools:
+#   AUTORECONF, GNULIB_TOOL, RM, SED
+
+# This script bootstraps a CVS checkout of GNU M4 by correctly
+# calling out to parts of the GNU Build Platform.  Currently this
+# requires GNU Autoconf 2.60, GNU Automake 1.9.6, and bleeding edge
+# CVS snapshots of GNU Gnulib.
+
+# Report bugs to <address@hidden>
 
 : ${AUTORECONF=autoreconf}
 : ${GNULIB_TOOL=gnulib-tool}
+: ${RM=rm -f}
 : ${SED=sed}
 
 dirname="s,/[^/]*$,,"
@@ -20,6 +56,7 @@ progpath="$0"
 
 # The name of this program:
 progname=`echo "$progpath" | $SED "$basename"`
+PROGRAM=bootstrap
 
 # func_echo arg...
 # Echo program name prefixed message.
@@ -34,21 +71,189 @@ func_echo ()
 func_error ()
 {
     echo $progname: ${1+"$@"} >&2
-    exit 1
 }
 
+# func_fatal_error arg...
+# Echo program name prefixed message to standard error, and exit.
+func_fatal_error ()
+{
+    func_error ${1+"$@"}
+    exit $EXIT_FAILURE
+}
+
+# func_verbose arg...
+# Echo program name prefixed message in verbose mode only.
+func_verbose ()
+{
+    $opt_verbose && func_error ${1+"$@"}
+}
+
+# func_missing_arg argname
+# Echo program name prefixed message to standard error and set global
+# exit_cmd.
+func_missing_arg ()
+{
+   func_error "missing argument for $1"
+   exit_cmd=exit
+}
+
+# func_fatal_help arg...
+# Echo program name prefixed message to standard error, followed by
+# a help hint, and exit.
+func_fatal_help ()
+{
+    func_error ${1+"$@"}
+    func_fatal_error "Try \`$progname --help' for more information."
+}
+
+# func_missing_arg argname
+# Echo program name prefixed message to standard error and set global
+# exit_cmd.
+func_missing_arg ()
+{
+   func_error "missing argument for $1"
+   exit_cmd=exit
+}
+
+# func_usage
+# Echo short help message to standard output and exit.
+func_usage ()
+{
+    $SED '/^# Usage:/,/# -h/ {
+        s/^# //; s/^# *$//;
+       s/\$progname/'$progname'/;
+       p;
+    }; d' < "$progpath"
+    echo
+    echo "run \`$progname --help | more' for full usage"
+    exit $EXIT_SUCCESS
+}
+
+# func_help
+# Echo long help message to standard output and exit.
+func_help ()
+{
+    $SED '/^# Usage:/,/# Report bugs to/ {
+        s/^# //; s/^# *$//;
+       s/\$progname/'$progname'/;
+       p;
+     }; d' < "$progpath"
+    exit $EXIT_SUCCESS
+}
+
+# func_version
+# Echo version message to standard output and exit.
+func_version ()
+{
+    $SED '/^# '$PROGRAM' (GNU /,/# warranty; / {
+        s/^# //; s/^# *$//;
+        s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/;
+        p;
+     }; d' < "$progpath"
+     exit $EXIT_SUCCESS
+}
+
+# func_update
+# Copy $1 to $2 if it is newer.
+func_update ()
+{
+  if test -f "$2" && cmp -s "$1" "$2" ; then
+    func_verbose "$2 is up-to-date"
+  else
+    func_echo "copying $1 -> $2"
+    cp "$1" "$2"
+  fi
+}
+
+# Parse options once, thoroughly.  This comes as soon as possible in
+# the script to make things like `bootstrap --version' happen quickly.
+{
+  # sed scripts:
+  my_sed_single_opt='1s/^\(..\).*$/\1/;q'
+  my_sed_single_rest='1s/^..\(.*\)$/\1/;q'
+  my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q'
+  my_sed_long_arg='1s/^--[^=]*=//'
+
+  # this just eases exit handling
+  while test $# -gt 0; do
+    opt="$1"
+    shift
+    case $opt in
+      # Separate optargs to short options:
+      -\?|-h)          func_usage                                      ;;
+      --help)          func_help                                       ;;
+      --version)       func_version                                    ;;
+      --)              break                                           ;;
+      -*)              func_fatal_help "unrecognized option \`$opt'"   ;;
+      *)               set -- "$opt" ${1+"$@"};        break           ;;
+    esac
+  done
+
+  # Bail if the options were screwed
+  $exit_cmd $EXIT_FAILURE
+}
+
+## ---------------------------- ##
+## 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} --update"
-${GNULIB_TOOL} --update || func_error "gnulib-tool failed"
+func_echo "running: $GNULIB_TOOL --update"
+$GNULIB_TOOL --update || func_fatal_error "gnulib-tool failed"
 
 ## ----------- ##
 ## Autoreconf. ##
 ## ----------- ##
 
 func_echo "running: $AUTORECONF --force --verbose --install"
-$AUTORECONF --force --verbose --install || func_error "autoreconf failed"
+$AUTORECONF --force --verbose --install || func_fatal_error "autoreconf failed"
+
+## ---------------------------------------- ##
+## Gnulib is more up-to-date than automake. ##
+## ---------------------------------------- ##
+
+func_update "$gnulibdir"/build-aux/config.guess config.guess
+func_update "$gnulibdir"/build-aux/config.sub config.sub
+func_update "$gnulibdir"/build-aux/depcomp depcomp
+func_update "$gnulibdir"/build-aux/install-sh install-sh
+func_update "$gnulibdir"/build-aux/mdate-sh doc/mdate-sh
+func_update "$gnulibdir"/build-aux/missing missing
+func_update "$gnulibdir"/build-aux/texinfo.tex doc/texinfo.tex
+func_update "$gnulibdir"/doc/COPYING COPYING
+func_update "$gnulibdir"/doc/INSTALL INSTALL
 
 exit 0
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "# bootstrap (GNU M4) version "
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "$"
+# End:

reply via email to

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