From 86b8b0de15c94f9edfd986e4da23c1ea5a7044fe Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Tue, 15 Feb 2000 09:15:22 +0000 Subject: [PATCH] autoreconf had a silly syntax error, test it and fix it. Reported by Franc,ois Pinard and Rainer Orth. * autoreconf.sh: Removed spurious `;;'. Formatting changes. * tests/tools.m4 (Syntax of the scripts): Run `sh -n' on all the shell scripts. --- ChangeLog | 10 ++++++++++ THANKS | 1 + autoreconf.in | 26 +++++++++++++----------- autoreconf.sh | 26 +++++++++++++----------- bin/autoreconf.in | 26 +++++++++++++----------- man/autoreconf.1 | 6 +++--- tests/tools.m4 | 50 +++++++++++++++++++++++++++++++++++++---------- 7 files changed, 99 insertions(+), 46 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1ca33f48..ec78be7f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2000-02-15 Akim Demaille + + autoreconf had a silly syntax error, test it and fix it. + Reported by Franc,ois Pinard and Rainer Orth. + + * autoreconf.sh: Removed spurious `;;'. + Formatting changes. + * tests/tools.m4 (Syntax of the scripts): Run `sh -n' on all the + shell scripts. + 2000-02-15 Akim Demaille * autoconf.sh (options handling): --v* of --version was shadowing diff --git a/THANKS b/THANKS index 5a38057f..1501297d 100644 --- a/THANKS +++ b/THANKS @@ -46,6 +46,7 @@ Noah Friedman friedman@gnu.ai.mit.edu Paul Eggert eggert@twinsun.com Pavel Roskin pavel_roskin@geocities.com Philipp Thomas kthomas@gwdg.de +Rainer Orth ro@TechFak.Uni-Bielefeld.DE Richard Stallman rms@gnu.org Roland McGrath roland@gnu.org Scott Bambrough scottb@corelcomputer.com diff --git a/autoreconf.in b/autoreconf.in index c51cfc0b..0543d1b2 100644 --- a/autoreconf.in +++ b/autoreconf.in @@ -22,9 +22,9 @@ me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: autoreconf [OPTION] ... [TEMPLATE-FILE] -Run \`autoconf' (and \`autoheader' and \`automake', where appropriate) -repeatedly to remake the Autoconf \`configure' scripts and -configuration header templates in the directory tree rooted at the +Run \`autoconf' (and \`autoheader', \`aclocal' and \`automake', where +appropriate) repeatedly to remake the Autoconf \`configure' scripts +and configuration header templates in the directory tree rooted at the current directory. By default, it only remakes those files that are older than their predecessors. If you install a new version of Autoconf, running \`autoreconf' remakes all of the files by giving it @@ -69,6 +69,9 @@ while test $# -gt 0; do case "$1" in --help | --h* | -h ) echo "$usage"; exit 0 ;; + --version | --vers*) + echo "$version"; exit 0 ;; + --localdir=* | --l*=* ) localdir=`echo "$1" | sed -e 's/^[^=]*=//'` shift ;; @@ -77,6 +80,7 @@ while test $# -gt 0; do test $# -eq 0 && { echo "$help" >&2; exit 1; } localdir="${1}" shift ;; + --macrodir=* | --m*=* ) AC_MACRODIR=`echo "$1" | sed -e 's/^[^=]*=//'` shift ;; @@ -85,16 +89,16 @@ while test $# -gt 0; do test $# -eq 0 && { echo "help" >&2; exit 1; } AC_MACRODIR="$1" shift ;; + -v | --verbose | --verb*) verbose=echo; shift ;; -f | --force) force=yes; shift ;; - --version | --vers*) - echo "$version"; exit 0 ;; --cygnus | --foreign | --gnits | --gnu) automake_mode=$1; shift ;; --include-deps | -i) automake_deps=$1; shift ;; + --) # Stop option processing. shift; break ;; -*) @@ -108,14 +112,14 @@ done if test $# -ne 0; then exec >&2 - echo "$me: invalid number of arguments." + echo "$me: invalid number of arguments" echo "$help" - exit 1 ;; + exit 1 fi # The paths to the autoconf and autoheader scripts, at the top of the tree. -top_autoconf=`echo $0|sed s%autoreconf%autoconf%` -top_autoheader=`echo $0|sed s%autoreconf%autoheader%` +top_autoconf=`echo "$0" |sed s%autoreconf%autoconf%` +top_autoheader=`echo "$0" |sed s%autoreconf%autoheader%` # Make a list of directories to process. # The xargs grep filters out Cygnus configure.in files. @@ -248,6 +252,6 @@ while read dir; do done # Local Variables: -# mode:shell-script -# sh-indentation:3 +# mode: shell-script +# sh-indentation: 2 # End: diff --git a/autoreconf.sh b/autoreconf.sh index c51cfc0b..0543d1b2 100644 --- a/autoreconf.sh +++ b/autoreconf.sh @@ -22,9 +22,9 @@ me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: autoreconf [OPTION] ... [TEMPLATE-FILE] -Run \`autoconf' (and \`autoheader' and \`automake', where appropriate) -repeatedly to remake the Autoconf \`configure' scripts and -configuration header templates in the directory tree rooted at the +Run \`autoconf' (and \`autoheader', \`aclocal' and \`automake', where +appropriate) repeatedly to remake the Autoconf \`configure' scripts +and configuration header templates in the directory tree rooted at the current directory. By default, it only remakes those files that are older than their predecessors. If you install a new version of Autoconf, running \`autoreconf' remakes all of the files by giving it @@ -69,6 +69,9 @@ while test $# -gt 0; do case "$1" in --help | --h* | -h ) echo "$usage"; exit 0 ;; + --version | --vers*) + echo "$version"; exit 0 ;; + --localdir=* | --l*=* ) localdir=`echo "$1" | sed -e 's/^[^=]*=//'` shift ;; @@ -77,6 +80,7 @@ while test $# -gt 0; do test $# -eq 0 && { echo "$help" >&2; exit 1; } localdir="${1}" shift ;; + --macrodir=* | --m*=* ) AC_MACRODIR=`echo "$1" | sed -e 's/^[^=]*=//'` shift ;; @@ -85,16 +89,16 @@ while test $# -gt 0; do test $# -eq 0 && { echo "help" >&2; exit 1; } AC_MACRODIR="$1" shift ;; + -v | --verbose | --verb*) verbose=echo; shift ;; -f | --force) force=yes; shift ;; - --version | --vers*) - echo "$version"; exit 0 ;; --cygnus | --foreign | --gnits | --gnu) automake_mode=$1; shift ;; --include-deps | -i) automake_deps=$1; shift ;; + --) # Stop option processing. shift; break ;; -*) @@ -108,14 +112,14 @@ done if test $# -ne 0; then exec >&2 - echo "$me: invalid number of arguments." + echo "$me: invalid number of arguments" echo "$help" - exit 1 ;; + exit 1 fi # The paths to the autoconf and autoheader scripts, at the top of the tree. -top_autoconf=`echo $0|sed s%autoreconf%autoconf%` -top_autoheader=`echo $0|sed s%autoreconf%autoheader%` +top_autoconf=`echo "$0" |sed s%autoreconf%autoconf%` +top_autoheader=`echo "$0" |sed s%autoreconf%autoheader%` # Make a list of directories to process. # The xargs grep filters out Cygnus configure.in files. @@ -248,6 +252,6 @@ while read dir; do done # Local Variables: -# mode:shell-script -# sh-indentation:3 +# mode: shell-script +# sh-indentation: 2 # End: diff --git a/bin/autoreconf.in b/bin/autoreconf.in index c51cfc0b..0543d1b2 100644 --- a/bin/autoreconf.in +++ b/bin/autoreconf.in @@ -22,9 +22,9 @@ me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: autoreconf [OPTION] ... [TEMPLATE-FILE] -Run \`autoconf' (and \`autoheader' and \`automake', where appropriate) -repeatedly to remake the Autoconf \`configure' scripts and -configuration header templates in the directory tree rooted at the +Run \`autoconf' (and \`autoheader', \`aclocal' and \`automake', where +appropriate) repeatedly to remake the Autoconf \`configure' scripts +and configuration header templates in the directory tree rooted at the current directory. By default, it only remakes those files that are older than their predecessors. If you install a new version of Autoconf, running \`autoreconf' remakes all of the files by giving it @@ -69,6 +69,9 @@ while test $# -gt 0; do case "$1" in --help | --h* | -h ) echo "$usage"; exit 0 ;; + --version | --vers*) + echo "$version"; exit 0 ;; + --localdir=* | --l*=* ) localdir=`echo "$1" | sed -e 's/^[^=]*=//'` shift ;; @@ -77,6 +80,7 @@ while test $# -gt 0; do test $# -eq 0 && { echo "$help" >&2; exit 1; } localdir="${1}" shift ;; + --macrodir=* | --m*=* ) AC_MACRODIR=`echo "$1" | sed -e 's/^[^=]*=//'` shift ;; @@ -85,16 +89,16 @@ while test $# -gt 0; do test $# -eq 0 && { echo "help" >&2; exit 1; } AC_MACRODIR="$1" shift ;; + -v | --verbose | --verb*) verbose=echo; shift ;; -f | --force) force=yes; shift ;; - --version | --vers*) - echo "$version"; exit 0 ;; --cygnus | --foreign | --gnits | --gnu) automake_mode=$1; shift ;; --include-deps | -i) automake_deps=$1; shift ;; + --) # Stop option processing. shift; break ;; -*) @@ -108,14 +112,14 @@ done if test $# -ne 0; then exec >&2 - echo "$me: invalid number of arguments." + echo "$me: invalid number of arguments" echo "$help" - exit 1 ;; + exit 1 fi # The paths to the autoconf and autoheader scripts, at the top of the tree. -top_autoconf=`echo $0|sed s%autoreconf%autoconf%` -top_autoheader=`echo $0|sed s%autoreconf%autoheader%` +top_autoconf=`echo "$0" |sed s%autoreconf%autoconf%` +top_autoheader=`echo "$0" |sed s%autoreconf%autoheader%` # Make a list of directories to process. # The xargs grep filters out Cygnus configure.in files. @@ -248,6 +252,6 @@ while read dir; do done # Local Variables: -# mode:shell-script -# sh-indentation:3 +# mode: shell-script +# sh-indentation: 2 # End: diff --git a/man/autoreconf.1 b/man/autoreconf.1 index 4cc9d588..54348af5 100644 --- a/man/autoreconf.1 +++ b/man/autoreconf.1 @@ -6,9 +6,9 @@ autoreconf \- Update generated configuration files .B autoreconf [\fIOPTION\fR] ... [\fITEMPLATE-FILE\fR] .SH DESCRIPTION -Run `autoconf' (and `autoheader' and `automake', where appropriate) -repeatedly to remake the Autoconf `configure' scripts and -configuration header templates in the directory tree rooted at the +Run `autoconf' (and `autoheader', `aclocal' and `automake', where +appropriate) repeatedly to remake the Autoconf `configure' scripts +and configuration header templates in the directory tree rooted at the current directory. By default, it only remakes those files that are older than their predecessors. If you install a new version of Autoconf, running `autoreconf' remakes all of the files by giving it diff --git a/tests/tools.m4 b/tests/tools.m4 index 0c1ae805..a96a29f9 100644 --- a/tests/tools.m4 +++ b/tests/tools.m4 @@ -6,14 +6,40 @@ Autoheader, autoupdate... EOF -dnl actest.m4 AU_ defines OSBOLETE to UPDATED. + +## -------------------------------------------------------- ## +## Check that the shell scripts are syntactically correct. ## +## -------------------------------------------------------- ## + +AT_SETUP(Syntax of the scripts) + +AT_DATA(true, +[[#! /bin/sh +exit 0 +]]) + +chmod +x true + +if (/bin/sh -n ./true) >/dev/null 2>&1; then + AT_CHECK([/bin/sh -n ../autoconf], 0) + AT_CHECK([/bin/sh -n ../autoreconf], 0) + AT_CHECK([/bin/sh -n ../autoupdate], 0) + AT_CHECK([/bin/sh -n ../autoreconf], 0) + AT_CHECK([/bin/sh -n ../ifnames], 0) +fi + +AT_CLEANUP -dnl AH_DEFUN -dnl -------- -dnl -dnl We check that both the AH_DEFUN given in auxiliary files and in -dnl `configure.in' function properly. + + + +## ---------- ## +## AH_DEFUN. ## +## ---------- ## + +# We check that both the AH_DEFUN given in auxiliary files and in +# `configure.in' function properly. AT_SETUP(AH_DEFUN) AT_DATA(configure.in, @@ -43,10 +69,14 @@ AT_CLEANUP(config.hin) -dnl autoupdate -dnl ---------- -dnl -dnl Check that AC_LINK_FILES and AC_OUTPUT are properly updated. + +## ------------ ## +## autoupdate. ## +## ------------ ## + +# Check that AC_LINK_FILES and AC_OUTPUT are properly updated. +# actest.m4 AU_ defines OSBOLETE to UPDATED. + AT_SETUP(autoupdate) AT_DATA(configure.in,