source: branches/win64/scripts/ccl64 @ 10240

Last change on this file since 10240 was 10240, checked in by gb, 12 years ago

Handle Cygwin, Windows paths. Set DD convenience variable later.

  • Property svn:executable set to *
File size: 1.7 KB
Line 
1#!/bin/sh
2#
3# Change the definition of CCL_DEFAULT_DIRECTORY below to refer to
4# your OpenMCL installation directory. 
5# Any definition of CCL_DEFAULT_DIRECTORY already present in the environment
6# takes precedence over definitions made below.
7
8if [ -z "$CCL_DEFAULT_DIRECTORY" ]; then
9  CCL_DEFAULT_DIRECTORY=/usr/local/src/ccl
10fi
11
12
13# If you don't want to guess the name of the OpenMCL kernel on
14# every invocation (or if you want to use a kernel with a
15# non-default name), you might want to uncomment and change
16# the following line:
17#OPENMCL_KERNEL=some_name
18
19# Set the CCL_DEFAULT_DIRECTORY  environment variable;
20# the lisp will use this to setup translations for the CCL: logical host.
21
22if [ -z "$OPENMCL_KERNEL" ]; then
23    case `uname -s` in
24    Darwin)
25    case `arch` in
26      ppc*)
27      OPENMCL_KERNEL=dppccl64
28      ;;
29      i386|x86_64)
30      OPENMCL_KERNEL=dx86cl64
31      ;;
32    esac
33    ;;
34    Linux)
35    case `uname -m` in
36      ppc64)
37      OPENMCL_KERNEL=ppccl64
38      ;;
39      x86_64)
40      OPENMCL_KERNEL=lx86cl64
41      ;;
42      *)
43      echo "Can't determine machine architecture.  Fix this."
44      exit 1
45      ;;
46    esac
47    ;;
48    FreeBSD)
49    case `uname -m` in
50      amd64)
51      OPENMCL_KERNEL=fx86cl64
52      ;;
53      *)
54      echo "unsupported architecture"
55      exit 1
56      ;;
57    esac
58    ;;
59    CYGWIN*)
60    OPENMCL_KERNEL=wx86cl64.exe
61    CCL_DEFAULT_DIRECTORY="C:/cygwin$CCL_DEFAULT_DIRECTORY"
62    ;;
63    *)
64    echo "Can't determine host OS.  Fix this."
65    exit 1
66    ;;
67  esac
68fi
69
70# This is shorter (& easier to type), making the invocation below
71# a little easier to read.
72
73DD=${CCL_DEFAULT_DIRECTORY}
74
75CCL_DEFAULT_DIRECTORY=${DD} exec ${DD}/${OPENMCL_KERNEL} "$@"
76
Note: See TracBrowser for help on using the repository browser.