>>>>> "Ben" == Ben Elliston <[EMAIL PROTECTED]> writes:

Ben> It is my intention to correct this in the near future--I realise
Ben> it's a problem.

Hi Ben,

I am resubmitting my patches.  I know there is lots to debate about in
there, in particular because I used Emacs hooks, because we don't want
to rely on CVS (those files being imported in many other projects),
and I think it is safer than by hand.

But anyway, let's apply this patch, it is a basis for further
changes.  For instance we might implement --update which could wget
the files if possible, and --report which could automatically send the
message.  We have already talked about this some time ago.

Also, I referred to subversions, which is wrong, of course, but
currently the config.* are homeless.  Also, it would be great to be
able to point to the url of the files themselves, but I know none.

Anyway, let's apply, then tune.

So, just to show what my patch does:

| ~/src/config % ./config.guess --help
| Usage: ./config.guess [OPTION]
| 
| Output the configuration name of this system.
| 
| Operation modes:
|   -h, --help               print this help, then exit
|   -V, --version            print version number, then exit
| ~/src/config % ./config.guess --version
| 2000-05-02
| ~/src/config % touch /tmp/uname
| ~/src/config % chmod +x /tmp/uname
| ~/src/config % PATH=/tmp:$PATH ./config.guess
| ./config.guess: unable to guess system type
| 
| The 2000-05-02 version of this script cannot recognize your system type.
| Please, download the most up to date version of the config scripts:
| 
|     http://subversions.gnu.org/cgi-bin/cvsweb/config/
| 
| If the version you run
| 
|     ./config.guess
| 
| is already up to date, could you please send the following data and
| any information you think might be pertinent to
| <[EMAIL PROTECTED]> in order to provide the needed information to
| handle your system.
| 
| config.guess version = 2000-05-02
| 
| uname -m = 
| uname -r = 
| uname -s = 
| uname -v = 
| 
| /usr/bin/uname -p = 
| /bin/uname -X     = 
| 
| hostinfo               = 
| /bin/universe          = 
| /usr/bin/arch -k       = 
| /bin/arch              = i686
| /usr/bin/oslevel       = 
| /usr/convex/getsysinfo = 
| 
| UNAME_MACHINE = 
| UNAME_RELEASE = 
| UNAME_SYSTEM  = 
| UNAME_VERSION = 
| 

Regards,

        Akim

Index: ChangeLog
===================================================================
RCS file: /cvs/config/ChangeLog,v
retrieving revision 1.25
diff -u -r1.25 ChangeLog
--- ChangeLog   2000/04/25 20:58:07     1.25
+++ ChangeLog   2000/05/02 10:36:53
@@ -1,3 +1,9 @@
+2000-05-02  Akim Demaille  <[EMAIL PROTECTED]>
+
+       * config.guess: Equip with a version number, and options
+       processing.
+       * config.sub: Likewise.
+
 2000-04-26  Ben Elliston  <[EMAIL PROTECTED]>
 
        * config.guess: Handle an ld emulation of elf_i?86. From Bruce
@@ -26,7 +32,7 @@
 
        * config.guess: Detect Apple's Darwin operating system.
        * config.sub: Handle an appropriate alias. From Assar Westerlund.
-       
+
 2000-03-27  Ben Elliston  <[EMAIL PROTECTED]>
 
        * config.guess: Detect Ascend Embedded/OS, which is really BSDI.
@@ -86,7 +92,7 @@
 
        * config.guess: Replace sub-minor system version number with an
        `X' on certain Cray platforms. From Keith Thompson <[EMAIL PROTECTED]>.
-       
+
        * config.sub: Add support for mmix and mmixware. From Hans-Peter
        Nilsson <[EMAIL PROTECTED]>.
 
@@ -106,4 +112,4 @@
        Biveinis <[EMAIL PROTECTED]>.
 
        * config.guess: Import from autoconf source tree.
-       * config.sub: Likewise. 
+       * config.sub: Likewise.
Index: config.guess
===================================================================
RCS file: /cvs/config/config.guess,v
retrieving revision 1.142
diff -u -r1.142 config.guess
--- config.guess        2000/04/25 20:58:07     1.142
+++ config.guess        2000/05/02 10:37:11
@@ -2,7 +2,9 @@
 # Attempt to guess a canonical system name.
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
 #   Free Software Foundation, Inc.
-#
+
+version='2000-05-02'
+
 # This file 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
@@ -36,6 +38,46 @@
 # (but try to keep the structure clean).
 #
 
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION]
+
+Output the configuration name of this system.
+
+Operation modes:
+  -h, --help               print this help, then exit
+  -V, --version            print version number, then exit"
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+  case "$1" in
+    --version | --vers* | -V )
+       echo "$version" ; exit 0 ;;
+    --help | --h* | -h )
+       echo "$usage"; exit 0 ;;
+    -- )     # Stop option processing
+       shift; break ;;
+    - )        # Use stdin as input.
+       break ;;
+    -* )
+       exec >&2
+       echo "$me: invalid option $1"
+       echo "$help"
+       exit 1 ;;
+    * )
+       break ;;
+  esac
+done
+
+if test $# != 0; then
+  echo "$me: too many arguments$help" >&2
+  exit 1
+fi
+
 # Use $HOST_CC if defined. $CC may point to a cross-compiler
 if test x"$CC_FOR_BUILD" = x; then
   if test x"$HOST_CC" != x; then
@@ -1180,7 +1222,52 @@
        exit 0 ;;
     esac
 fi
+
+cat >&2 <<EOF
+$0: unable to guess system type
+
+The $version version of this script cannot recognize your system type.
+Please, download the most up to date version of the config scripts:
 
-#echo '(Unable to guess system type)' 1>&2
+    http://subversions.gnu.org/cgi-bin/cvsweb/config/
 
+If the version you run
+
+    $0
+
+is already up to date, could you please send the following data and
+any information you think might be pertinent to
+<[EMAIL PROTECTED]> in order to provide the needed information to
+handle your system.
+
+config.guess version = $version
+
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
+
+hostinfo               = `(hostinfo) 2>/dev/null`
+/bin/universe          = `(/bin/universe) 2>/dev/null`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
+/bin/arch              = `(/bin/arch) 2>/dev/null`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
+
+UNAME_MACHINE = ${UNAME_MACHINE}
+UNAME_RELEASE = ${UNAME_RELEASE}
+UNAME_SYSTEM  = ${UNAME_SYSTEM}
+UNAME_VERSION = ${UNAME_VERSION}
+EOF
+
 exit 1
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "version='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
Index: config.sub
===================================================================
RCS file: /cvs/config/config.sub,v
retrieving revision 1.163
diff -u -r1.163 config.sub
--- config.sub  2000/04/06 12:38:59     1.163
+++ config.sub  2000/05/02 10:40:09
@@ -2,7 +2,9 @@
 # Configuration validation subroutine script, version 1.1.
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
 #   Free Software Foundation, Inc.
-#
+
+version='2000-05-02'
+
 # This file is (in principle) common to ALL GNU software.
 # The presence of a machine in this file suggests that SOME GNU software
 # can handle that machine.  It does not imply ALL GNU software can.
@@ -50,23 +52,54 @@
 #      CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
 # It is wrong to echo any other type of specification.
 
-if [ x$1 = x ]
-then
-       echo Configuration name missing. 1>&2
-       echo "Usage: $0 CPU-MFR-OPSYS" 1>&2
-       echo "or     $0 ALIAS" 1>&2
-       echo where ALIAS is a recognized configuration type. 1>&2
-       exit 1
-fi
+me=`echo "$0" | sed -e 's,.*/,,'`
 
-# First pass through any local machine types.
-case $1 in
-       *local*)
-               echo $1
-               exit 0
-               ;;
-       *)
-       ;;
+usage="\
+Usage: $0 [OPTION] CPU-MFR-OPSYS
+       $0 [OPTION] ALIAS
+
+Canocalize a configuration name.
+
+Operation modes:
+  -h, --help               print this help, then exit
+  -V, --version            print version number, then exit"
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+  case "$1" in
+    --version | --vers* | -V )
+       echo "version" ; exit 0 ;;
+    --help | --h* | -h )
+       echo "$usage"; exit 0 ;;
+    -- )     # Stop option processing
+       shift; break ;;
+    - )        # Use stdin as input.
+       break ;;
+    -* )
+       exec >&2
+       echo "$me: invalid option $1"
+       echo "$help"
+       exit 1 ;;
+
+    *local*)
+       # First pass through any local machine types.
+       echo $1
+       exit 0;;
+
+    * )
+       break ;;
+  esac
+done
+
+case $# in
+ 0) echo "$me: missing argument$help" >&2
+    exit 1;
+ 1) ;;
+ *) echo "$me: too many arguments$help" >&2
+    exit 1;;
 esac
 
 # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
@@ -1263,3 +1296,11 @@
 esac
 
 echo $basic_machine$os
+exit 0
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "version='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:

Reply via email to