Re: Suggestion for new directory layout for Python lib-dir.

Bill Janssen (janssen@parc.xerox.com)
Thu, 18 Aug 1994 16:19:21 PDT

Here's ours. Note that it uses the GNU system type format -- I
appreciate using an existing standard for these kinds of things rather
than inventing another one.

Bill

#!/bin/csh -fb
# version .1
#The cases below correspond to all the current known platforms at
#PARC that access import packages and a string in gnu type format
#e.g. <cpu>-<vendor>-<o/s> is echoed to stdout. Note that
#although uname output is used for case routing the "gnu format"
#string that is returned is somewhat arbitrary. (see strings below)
#
# currently defined return strings:
#
# m68k-sun-solaris1
# sparc-sun-solaris1
# i486-sun-solaris2
# sparc-sun-solaris2.2
# sparc-sun-solaris2.3
# sparc-sun-solaris2.4
# mips-sgi-irix4
# mips-sgi-irix5
# rs6000-ibm-aix
# alpha-dec-osf1
#
#--------------------------------------------------------------------
# use uname command to get o/s, revision, and architecture
if ( -f /bin/uname ) then
set os = `/bin/uname -s`
set revision = `/bin/uname -r`
set karch = `/bin/uname -m`
else
unset os
endif
# switch on known o/s's
switch ( $os )
# sunos cases
case "SunOS":
switch ( $revision )
#sunos 4.X cases
case "4*":
switch ( $karch )
case sun3:
echo "m68k-sun-solaris1"
breaksw
default:
echo "sparc-sun-solaris1"
breaksw
endsw
breaksw
#sunos 5.4 case
case "5.4":
switch ( $karch )
case "i86pc":
echo "i486-sun-solaris2"
breaksw
default:
echo "sparc-sun-solaris2.4"
breaksw
endsw
breaksw
#sunos 5.3 case
case "5.3":
switch ( $karch )
case "i86pc":
echo "i486-sun-solaris2"
breaksw
default:
echo "sparc-sun-solaris2.3"
breaksw
endsw
breaksw
#sunos 5.2 case
case "5.2":
switch ( $karch )
case "i86pc":
echo "i486-sun-solaris2"
breaksw
default:
echo "sparc-sun-solaris2.2"
breaksw
endsw
breaksw
#sunos 5.1 case
case "5.1":
switch ( $karch )
case "i86pc":
echo "i486-sun-solaris2"
breaksw
default:
echo "sparc-sun-solaris2.1"
breaksw
endsw
breaksw
endsw
breaksw
# miscellaneous cases
case "IRIX":
switch ( $revision )
case "4*":
echo "mips-sgi-irix4"
breaksw
case "5.2":
case "5.2-ALPHA-1010931841":
case "5.2-ALPHA-1010931831":
case "5.1.1.2":
echo "mips-sgi-irix5"
breaksw
endsw
breaksw
case "AIX":
echo "rs6000-ibm-aix"
breaksw
case "OSF1":
echo "alpha-dec-osf1"
breaksw
# if undefined in cases above, simply return uname output
default:
echo "unimplemented-${os}-${revision}"
breaksw
endsw
unset os