]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Add options [--help] [--macrodir=dir] [--verbose]
authorDavid MacKenzie <djm@djmnet.org>
Wed, 4 May 1994 17:34:32 +0000 (17:34 +0000)
committerDavid MacKenzie <djm@djmnet.org>
Wed, 4 May 1994 17:34:32 +0000 (17:34 +0000)
[--version].

autoreconf.in
autoreconf.sh
bin/autoreconf.in

index 87dbb55762cff5dd0e0d4a36a4683f91076e301e..d8ce191b2f142a41176aae42cb6615d000af40b6 100644 (file)
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
-# Written by David MacKenzie <djm@gnu.ai.mit.edu>.
+usage="\
+Usage: autoreconf [--help] [--macrodir=dir] [--verbose] [--version]
+       [directory...]"
+verbose=
+show_version=
+
+test -z "$AC_MACRODIR" && AC_MACRODIR=@datadir@
+export AC_MACRODIR # Pass it down to autoconf and autoheader.
+
+while test $# -gt 0; do
+  case "$1" in 
+  --help | --hel | --he | --h)
+    echo "$usage"; exit 0 ;;
+  --macrodir=* | --m*=* )
+    AC_MACRODIR="`echo \"$1\" | sed -e 's/^[^=]*=//'`"
+    shift ;;
+  -m | --macrodir | --m*)
+    shift
+    test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
+    AC_MACRODIR="$1"
+    shift ;;
+  --verbose | --verbos | --verbo | --verb)
+    verbose=t; shift ;;
+  --version | --versio | --versi | --vers)
+    show_version=t; shift ;;
+  --)     # Stop option processing.
+    shift; break ;;
+  -*) echo "$usage" 1>&2; exit 1 ;;
+  *) break ;;
+  esac
+done
+
+if test -n "$show_version"; then
+  version=`sed -n 's/define.AC_ACVERSION.[     ]*\([0-9.]*\).*/\1/p' \
+    $AC_MACRODIR/acgeneral.m4`
+  echo "Autoconf version $version"
+  exit 0
+fi
 
 if test $# -eq 0; then paths=.; else paths="$@"; fi
 
@@ -27,10 +64,10 @@ while read confin; do
   (
   dir=`echo $confin|sed 's%/[^/][^/]*$%%'`
   cd $dir || exit 1
-  echo running autoconf in $dir
+  test -n "$verbose" && echo running autoconf in $dir
   autoconf
   if grep AC_CONFIG_HEADER configure.in > /dev/null; then
-    echo running autoheader in $dir
+    test -n "$verbose" && echo running autoheader in $dir
     autoheader
   fi
   )
index 87dbb55762cff5dd0e0d4a36a4683f91076e301e..d8ce191b2f142a41176aae42cb6615d000af40b6 100644 (file)
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
-# Written by David MacKenzie <djm@gnu.ai.mit.edu>.
+usage="\
+Usage: autoreconf [--help] [--macrodir=dir] [--verbose] [--version]
+       [directory...]"
+verbose=
+show_version=
+
+test -z "$AC_MACRODIR" && AC_MACRODIR=@datadir@
+export AC_MACRODIR # Pass it down to autoconf and autoheader.
+
+while test $# -gt 0; do
+  case "$1" in 
+  --help | --hel | --he | --h)
+    echo "$usage"; exit 0 ;;
+  --macrodir=* | --m*=* )
+    AC_MACRODIR="`echo \"$1\" | sed -e 's/^[^=]*=//'`"
+    shift ;;
+  -m | --macrodir | --m*)
+    shift
+    test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
+    AC_MACRODIR="$1"
+    shift ;;
+  --verbose | --verbos | --verbo | --verb)
+    verbose=t; shift ;;
+  --version | --versio | --versi | --vers)
+    show_version=t; shift ;;
+  --)     # Stop option processing.
+    shift; break ;;
+  -*) echo "$usage" 1>&2; exit 1 ;;
+  *) break ;;
+  esac
+done
+
+if test -n "$show_version"; then
+  version=`sed -n 's/define.AC_ACVERSION.[     ]*\([0-9.]*\).*/\1/p' \
+    $AC_MACRODIR/acgeneral.m4`
+  echo "Autoconf version $version"
+  exit 0
+fi
 
 if test $# -eq 0; then paths=.; else paths="$@"; fi
 
@@ -27,10 +64,10 @@ while read confin; do
   (
   dir=`echo $confin|sed 's%/[^/][^/]*$%%'`
   cd $dir || exit 1
-  echo running autoconf in $dir
+  test -n "$verbose" && echo running autoconf in $dir
   autoconf
   if grep AC_CONFIG_HEADER configure.in > /dev/null; then
-    echo running autoheader in $dir
+    test -n "$verbose" && echo running autoheader in $dir
     autoheader
   fi
   )
index 87dbb55762cff5dd0e0d4a36a4683f91076e301e..d8ce191b2f142a41176aae42cb6615d000af40b6 100644 (file)
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
-# Written by David MacKenzie <djm@gnu.ai.mit.edu>.
+usage="\
+Usage: autoreconf [--help] [--macrodir=dir] [--verbose] [--version]
+       [directory...]"
+verbose=
+show_version=
+
+test -z "$AC_MACRODIR" && AC_MACRODIR=@datadir@
+export AC_MACRODIR # Pass it down to autoconf and autoheader.
+
+while test $# -gt 0; do
+  case "$1" in 
+  --help | --hel | --he | --h)
+    echo "$usage"; exit 0 ;;
+  --macrodir=* | --m*=* )
+    AC_MACRODIR="`echo \"$1\" | sed -e 's/^[^=]*=//'`"
+    shift ;;
+  -m | --macrodir | --m*)
+    shift
+    test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
+    AC_MACRODIR="$1"
+    shift ;;
+  --verbose | --verbos | --verbo | --verb)
+    verbose=t; shift ;;
+  --version | --versio | --versi | --vers)
+    show_version=t; shift ;;
+  --)     # Stop option processing.
+    shift; break ;;
+  -*) echo "$usage" 1>&2; exit 1 ;;
+  *) break ;;
+  esac
+done
+
+if test -n "$show_version"; then
+  version=`sed -n 's/define.AC_ACVERSION.[     ]*\([0-9.]*\).*/\1/p' \
+    $AC_MACRODIR/acgeneral.m4`
+  echo "Autoconf version $version"
+  exit 0
+fi
 
 if test $# -eq 0; then paths=.; else paths="$@"; fi
 
@@ -27,10 +64,10 @@ while read confin; do
   (
   dir=`echo $confin|sed 's%/[^/][^/]*$%%'`
   cd $dir || exit 1
-  echo running autoconf in $dir
+  test -n "$verbose" && echo running autoconf in $dir
   autoconf
   if grep AC_CONFIG_HEADER configure.in > /dev/null; then
-    echo running autoheader in $dir
+    test -n "$verbose" && echo running autoheader in $dir
     autoheader
   fi
   )