]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
More uniform style is scripts.
authorAkim Demaille <akim@epita.fr>
Mon, 13 Mar 2000 17:26:21 +0000 (17:26 +0000)
committerAkim Demaille <akim@epita.fr>
Mon, 13 Mar 2000 17:26:21 +0000 (17:26 +0000)
* autoheader.sh: s/-eq/=/.
Uniform ordering of variable initializations, option handling.
Don't use quotes where useless (foo=$1, not foo="$1").
Propagate `run_m4' and `run_m4f'.
Use `$0' in --help.
* autoconf.sh: Likewise.
* autoreconf.sh: Likewise.
* autoupdate.sh: Likewise.
* ifnames.sh: Likewise.
* autoupdate.m4: Small bug: at the end `dnl' is disabled, so use
`m4_dnl'.

14 files changed:
ChangeLog
autoconf.in
autoconf.sh
autoheader.in
autoheader.sh
autoreconf.in
autoreconf.sh
autoupdate.m4
bin/autoconf.in
bin/autoheader.in
bin/autoreconf.in
bin/ifnames.in
ifnames.in
ifnames.sh

index 5d40d68a5b423e66e912c4429d6cd8a3443cdb77..383c30cb8e080144b4213f3c6619d4b493a5e501 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2000-03-13  Akim Demaille  <akim@epita.fr>
+
+       More uniform style is scripts.
+
+       * autoheader.sh: s/-eq/=/.
+       Uniform ordering of variable initializations, option handling.
+       Don't use quotes where useless (foo=$1, not foo="$1").
+       Propagate `run_m4' and `run_m4f'.
+       Use `$0' in --help.
+       * autoconf.sh: Likewise.
+       * autoreconf.sh: Likewise.
+       * autoupdate.sh: Likewise.
+       * ifnames.sh: Likewise.
+       * autoupdate.m4: Small bug: at the end `dnl' is disabled, so use
+       `m4_dnl'.
+
 2000-03-13  Akim Demaille  <akim@epita.fr>
 
        `autoconf --trace': faster.
index 6303fc57d490f205b257270f1ad216acd4b47cbf..b9f0a0b0e5c4d236d42716ba22875bc24abd01d1 100644 (file)
@@ -117,16 +117,20 @@ while test $# -gt 0 ; do
        echo "$version" ; exit 0 ;;
     --help | --h* | -h )
        echo "$usage"; exit 0 ;;
+
     --debug | --d* | -d )
        debug=:; shift ;;
+    --verbose | --verb* | -v )
+       verbose=echo
+       shift;;
 
     --localdir=* | --l*=* )
        localdir=`echo "$1" | sed -e 's/^[^=]*=//'`
        shift ;;
     --localdir | --l* | -l )
        shift
-       test $# -eq 0 && { echo "$help" >&2; exit 1; }
-       localdir="$1"
+       test $# = 0 && { echo "$help" >&2; exit 1; }
+       localdir=$1
        shift ;;
 
     --macrodir=* | --m*=* )
@@ -134,22 +138,18 @@ while test $# -gt 0 ; do
        shift ;;
     --macrodir | --m* | -m )
        shift
-       test $# -eq 0 && { echo "$help" >&2; exit 1; }
-       AC_MACRODIR="$1"
+       test $# = 0 && { echo "$help" >&2; exit 1; }
+       AC_MACRODIR=$1
        shift ;;
 
     --install )
        task=install
        shift;;
 
-    --verbose | --verb* | -v )
-       verbose=echo
-       shift;;
-
     --trace | -t )
        task=trace
        shift
-       test $# -eq 0 && { echo "$help" >&2; exit 1; }
+       test $# = 0 && { echo "$help" >&2; exit 1; }
        traces="$traces '$1'"
        shift ;;
     --trace=* )
@@ -162,8 +162,8 @@ while test $# -gt 0 ; do
 
     --output | -o )
        shift
-       test $# -eq 0 && { echo "$help" >&2; exit 1; }
-       outfile="$1"
+       test $# = 0 && { echo "$help" >&2; exit 1; }
+       outfile=$1
        shift ;;
     --output=* )
        outfile=`echo "$1" | sed -e 's/^[^=]*=//'`
@@ -192,7 +192,7 @@ run_m4f="$M4 $use_localdir --reload $AC_MACRODIR/autoconf.m4f"
 case $# in
   0) infile=configure.in
      test $task = script && test "x$outfile" = x && outfile=configure;;
-  1) infile="$1" ;;
+  1) infile=$1 ;;
   *) exec >&2
      echo "$me: invalid number of arguments."
      echo "$help"
@@ -201,8 +201,8 @@ esac
 
 # Trap on 0 to stop playing with `rm'.
 if $debug; then
-  trap 'ah_status=$?
-        rm -f $tmpin $tmpout $silent_m4 $trace_m4 && exit $ah_status' 0
+  trap 'status=$?
+        rm -f $tmpin $tmpout $silent_m4 $trace_m4 && exit $status' 0
   trap exit 1 2 13 15
 fi
 
@@ -242,7 +242,7 @@ case $task in
     sed -n "s/^[^#]*\\($pattern[_A-Za-z0-9]*\\).*/\\1/p" $tmpout |
       while read macro; do
        grep -n "^[^#]*$macro" $infile /dev/null
-       test $? -eq 1 && echo "***BUG in Autoconf--please report*** $macro"
+       test $? = 1 && echo "***BUG in Autoconf--please report*** $macro"
       done | sort -u >&2
     status=1
   fi
index 6303fc57d490f205b257270f1ad216acd4b47cbf..b9f0a0b0e5c4d236d42716ba22875bc24abd01d1 100644 (file)
@@ -117,16 +117,20 @@ while test $# -gt 0 ; do
        echo "$version" ; exit 0 ;;
     --help | --h* | -h )
        echo "$usage"; exit 0 ;;
+
     --debug | --d* | -d )
        debug=:; shift ;;
+    --verbose | --verb* | -v )
+       verbose=echo
+       shift;;
 
     --localdir=* | --l*=* )
        localdir=`echo "$1" | sed -e 's/^[^=]*=//'`
        shift ;;
     --localdir | --l* | -l )
        shift
-       test $# -eq 0 && { echo "$help" >&2; exit 1; }
-       localdir="$1"
+       test $# = 0 && { echo "$help" >&2; exit 1; }
+       localdir=$1
        shift ;;
 
     --macrodir=* | --m*=* )
@@ -134,22 +138,18 @@ while test $# -gt 0 ; do
        shift ;;
     --macrodir | --m* | -m )
        shift
-       test $# -eq 0 && { echo "$help" >&2; exit 1; }
-       AC_MACRODIR="$1"
+       test $# = 0 && { echo "$help" >&2; exit 1; }
+       AC_MACRODIR=$1
        shift ;;
 
     --install )
        task=install
        shift;;
 
-    --verbose | --verb* | -v )
-       verbose=echo
-       shift;;
-
     --trace | -t )
        task=trace
        shift
-       test $# -eq 0 && { echo "$help" >&2; exit 1; }
+       test $# = 0 && { echo "$help" >&2; exit 1; }
        traces="$traces '$1'"
        shift ;;
     --trace=* )
@@ -162,8 +162,8 @@ while test $# -gt 0 ; do
 
     --output | -o )
        shift
-       test $# -eq 0 && { echo "$help" >&2; exit 1; }
-       outfile="$1"
+       test $# = 0 && { echo "$help" >&2; exit 1; }
+       outfile=$1
        shift ;;
     --output=* )
        outfile=`echo "$1" | sed -e 's/^[^=]*=//'`
@@ -192,7 +192,7 @@ run_m4f="$M4 $use_localdir --reload $AC_MACRODIR/autoconf.m4f"
 case $# in
   0) infile=configure.in
      test $task = script && test "x$outfile" = x && outfile=configure;;
-  1) infile="$1" ;;
+  1) infile=$1 ;;
   *) exec >&2
      echo "$me: invalid number of arguments."
      echo "$help"
@@ -201,8 +201,8 @@ esac
 
 # Trap on 0 to stop playing with `rm'.
 if $debug; then
-  trap 'ah_status=$?
-        rm -f $tmpin $tmpout $silent_m4 $trace_m4 && exit $ah_status' 0
+  trap 'status=$?
+        rm -f $tmpin $tmpout $silent_m4 $trace_m4 && exit $status' 0
   trap exit 1 2 13 15
 fi
 
@@ -242,7 +242,7 @@ case $task in
     sed -n "s/^[^#]*\\($pattern[_A-Za-z0-9]*\\).*/\\1/p" $tmpout |
       while read macro; do
        grep -n "^[^#]*$macro" $infile /dev/null
-       test $? -eq 1 && echo "***BUG in Autoconf--please report*** $macro"
+       test $? = 1 && echo "***BUG in Autoconf--please report*** $macro"
       done | sort -u >&2
     status=1
   fi
index 204fb4d0a8f452388ceda0e43f08a2cf7a3c71b3..b6192d7fed3d561bfaf11337a47922d880bf103f 100644 (file)
@@ -62,14 +62,6 @@ if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
 
-test -z "${AC_MACRODIR}" && AC_MACRODIR=@datadir@
-test -z "${M4}" && M4=@M4@
-case "${M4}" in
-/*) # Handle the case that m4 has moved since we were configured.
-    # It may have been found originally in a build directory.
-    test -f "${M4}" || M4=m4 ;;
-esac
-
 # ac_LF_and_DOT
 # We use echo to avoid assuming a particular line-breaking character.
 # The extra dot is to prevent the shell from consuming trailing
@@ -79,54 +71,83 @@ esac
 # would break.
 ac_LF_and_DOT=`echo; echo .`
 
-localdir=.
+# Find GNU m4.
+# Handle the case that m4 has moved since we were configured.
+# It may have been found originally in a build directory.
+: ${M4=@M4@}
+case "$M4" in
+/*) test -f "$M4" || M4=m4 ;;
+esac
+# Some non-GNU m4's don't reject the --help option, so give them /dev/null.
+case `$M4 --help </dev/null 2>&1` in
+*reload-state*);;
+*) echo "$me: Autoconf requires GNU m4 1.4 or later" >&2; exit 1 ;;
+esac
+
+# Variables.
+: ${AC_MACRODIR=@datadir@}
 debug=false
+localdir=.
+verbose=:
 # Basename for temporary files.
 : ${TMPDIR=/tmp}
-ah_base=$TMPDIR/ah$$
-tmpout=$ah_base.out
+tmpbase=$TMPDIR/ah$$
+tmpout=$tmpbase.out
 
 while test $# -gt 0 ; do
-   case "$1" in
-      -h | --help | --h* )
-         echo "$usage"; exit 0 ;;
-      --version | --v* )
-         echo "$version"; exit 0 ;;
-      -d | --debug | --d* )
-         debug=:; shift ;;
-      --localdir=* | --l*=* )
-         localdir=`echo "$1" | sed -e 's/^[^=]*=//'`
-         shift ;;
-      -l | --localdir | --l*)
-         shift
-         test $# -eq 0 && { echo "$help" >&2; exit 1; }
-         localdir=$1
-         shift ;;
-      --macrodir=* | --m*=* )
-         AC_MACRODIR=`echo "$1" | sed -e 's/^[^=]*=//'`
-         shift ;;
-      -m | --macrodir | --m* )
-         shift
-         test $# -eq 0 && { echo "$help" >&2; exit 1; }
-         AC_MACRODIR=$1
-         shift ;;
-      -- )     # Stop option processing
-        shift; break ;;
-      - )     # Use stdin as input.
-        break ;;
-      -* )
-        exec >&2
-        echo "$me: invalid option $1"
-        echo "$help"
-        exit 1 ;;
-      * )
-        break ;;
-   esac
+  case "$1" in
+    --version | --vers* | -V )
+       echo "$version" ; exit 0 ;;
+    --help | --h* | -h )
+       echo "$usage"; exit 0 ;;
+
+    --debug | --d* | -d )
+       debug=:; shift ;;
+    --verbose | --verb* | -v )
+       verbose=echo
+       shift;;
+
+    --localdir=* | --l*=* )
+       localdir=`echo "$1" | sed -e 's/^[^=]*=//'`
+       shift ;;
+    --localdir | --l* | -l )
+       shift
+       test $# = 0 && { echo "$help" >&2; exit 1; }
+       localdir=$1
+       shift ;;
+
+    --macrodir=* | --m*=* )
+       AC_MACRODIR=`echo "$1" | sed -e 's/^[^=]*=//'`
+       shift ;;
+    --macrodir | --m* | -m )
+       shift
+       test $# = 0 && { echo "$help" >&2; exit 1; }
+       AC_MACRODIR=$1
+       shift ;;
+
+    -- )     # Stop option processing
+      shift; break ;;
+    - )     # Use stdin as input.
+      break ;;
+    -* )
+      exec >&2
+      echo "$me: invalid option $1"
+      echo "$help"
+      exit 1 ;;
+    * )
+      break ;;
+  esac
 done
 
+# Running m4.
+test -n "$localdir" && use_localdir="-I$localdir"
+run_m4="$M4 $use_localdir -I $AC_MACRODIR autoheader.m4"
+run_m4f="$M4 $use_localdir --reload $AC_MACRODIR/autoheader.m4f"
+
 acconfigs=
 test -r $localdir/acconfig.h && acconfigs="$acconfigs $localdir/acconfig.h"
 
+# Find the input file.
 case $# in
   0) infile=configure.in ;;
   1) infile=$1 ;;
@@ -136,30 +157,18 @@ case $# in
      exit 1 ;;
 esac
 
-config_h=
-syms=
-
-if test "$localdir" != .; then
-  use_localdir="-I$localdir -DAC_LOCALDIR=$localdir"
-else
-  use_localdir=
-fi
-
-# Some non-GNU m4's don't reject the --help option, so give them /dev/null.
-case `$M4 --help < /dev/null 2>&1` in
-*reload-state*);;
-*) echo "$me: Autoconf requires GNU m4 1.4 or later" >&2; exit 1 ;;
-esac
-run_m4="$M4 --reload $AC_MACRODIR/autoheader.m4f $use_localdir"
-
 # Trap on 0 to stop playing with `rm'.
-$debug || trap 'ah_status=$?; rm -f $ah_base* && exit $ah_status' 0
+$debug || trap 'status=$?; rm -f $tmpbase* && exit $status' 0
 $debug || trap exit 1 2 13 15
 
+# Well, work now!
+config_h=
+syms=
+
 # Extract assignments of `ah_verbatim_SYMBOL' from the modified
 # autoconf processing of the input file.  The sed hair is necessary to
 # win for multi-line macro invocations.
-$run_m4 $infile >$ah_base.exp
+$run_m4 $infile >$tmpbase.exp
 sed -n -e '
        : again
        /^@@@.*@@@$/s/^@@@\(.*\)@@@$/\1/p
@@ -168,9 +177,9 @@ sed -n -e '
                n
                s/^/@@@/
                b again
-       }' $ah_base.exp >$ah_base.decls
-. $ah_base.decls
-$debug || rm -f $ah_base.exp $ah_base.decls
+       }' $tmpbase.exp >$tmpbase.decls
+. $tmpbase.decls
+$debug || rm -f $tmpbase.exp $tmpbase.decls
 
 # Make SYMS newline-separated rather than blank-separated, and remove dups.
 # Start each symbol with a blank (to match the blank after "#undef")
@@ -227,7 +236,7 @@ if test -n "$syms"; then
   # Some fgrep's have limits on the number of lines that can be in the
   # pattern on the command line, so use a temporary file containing the
   # pattern.
-  (fgrep_tmp=$ah_base.fgrep
+  (fgrep_tmp=$tmpbase.fgrep
    cat > $fgrep_tmp <<EOF
 $syms
 EOF
@@ -262,8 +271,8 @@ if test -n "$syms"; then
 fi
 
 # If the run was successful, output the result.
-if test $status -eq 0; then
-  if test $# -eq 0; then
+if test $status = 0; then
+  if test $# = 0; then
     # Output is a file
     if test -f $config_h_in && cmp -s $tmpout $config_h_in; then
       # File didn't change, so don't update its mod time.
index 204fb4d0a8f452388ceda0e43f08a2cf7a3c71b3..b6192d7fed3d561bfaf11337a47922d880bf103f 100644 (file)
@@ -62,14 +62,6 @@ if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
 
-test -z "${AC_MACRODIR}" && AC_MACRODIR=@datadir@
-test -z "${M4}" && M4=@M4@
-case "${M4}" in
-/*) # Handle the case that m4 has moved since we were configured.
-    # It may have been found originally in a build directory.
-    test -f "${M4}" || M4=m4 ;;
-esac
-
 # ac_LF_and_DOT
 # We use echo to avoid assuming a particular line-breaking character.
 # The extra dot is to prevent the shell from consuming trailing
@@ -79,54 +71,83 @@ esac
 # would break.
 ac_LF_and_DOT=`echo; echo .`
 
-localdir=.
+# Find GNU m4.
+# Handle the case that m4 has moved since we were configured.
+# It may have been found originally in a build directory.
+: ${M4=@M4@}
+case "$M4" in
+/*) test -f "$M4" || M4=m4 ;;
+esac
+# Some non-GNU m4's don't reject the --help option, so give them /dev/null.
+case `$M4 --help </dev/null 2>&1` in
+*reload-state*);;
+*) echo "$me: Autoconf requires GNU m4 1.4 or later" >&2; exit 1 ;;
+esac
+
+# Variables.
+: ${AC_MACRODIR=@datadir@}
 debug=false
+localdir=.
+verbose=:
 # Basename for temporary files.
 : ${TMPDIR=/tmp}
-ah_base=$TMPDIR/ah$$
-tmpout=$ah_base.out
+tmpbase=$TMPDIR/ah$$
+tmpout=$tmpbase.out
 
 while test $# -gt 0 ; do
-   case "$1" in
-      -h | --help | --h* )
-         echo "$usage"; exit 0 ;;
-      --version | --v* )
-         echo "$version"; exit 0 ;;
-      -d | --debug | --d* )
-         debug=:; shift ;;
-      --localdir=* | --l*=* )
-         localdir=`echo "$1" | sed -e 's/^[^=]*=//'`
-         shift ;;
-      -l | --localdir | --l*)
-         shift
-         test $# -eq 0 && { echo "$help" >&2; exit 1; }
-         localdir=$1
-         shift ;;
-      --macrodir=* | --m*=* )
-         AC_MACRODIR=`echo "$1" | sed -e 's/^[^=]*=//'`
-         shift ;;
-      -m | --macrodir | --m* )
-         shift
-         test $# -eq 0 && { echo "$help" >&2; exit 1; }
-         AC_MACRODIR=$1
-         shift ;;
-      -- )     # Stop option processing
-        shift; break ;;
-      - )     # Use stdin as input.
-        break ;;
-      -* )
-        exec >&2
-        echo "$me: invalid option $1"
-        echo "$help"
-        exit 1 ;;
-      * )
-        break ;;
-   esac
+  case "$1" in
+    --version | --vers* | -V )
+       echo "$version" ; exit 0 ;;
+    --help | --h* | -h )
+       echo "$usage"; exit 0 ;;
+
+    --debug | --d* | -d )
+       debug=:; shift ;;
+    --verbose | --verb* | -v )
+       verbose=echo
+       shift;;
+
+    --localdir=* | --l*=* )
+       localdir=`echo "$1" | sed -e 's/^[^=]*=//'`
+       shift ;;
+    --localdir | --l* | -l )
+       shift
+       test $# = 0 && { echo "$help" >&2; exit 1; }
+       localdir=$1
+       shift ;;
+
+    --macrodir=* | --m*=* )
+       AC_MACRODIR=`echo "$1" | sed -e 's/^[^=]*=//'`
+       shift ;;
+    --macrodir | --m* | -m )
+       shift
+       test $# = 0 && { echo "$help" >&2; exit 1; }
+       AC_MACRODIR=$1
+       shift ;;
+
+    -- )     # Stop option processing
+      shift; break ;;
+    - )     # Use stdin as input.
+      break ;;
+    -* )
+      exec >&2
+      echo "$me: invalid option $1"
+      echo "$help"
+      exit 1 ;;
+    * )
+      break ;;
+  esac
 done
 
+# Running m4.
+test -n "$localdir" && use_localdir="-I$localdir"
+run_m4="$M4 $use_localdir -I $AC_MACRODIR autoheader.m4"
+run_m4f="$M4 $use_localdir --reload $AC_MACRODIR/autoheader.m4f"
+
 acconfigs=
 test -r $localdir/acconfig.h && acconfigs="$acconfigs $localdir/acconfig.h"
 
+# Find the input file.
 case $# in
   0) infile=configure.in ;;
   1) infile=$1 ;;
@@ -136,30 +157,18 @@ case $# in
      exit 1 ;;
 esac
 
-config_h=
-syms=
-
-if test "$localdir" != .; then
-  use_localdir="-I$localdir -DAC_LOCALDIR=$localdir"
-else
-  use_localdir=
-fi
-
-# Some non-GNU m4's don't reject the --help option, so give them /dev/null.
-case `$M4 --help < /dev/null 2>&1` in
-*reload-state*);;
-*) echo "$me: Autoconf requires GNU m4 1.4 or later" >&2; exit 1 ;;
-esac
-run_m4="$M4 --reload $AC_MACRODIR/autoheader.m4f $use_localdir"
-
 # Trap on 0 to stop playing with `rm'.
-$debug || trap 'ah_status=$?; rm -f $ah_base* && exit $ah_status' 0
+$debug || trap 'status=$?; rm -f $tmpbase* && exit $status' 0
 $debug || trap exit 1 2 13 15
 
+# Well, work now!
+config_h=
+syms=
+
 # Extract assignments of `ah_verbatim_SYMBOL' from the modified
 # autoconf processing of the input file.  The sed hair is necessary to
 # win for multi-line macro invocations.
-$run_m4 $infile >$ah_base.exp
+$run_m4 $infile >$tmpbase.exp
 sed -n -e '
        : again
        /^@@@.*@@@$/s/^@@@\(.*\)@@@$/\1/p
@@ -168,9 +177,9 @@ sed -n -e '
                n
                s/^/@@@/
                b again
-       }' $ah_base.exp >$ah_base.decls
-. $ah_base.decls
-$debug || rm -f $ah_base.exp $ah_base.decls
+       }' $tmpbase.exp >$tmpbase.decls
+. $tmpbase.decls
+$debug || rm -f $tmpbase.exp $tmpbase.decls
 
 # Make SYMS newline-separated rather than blank-separated, and remove dups.
 # Start each symbol with a blank (to match the blank after "#undef")
@@ -227,7 +236,7 @@ if test -n "$syms"; then
   # Some fgrep's have limits on the number of lines that can be in the
   # pattern on the command line, so use a temporary file containing the
   # pattern.
-  (fgrep_tmp=$ah_base.fgrep
+  (fgrep_tmp=$tmpbase.fgrep
    cat > $fgrep_tmp <<EOF
 $syms
 EOF
@@ -262,8 +271,8 @@ if test -n "$syms"; then
 fi
 
 # If the run was successful, output the result.
-if test $status -eq 0; then
-  if test $# -eq 0; then
+if test $status = 0; then
+  if test $# = 0; then
     # Output is a file
     if test -f $config_h_in && cmp -s $tmpout $config_h_in; then
       # File didn't change, so don't update its mod time.
index ab934f6299d6e23705b1ece595eb83cd61247b99..b979579dc7fd354e6ade04452ba186dfccb45e8b 100644 (file)
@@ -20,7 +20,7 @@
 me=`echo "$0" | sed -e 's,.*/,,'`
 
 usage="\
-Usage: autoreconf [OPTION] ... [TEMPLATE-FILE]
+Usage: $0 [OPTION] ... [TEMPLATE-FILE]
 
 Run \`autoconf' (and \`autoheader', \`aclocal' and \`automake', where
 appropriate) repeatedly to remake the Autoconf \`configure' scripts
@@ -67,49 +67,53 @@ test -z "$AC_MACRODIR" && AC_MACRODIR=@datadir@
 
 while test $# -gt 0; do
   case "$1" in
-  --help | --h* | -h )
-    echo "$usage"; exit 0 ;;
-  --version | --vers* | -V )
-    echo "$version"; exit 0 ;;
-
-  --localdir=* | --l*=* )
-    localdir=`echo "$1" | sed -e 's/^[^=]*=//'`
-    shift ;;
-  --localdir | --l* | -l )
-    shift
-    test $# -eq 0 && { echo "$help" >&2; exit 1; }
-    localdir="${1}"
-    shift ;;
-
-  --macrodir=* | --m*=* )
-    AC_MACRODIR=`echo "$1" | sed -e 's/^[^=]*=//'`
-    shift ;;
-  --macrodir | --m* | -m )
-    shift
-    test $# -eq 0 && { echo "help" >&2; exit 1; }
-    AC_MACRODIR="$1"
-    shift ;;
-
-  -v | --verbose | --verb*)
-    verbose=echo; shift ;;
-  -f | --force)
-    force=yes; shift ;;
-  --cygnus | --foreign | --gnits | --gnu)
-    automake_mode=$1; shift ;;
-  --include-deps | -i)
-    automake_deps=$1; shift ;;
-
-  --)     # Stop option processing.
-    shift; break ;;
-  -*)
-    exec >&2
-    echo "$me: invalid option $1"
-    echo "$help"
-    exit 1 ;;
-  *) break ;;
+    --version | --vers* | -V )
+       echo "$version" ; exit 0 ;;
+    --help | --h* | -h )
+       echo "$usage"; exit 0 ;;
+
+    --verbose | --verb* | -v )
+       verbose=echo
+       shift;;
+
+    --localdir=* | --l*=* )
+       localdir=`echo "$1" | sed -e 's/^[^=]*=//'`
+       shift ;;
+    --localdir | --l* | -l )
+       shift
+       test $# = 0 && { echo "$help" >&2; exit 1; }
+       localdir=$1
+       shift ;;
+
+    --macrodir=* | --m*=* )
+       AC_MACRODIR=`echo "$1" | sed -e 's/^[^=]*=//'`
+       shift ;;
+    --macrodir | --m* | -m )
+       shift
+       test $# = 0 && { echo "$help" >&2; exit 1; }
+       AC_MACRODIR=$1
+       shift ;;
+
+     --force | -f )
+       force=yes; shift ;;
+     --cygnus | --foreign | --gnits | --gnu)
+       automake_mode=$1; shift ;;
+     --include-deps | -i)
+       automake_deps=$1; shift ;;
+
+     -- )     # Stop option processing.
+       shift; break ;;
+     -* )
+       exec >&2
+       echo "$me: invalid option $1"
+       echo "$help"
+       exit 1 ;;
+     * )
+       break ;;
   esac
 done
 
+# Find the input file.
 if test $# -ne 0; then
   exec >&2
   echo "$me: invalid number of arguments"
@@ -118,8 +122,8 @@ if test $# -ne 0; then
 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.
index ab934f6299d6e23705b1ece595eb83cd61247b99..b979579dc7fd354e6ade04452ba186dfccb45e8b 100644 (file)
@@ -20,7 +20,7 @@
 me=`echo "$0" | sed -e 's,.*/,,'`
 
 usage="\
-Usage: autoreconf [OPTION] ... [TEMPLATE-FILE]
+Usage: $0 [OPTION] ... [TEMPLATE-FILE]
 
 Run \`autoconf' (and \`autoheader', \`aclocal' and \`automake', where
 appropriate) repeatedly to remake the Autoconf \`configure' scripts
@@ -67,49 +67,53 @@ test -z "$AC_MACRODIR" && AC_MACRODIR=@datadir@
 
 while test $# -gt 0; do
   case "$1" in
-  --help | --h* | -h )
-    echo "$usage"; exit 0 ;;
-  --version | --vers* | -V )
-    echo "$version"; exit 0 ;;
-
-  --localdir=* | --l*=* )
-    localdir=`echo "$1" | sed -e 's/^[^=]*=//'`
-    shift ;;
-  --localdir | --l* | -l )
-    shift
-    test $# -eq 0 && { echo "$help" >&2; exit 1; }
-    localdir="${1}"
-    shift ;;
-
-  --macrodir=* | --m*=* )
-    AC_MACRODIR=`echo "$1" | sed -e 's/^[^=]*=//'`
-    shift ;;
-  --macrodir | --m* | -m )
-    shift
-    test $# -eq 0 && { echo "help" >&2; exit 1; }
-    AC_MACRODIR="$1"
-    shift ;;
-
-  -v | --verbose | --verb*)
-    verbose=echo; shift ;;
-  -f | --force)
-    force=yes; shift ;;
-  --cygnus | --foreign | --gnits | --gnu)
-    automake_mode=$1; shift ;;
-  --include-deps | -i)
-    automake_deps=$1; shift ;;
-
-  --)     # Stop option processing.
-    shift; break ;;
-  -*)
-    exec >&2
-    echo "$me: invalid option $1"
-    echo "$help"
-    exit 1 ;;
-  *) break ;;
+    --version | --vers* | -V )
+       echo "$version" ; exit 0 ;;
+    --help | --h* | -h )
+       echo "$usage"; exit 0 ;;
+
+    --verbose | --verb* | -v )
+       verbose=echo
+       shift;;
+
+    --localdir=* | --l*=* )
+       localdir=`echo "$1" | sed -e 's/^[^=]*=//'`
+       shift ;;
+    --localdir | --l* | -l )
+       shift
+       test $# = 0 && { echo "$help" >&2; exit 1; }
+       localdir=$1
+       shift ;;
+
+    --macrodir=* | --m*=* )
+       AC_MACRODIR=`echo "$1" | sed -e 's/^[^=]*=//'`
+       shift ;;
+    --macrodir | --m* | -m )
+       shift
+       test $# = 0 && { echo "$help" >&2; exit 1; }
+       AC_MACRODIR=$1
+       shift ;;
+
+     --force | -f )
+       force=yes; shift ;;
+     --cygnus | --foreign | --gnits | --gnu)
+       automake_mode=$1; shift ;;
+     --include-deps | -i)
+       automake_deps=$1; shift ;;
+
+     -- )     # Stop option processing.
+       shift; break ;;
+     -* )
+       exec >&2
+       echo "$me: invalid option $1"
+       echo "$help"
+       exit 1 ;;
+     * )
+       break ;;
   esac
 done
 
+# Find the input file.
 if test $# -ne 0; then
   exec >&2
   echo "$me: invalid number of arguments"
@@ -118,8 +122,8 @@ if test $# -ne 0; then
 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.
index 78b44d07d19f447f4b92bb655db03211ce06c822..18553a615ce81d25d3e49c05bcea9d064f0f7092 100644 (file)
@@ -1,7 +1,7 @@
 include(libm4.m4)#                                          -*- Autoconf -*-
 # This file is part of Autoconf.
 # Driver that loads the Autoupdate macro files.
-# Copyright (C) 1999 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2000 Free Software Foundation, Inc.
 #
 # 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
@@ -18,7 +18,7 @@ include(libm4.m4)#                                          -*- Autoconf -*-
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 # 02111-1307, USA.
 #
-# Written by Akim Demaille
+# Written by Akim Demaille.
 #
 # Do not sinclude acsite.m4 here, because it may not be installed
 # yet when Autoconf is frozen.
@@ -32,4 +32,4 @@ m4_enable(autoupdate)
 # Disable m4
 m4_disable(libm4)
 m4_changequote(, )
-divert(0)dnl
+divert(0)m4_dnl
index 6303fc57d490f205b257270f1ad216acd4b47cbf..b9f0a0b0e5c4d236d42716ba22875bc24abd01d1 100644 (file)
@@ -117,16 +117,20 @@ while test $# -gt 0 ; do
        echo "$version" ; exit 0 ;;
     --help | --h* | -h )
        echo "$usage"; exit 0 ;;
+
     --debug | --d* | -d )
        debug=:; shift ;;
+    --verbose | --verb* | -v )
+       verbose=echo
+       shift;;
 
     --localdir=* | --l*=* )
        localdir=`echo "$1" | sed -e 's/^[^=]*=//'`
        shift ;;
     --localdir | --l* | -l )
        shift
-       test $# -eq 0 && { echo "$help" >&2; exit 1; }
-       localdir="$1"
+       test $# = 0 && { echo "$help" >&2; exit 1; }
+       localdir=$1
        shift ;;
 
     --macrodir=* | --m*=* )
@@ -134,22 +138,18 @@ while test $# -gt 0 ; do
        shift ;;
     --macrodir | --m* | -m )
        shift
-       test $# -eq 0 && { echo "$help" >&2; exit 1; }
-       AC_MACRODIR="$1"
+       test $# = 0 && { echo "$help" >&2; exit 1; }
+       AC_MACRODIR=$1
        shift ;;
 
     --install )
        task=install
        shift;;
 
-    --verbose | --verb* | -v )
-       verbose=echo
-       shift;;
-
     --trace | -t )
        task=trace
        shift
-       test $# -eq 0 && { echo "$help" >&2; exit 1; }
+       test $# = 0 && { echo "$help" >&2; exit 1; }
        traces="$traces '$1'"
        shift ;;
     --trace=* )
@@ -162,8 +162,8 @@ while test $# -gt 0 ; do
 
     --output | -o )
        shift
-       test $# -eq 0 && { echo "$help" >&2; exit 1; }
-       outfile="$1"
+       test $# = 0 && { echo "$help" >&2; exit 1; }
+       outfile=$1
        shift ;;
     --output=* )
        outfile=`echo "$1" | sed -e 's/^[^=]*=//'`
@@ -192,7 +192,7 @@ run_m4f="$M4 $use_localdir --reload $AC_MACRODIR/autoconf.m4f"
 case $# in
   0) infile=configure.in
      test $task = script && test "x$outfile" = x && outfile=configure;;
-  1) infile="$1" ;;
+  1) infile=$1 ;;
   *) exec >&2
      echo "$me: invalid number of arguments."
      echo "$help"
@@ -201,8 +201,8 @@ esac
 
 # Trap on 0 to stop playing with `rm'.
 if $debug; then
-  trap 'ah_status=$?
-        rm -f $tmpin $tmpout $silent_m4 $trace_m4 && exit $ah_status' 0
+  trap 'status=$?
+        rm -f $tmpin $tmpout $silent_m4 $trace_m4 && exit $status' 0
   trap exit 1 2 13 15
 fi
 
@@ -242,7 +242,7 @@ case $task in
     sed -n "s/^[^#]*\\($pattern[_A-Za-z0-9]*\\).*/\\1/p" $tmpout |
       while read macro; do
        grep -n "^[^#]*$macro" $infile /dev/null
-       test $? -eq 1 && echo "***BUG in Autoconf--please report*** $macro"
+       test $? = 1 && echo "***BUG in Autoconf--please report*** $macro"
       done | sort -u >&2
     status=1
   fi
index 204fb4d0a8f452388ceda0e43f08a2cf7a3c71b3..b6192d7fed3d561bfaf11337a47922d880bf103f 100644 (file)
@@ -62,14 +62,6 @@ if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
 
-test -z "${AC_MACRODIR}" && AC_MACRODIR=@datadir@
-test -z "${M4}" && M4=@M4@
-case "${M4}" in
-/*) # Handle the case that m4 has moved since we were configured.
-    # It may have been found originally in a build directory.
-    test -f "${M4}" || M4=m4 ;;
-esac
-
 # ac_LF_and_DOT
 # We use echo to avoid assuming a particular line-breaking character.
 # The extra dot is to prevent the shell from consuming trailing
@@ -79,54 +71,83 @@ esac
 # would break.
 ac_LF_and_DOT=`echo; echo .`
 
-localdir=.
+# Find GNU m4.
+# Handle the case that m4 has moved since we were configured.
+# It may have been found originally in a build directory.
+: ${M4=@M4@}
+case "$M4" in
+/*) test -f "$M4" || M4=m4 ;;
+esac
+# Some non-GNU m4's don't reject the --help option, so give them /dev/null.
+case `$M4 --help </dev/null 2>&1` in
+*reload-state*);;
+*) echo "$me: Autoconf requires GNU m4 1.4 or later" >&2; exit 1 ;;
+esac
+
+# Variables.
+: ${AC_MACRODIR=@datadir@}
 debug=false
+localdir=.
+verbose=:
 # Basename for temporary files.
 : ${TMPDIR=/tmp}
-ah_base=$TMPDIR/ah$$
-tmpout=$ah_base.out
+tmpbase=$TMPDIR/ah$$
+tmpout=$tmpbase.out
 
 while test $# -gt 0 ; do
-   case "$1" in
-      -h | --help | --h* )
-         echo "$usage"; exit 0 ;;
-      --version | --v* )
-         echo "$version"; exit 0 ;;
-      -d | --debug | --d* )
-         debug=:; shift ;;
-      --localdir=* | --l*=* )
-         localdir=`echo "$1" | sed -e 's/^[^=]*=//'`
-         shift ;;
-      -l | --localdir | --l*)
-         shift
-         test $# -eq 0 && { echo "$help" >&2; exit 1; }
-         localdir=$1
-         shift ;;
-      --macrodir=* | --m*=* )
-         AC_MACRODIR=`echo "$1" | sed -e 's/^[^=]*=//'`
-         shift ;;
-      -m | --macrodir | --m* )
-         shift
-         test $# -eq 0 && { echo "$help" >&2; exit 1; }
-         AC_MACRODIR=$1
-         shift ;;
-      -- )     # Stop option processing
-        shift; break ;;
-      - )     # Use stdin as input.
-        break ;;
-      -* )
-        exec >&2
-        echo "$me: invalid option $1"
-        echo "$help"
-        exit 1 ;;
-      * )
-        break ;;
-   esac
+  case "$1" in
+    --version | --vers* | -V )
+       echo "$version" ; exit 0 ;;
+    --help | --h* | -h )
+       echo "$usage"; exit 0 ;;
+
+    --debug | --d* | -d )
+       debug=:; shift ;;
+    --verbose | --verb* | -v )
+       verbose=echo
+       shift;;
+
+    --localdir=* | --l*=* )
+       localdir=`echo "$1" | sed -e 's/^[^=]*=//'`
+       shift ;;
+    --localdir | --l* | -l )
+       shift
+       test $# = 0 && { echo "$help" >&2; exit 1; }
+       localdir=$1
+       shift ;;
+
+    --macrodir=* | --m*=* )
+       AC_MACRODIR=`echo "$1" | sed -e 's/^[^=]*=//'`
+       shift ;;
+    --macrodir | --m* | -m )
+       shift
+       test $# = 0 && { echo "$help" >&2; exit 1; }
+       AC_MACRODIR=$1
+       shift ;;
+
+    -- )     # Stop option processing
+      shift; break ;;
+    - )     # Use stdin as input.
+      break ;;
+    -* )
+      exec >&2
+      echo "$me: invalid option $1"
+      echo "$help"
+      exit 1 ;;
+    * )
+      break ;;
+  esac
 done
 
+# Running m4.
+test -n "$localdir" && use_localdir="-I$localdir"
+run_m4="$M4 $use_localdir -I $AC_MACRODIR autoheader.m4"
+run_m4f="$M4 $use_localdir --reload $AC_MACRODIR/autoheader.m4f"
+
 acconfigs=
 test -r $localdir/acconfig.h && acconfigs="$acconfigs $localdir/acconfig.h"
 
+# Find the input file.
 case $# in
   0) infile=configure.in ;;
   1) infile=$1 ;;
@@ -136,30 +157,18 @@ case $# in
      exit 1 ;;
 esac
 
-config_h=
-syms=
-
-if test "$localdir" != .; then
-  use_localdir="-I$localdir -DAC_LOCALDIR=$localdir"
-else
-  use_localdir=
-fi
-
-# Some non-GNU m4's don't reject the --help option, so give them /dev/null.
-case `$M4 --help < /dev/null 2>&1` in
-*reload-state*);;
-*) echo "$me: Autoconf requires GNU m4 1.4 or later" >&2; exit 1 ;;
-esac
-run_m4="$M4 --reload $AC_MACRODIR/autoheader.m4f $use_localdir"
-
 # Trap on 0 to stop playing with `rm'.
-$debug || trap 'ah_status=$?; rm -f $ah_base* && exit $ah_status' 0
+$debug || trap 'status=$?; rm -f $tmpbase* && exit $status' 0
 $debug || trap exit 1 2 13 15
 
+# Well, work now!
+config_h=
+syms=
+
 # Extract assignments of `ah_verbatim_SYMBOL' from the modified
 # autoconf processing of the input file.  The sed hair is necessary to
 # win for multi-line macro invocations.
-$run_m4 $infile >$ah_base.exp
+$run_m4 $infile >$tmpbase.exp
 sed -n -e '
        : again
        /^@@@.*@@@$/s/^@@@\(.*\)@@@$/\1/p
@@ -168,9 +177,9 @@ sed -n -e '
                n
                s/^/@@@/
                b again
-       }' $ah_base.exp >$ah_base.decls
-. $ah_base.decls
-$debug || rm -f $ah_base.exp $ah_base.decls
+       }' $tmpbase.exp >$tmpbase.decls
+. $tmpbase.decls
+$debug || rm -f $tmpbase.exp $tmpbase.decls
 
 # Make SYMS newline-separated rather than blank-separated, and remove dups.
 # Start each symbol with a blank (to match the blank after "#undef")
@@ -227,7 +236,7 @@ if test -n "$syms"; then
   # Some fgrep's have limits on the number of lines that can be in the
   # pattern on the command line, so use a temporary file containing the
   # pattern.
-  (fgrep_tmp=$ah_base.fgrep
+  (fgrep_tmp=$tmpbase.fgrep
    cat > $fgrep_tmp <<EOF
 $syms
 EOF
@@ -262,8 +271,8 @@ if test -n "$syms"; then
 fi
 
 # If the run was successful, output the result.
-if test $status -eq 0; then
-  if test $# -eq 0; then
+if test $status = 0; then
+  if test $# = 0; then
     # Output is a file
     if test -f $config_h_in && cmp -s $tmpout $config_h_in; then
       # File didn't change, so don't update its mod time.
index ab934f6299d6e23705b1ece595eb83cd61247b99..b979579dc7fd354e6ade04452ba186dfccb45e8b 100644 (file)
@@ -20,7 +20,7 @@
 me=`echo "$0" | sed -e 's,.*/,,'`
 
 usage="\
-Usage: autoreconf [OPTION] ... [TEMPLATE-FILE]
+Usage: $0 [OPTION] ... [TEMPLATE-FILE]
 
 Run \`autoconf' (and \`autoheader', \`aclocal' and \`automake', where
 appropriate) repeatedly to remake the Autoconf \`configure' scripts
@@ -67,49 +67,53 @@ test -z "$AC_MACRODIR" && AC_MACRODIR=@datadir@
 
 while test $# -gt 0; do
   case "$1" in
-  --help | --h* | -h )
-    echo "$usage"; exit 0 ;;
-  --version | --vers* | -V )
-    echo "$version"; exit 0 ;;
-
-  --localdir=* | --l*=* )
-    localdir=`echo "$1" | sed -e 's/^[^=]*=//'`
-    shift ;;
-  --localdir | --l* | -l )
-    shift
-    test $# -eq 0 && { echo "$help" >&2; exit 1; }
-    localdir="${1}"
-    shift ;;
-
-  --macrodir=* | --m*=* )
-    AC_MACRODIR=`echo "$1" | sed -e 's/^[^=]*=//'`
-    shift ;;
-  --macrodir | --m* | -m )
-    shift
-    test $# -eq 0 && { echo "help" >&2; exit 1; }
-    AC_MACRODIR="$1"
-    shift ;;
-
-  -v | --verbose | --verb*)
-    verbose=echo; shift ;;
-  -f | --force)
-    force=yes; shift ;;
-  --cygnus | --foreign | --gnits | --gnu)
-    automake_mode=$1; shift ;;
-  --include-deps | -i)
-    automake_deps=$1; shift ;;
-
-  --)     # Stop option processing.
-    shift; break ;;
-  -*)
-    exec >&2
-    echo "$me: invalid option $1"
-    echo "$help"
-    exit 1 ;;
-  *) break ;;
+    --version | --vers* | -V )
+       echo "$version" ; exit 0 ;;
+    --help | --h* | -h )
+       echo "$usage"; exit 0 ;;
+
+    --verbose | --verb* | -v )
+       verbose=echo
+       shift;;
+
+    --localdir=* | --l*=* )
+       localdir=`echo "$1" | sed -e 's/^[^=]*=//'`
+       shift ;;
+    --localdir | --l* | -l )
+       shift
+       test $# = 0 && { echo "$help" >&2; exit 1; }
+       localdir=$1
+       shift ;;
+
+    --macrodir=* | --m*=* )
+       AC_MACRODIR=`echo "$1" | sed -e 's/^[^=]*=//'`
+       shift ;;
+    --macrodir | --m* | -m )
+       shift
+       test $# = 0 && { echo "$help" >&2; exit 1; }
+       AC_MACRODIR=$1
+       shift ;;
+
+     --force | -f )
+       force=yes; shift ;;
+     --cygnus | --foreign | --gnits | --gnu)
+       automake_mode=$1; shift ;;
+     --include-deps | -i)
+       automake_deps=$1; shift ;;
+
+     -- )     # Stop option processing.
+       shift; break ;;
+     -* )
+       exec >&2
+       echo "$me: invalid option $1"
+       echo "$help"
+       exit 1 ;;
+     * )
+       break ;;
   esac
 done
 
+# Find the input file.
 if test $# -ne 0; then
   exec >&2
   echo "$me: invalid number of arguments"
@@ -118,8 +122,8 @@ if test $# -ne 0; then
 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.
index dac16875b61329cc49fb38958c27170bfcc821d4..a6fb37ab54be05dd72e5cdc1cf15e047d7b26f86 100644 (file)
@@ -26,7 +26,7 @@
 me=`echo "$0" | sed -e 's,.*/,,'`
 
 usage="\
-Usage: ifnames [OPTION] ...  [FILE] ...
+Usage: $0 [OPTION] ...  [FILE] ...
 
 Scan all of the C source FILES (or the standard input, if none are
 given) and write to the standard output a sorted list of all the
@@ -68,7 +68,10 @@ while test $# -gt 0; do
   esac
 done
 
-@AWK@ '
+# Variables.
+: ${AWK=@AWK@}
+
+$AWK '
   # Record that sym was found in FILENAME.
   function file_sym(sym,  i, fs) {
     if (sym ~ /^[A-Za-z_]/) {
index dac16875b61329cc49fb38958c27170bfcc821d4..a6fb37ab54be05dd72e5cdc1cf15e047d7b26f86 100644 (file)
@@ -26,7 +26,7 @@
 me=`echo "$0" | sed -e 's,.*/,,'`
 
 usage="\
-Usage: ifnames [OPTION] ...  [FILE] ...
+Usage: $0 [OPTION] ...  [FILE] ...
 
 Scan all of the C source FILES (or the standard input, if none are
 given) and write to the standard output a sorted list of all the
@@ -68,7 +68,10 @@ while test $# -gt 0; do
   esac
 done
 
-@AWK@ '
+# Variables.
+: ${AWK=@AWK@}
+
+$AWK '
   # Record that sym was found in FILENAME.
   function file_sym(sym,  i, fs) {
     if (sym ~ /^[A-Za-z_]/) {
index dac16875b61329cc49fb38958c27170bfcc821d4..a6fb37ab54be05dd72e5cdc1cf15e047d7b26f86 100644 (file)
@@ -26,7 +26,7 @@
 me=`echo "$0" | sed -e 's,.*/,,'`
 
 usage="\
-Usage: ifnames [OPTION] ...  [FILE] ...
+Usage: $0 [OPTION] ...  [FILE] ...
 
 Scan all of the C source FILES (or the standard input, if none are
 given) and write to the standard output a sorted list of all the
@@ -68,7 +68,10 @@ while test $# -gt 0; do
   esac
 done
 
-@AWK@ '
+# Variables.
+: ${AWK=@AWK@}
+
+$AWK '
   # Record that sym was found in FILENAME.
   function file_sym(sym,  i, fs) {
     if (sym ~ /^[A-Za-z_]/) {