Admin/polyml/bin/polyml-platform
author haftmann
Mon, 06 Jun 2005 14:12:07 +0200
changeset 16301 f9f2e1643593
parent 15878 8192fcf13618
child 16414 cad2cf55c851
permissions -rwxr-xr-x
migrated scripts to new webiste
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
11073
e45b136716f5 polyml multiplatform setup;
wenzelm
parents:
diff changeset
     1
#!/bin/sh
e45b136716f5 polyml multiplatform setup;
wenzelm
parents:
diff changeset
     2
#
15878
8192fcf13618 include x86_64
kleing
parents: 11393
diff changeset
     3
# $Id$
8192fcf13618 include x86_64
kleing
parents: 11393
diff changeset
     4
#
11073
e45b136716f5 polyml multiplatform setup;
wenzelm
parents:
diff changeset
     5
# polyml-platform --- determine Poly/ML's idea of current hardware and
e45b136716f5 polyml multiplatform setup;
wenzelm
parents:
diff changeset
     6
# operating system type
e45b136716f5 polyml multiplatform setup;
wenzelm
parents:
diff changeset
     7
#
e45b136716f5 polyml multiplatform setup;
wenzelm
parents:
diff changeset
     8
# NOTE: platform identifiers should be kept as generic as possible,
e45b136716f5 polyml multiplatform setup;
wenzelm
parents:
diff changeset
     9
# i.e. shared by compatible environments.
e45b136716f5 polyml multiplatform setup;
wenzelm
parents:
diff changeset
    10
e45b136716f5 polyml multiplatform setup;
wenzelm
parents:
diff changeset
    11
PLATFORM=""
e45b136716f5 polyml multiplatform setup;
wenzelm
parents:
diff changeset
    12
e45b136716f5 polyml multiplatform setup;
wenzelm
parents:
diff changeset
    13
case `uname -s` in
e45b136716f5 polyml multiplatform setup;
wenzelm
parents:
diff changeset
    14
  SunOS)
e45b136716f5 polyml multiplatform setup;
wenzelm
parents:
diff changeset
    15
    case `uname -r` in
e45b136716f5 polyml multiplatform setup;
wenzelm
parents:
diff changeset
    16
      5.*)
e45b136716f5 polyml multiplatform setup;
wenzelm
parents:
diff changeset
    17
        case `uname -p` in
e45b136716f5 polyml multiplatform setup;
wenzelm
parents:
diff changeset
    18
          sparc)
e45b136716f5 polyml multiplatform setup;
wenzelm
parents:
diff changeset
    19
            PLATFORM=sparc-solaris
e45b136716f5 polyml multiplatform setup;
wenzelm
parents:
diff changeset
    20
            ;;
e45b136716f5 polyml multiplatform setup;
wenzelm
parents:
diff changeset
    21
        esac
e45b136716f5 polyml multiplatform setup;
wenzelm
parents:
diff changeset
    22
        ;;
e45b136716f5 polyml multiplatform setup;
wenzelm
parents:
diff changeset
    23
    esac
e45b136716f5 polyml multiplatform setup;
wenzelm
parents:
diff changeset
    24
    ;;
e45b136716f5 polyml multiplatform setup;
wenzelm
parents:
diff changeset
    25
  Linux)
e45b136716f5 polyml multiplatform setup;
wenzelm
parents:
diff changeset
    26
    case `uname -m` in
e45b136716f5 polyml multiplatform setup;
wenzelm
parents:
diff changeset
    27
      i?86)
e45b136716f5 polyml multiplatform setup;
wenzelm
parents:
diff changeset
    28
        PLATFORM=x86-linux
e45b136716f5 polyml multiplatform setup;
wenzelm
parents:
diff changeset
    29
        ;;
15878
8192fcf13618 include x86_64
kleing
parents: 11393
diff changeset
    30
      x86?64)
8192fcf13618 include x86_64
kleing
parents: 11393
diff changeset
    31
	PLATFORM=x86-linux
8192fcf13618 include x86_64
kleing
parents: 11393
diff changeset
    32
	;;
11074
100637226ff5 improved;
wenzelm
parents: 11073
diff changeset
    33
      Power* | power* | ppc)
100637226ff5 improved;
wenzelm
parents: 11073
diff changeset
    34
        PLATFORM=ppc-linux
100637226ff5 improved;
wenzelm
parents: 11073
diff changeset
    35
        ;;
11073
e45b136716f5 polyml multiplatform setup;
wenzelm
parents:
diff changeset
    36
    esac
e45b136716f5 polyml multiplatform setup;
wenzelm
parents:
diff changeset
    37
    ;;
e45b136716f5 polyml multiplatform setup;
wenzelm
parents:
diff changeset
    38
  FreeBSD|NetBSD)
e45b136716f5 polyml multiplatform setup;
wenzelm
parents:
diff changeset
    39
    case `uname -m` in
e45b136716f5 polyml multiplatform setup;
wenzelm
parents:
diff changeset
    40
      i?86)
e45b136716f5 polyml multiplatform setup;
wenzelm
parents:
diff changeset
    41
        PLATFORM=x86-bsd
e45b136716f5 polyml multiplatform setup;
wenzelm
parents:
diff changeset
    42
        ;;
e45b136716f5 polyml multiplatform setup;
wenzelm
parents:
diff changeset
    43
    esac
e45b136716f5 polyml multiplatform setup;
wenzelm
parents:
diff changeset
    44
    ;;
11074
100637226ff5 improved;
wenzelm
parents: 11073
diff changeset
    45
  Darwin)
100637226ff5 improved;
wenzelm
parents: 11073
diff changeset
    46
    case `uname -m` in
100637226ff5 improved;
wenzelm
parents: 11073
diff changeset
    47
      Power* | power* | ppc)
11393
ee3d40b5ac23 ppc-darwin;
wenzelm
parents: 11074
diff changeset
    48
        PLATFORM=ppc-darwin
11074
100637226ff5 improved;
wenzelm
parents: 11073
diff changeset
    49
        ;;
100637226ff5 improved;
wenzelm
parents: 11073
diff changeset
    50
    esac
100637226ff5 improved;
wenzelm
parents: 11073
diff changeset
    51
    ;;
11073
e45b136716f5 polyml multiplatform setup;
wenzelm
parents:
diff changeset
    52
  Windows_NT)
e45b136716f5 polyml multiplatform setup;
wenzelm
parents:
diff changeset
    53
    case `uname -m` in
e45b136716f5 polyml multiplatform setup;
wenzelm
parents:
diff changeset
    54
      ?86)
e45b136716f5 polyml multiplatform setup;
wenzelm
parents:
diff changeset
    55
        PLATFORM=x86-win32
e45b136716f5 polyml multiplatform setup;
wenzelm
parents:
diff changeset
    56
        ;;
e45b136716f5 polyml multiplatform setup;
wenzelm
parents:
diff changeset
    57
    esac
e45b136716f5 polyml multiplatform setup;
wenzelm
parents:
diff changeset
    58
    ;;
e45b136716f5 polyml multiplatform setup;
wenzelm
parents:
diff changeset
    59
esac
e45b136716f5 polyml multiplatform setup;
wenzelm
parents:
diff changeset
    60
e45b136716f5 polyml multiplatform setup;
wenzelm
parents:
diff changeset
    61
e45b136716f5 polyml multiplatform setup;
wenzelm
parents:
diff changeset
    62
if [ -z "$PLATFORM" ]; then
e45b136716f5 polyml multiplatform setup;
wenzelm
parents:
diff changeset
    63
  echo "Unknown Poly/ML platform" >&2
e45b136716f5 polyml multiplatform setup;
wenzelm
parents:
diff changeset
    64
  exit 1
e45b136716f5 polyml multiplatform setup;
wenzelm
parents:
diff changeset
    65
else
e45b136716f5 polyml multiplatform setup;
wenzelm
parents:
diff changeset
    66
  echo "$PLATFORM"
e45b136716f5 polyml multiplatform setup;
wenzelm
parents:
diff changeset
    67
fi