author | Andreas Lochbihler |
Thu, 18 Sep 2014 15:23:23 +0200 | |
changeset 58383 | 09a2c3e08ec2 |
parent 50182 | 30177ec0be36 |
child 62879 | 4764473c9b8d |
permissions | -rw-r--r-- |
37012 | 1 |
# -*- shell-script -*- :mode=shellscript: |
36196
cbb9ee265cdd
added ISABELLE_PLATFORM and ISABELLE_PLATFORM64 -- NB: ML and JVM may have a different idea;
wenzelm
parents:
diff
changeset
|
2 |
# |
cbb9ee265cdd
added ISABELLE_PLATFORM and ISABELLE_PLATFORM64 -- NB: ML and JVM may have a different idea;
wenzelm
parents:
diff
changeset
|
3 |
# determine general hardware and operating system type for Isabelle |
cbb9ee265cdd
added ISABELLE_PLATFORM and ISABELLE_PLATFORM64 -- NB: ML and JVM may have a different idea;
wenzelm
parents:
diff
changeset
|
4 |
# |
cbb9ee265cdd
added ISABELLE_PLATFORM and ISABELLE_PLATFORM64 -- NB: ML and JVM may have a different idea;
wenzelm
parents:
diff
changeset
|
5 |
# NOTE: The ML system or JVM may have their own idea about the platform! |
cbb9ee265cdd
added ISABELLE_PLATFORM and ISABELLE_PLATFORM64 -- NB: ML and JVM may have a different idea;
wenzelm
parents:
diff
changeset
|
6 |
|
50182 | 7 |
ISABELLE_PLATFORM_FAMILY="" |
48455 | 8 |
ISABELLE_PLATFORM32="" |
36196
cbb9ee265cdd
added ISABELLE_PLATFORM and ISABELLE_PLATFORM64 -- NB: ML and JVM may have a different idea;
wenzelm
parents:
diff
changeset
|
9 |
ISABELLE_PLATFORM64="" |
cbb9ee265cdd
added ISABELLE_PLATFORM and ISABELLE_PLATFORM64 -- NB: ML and JVM may have a different idea;
wenzelm
parents:
diff
changeset
|
10 |
|
cbb9ee265cdd
added ISABELLE_PLATFORM and ISABELLE_PLATFORM64 -- NB: ML and JVM may have a different idea;
wenzelm
parents:
diff
changeset
|
11 |
case $(uname -s) in |
cbb9ee265cdd
added ISABELLE_PLATFORM and ISABELLE_PLATFORM64 -- NB: ML and JVM may have a different idea;
wenzelm
parents:
diff
changeset
|
12 |
Linux) |
50182 | 13 |
ISABELLE_PLATFORM_FAMILY="linux" |
36196
cbb9ee265cdd
added ISABELLE_PLATFORM and ISABELLE_PLATFORM64 -- NB: ML and JVM may have a different idea;
wenzelm
parents:
diff
changeset
|
14 |
case $(uname -m) in |
cbb9ee265cdd
added ISABELLE_PLATFORM and ISABELLE_PLATFORM64 -- NB: ML and JVM may have a different idea;
wenzelm
parents:
diff
changeset
|
15 |
i?86) |
48455 | 16 |
ISABELLE_PLATFORM32=x86-linux |
36196
cbb9ee265cdd
added ISABELLE_PLATFORM and ISABELLE_PLATFORM64 -- NB: ML and JVM may have a different idea;
wenzelm
parents:
diff
changeset
|
17 |
;; |
cbb9ee265cdd
added ISABELLE_PLATFORM and ISABELLE_PLATFORM64 -- NB: ML and JVM may have a different idea;
wenzelm
parents:
diff
changeset
|
18 |
x86_64) |
48455 | 19 |
ISABELLE_PLATFORM32=x86-linux |
36196
cbb9ee265cdd
added ISABELLE_PLATFORM and ISABELLE_PLATFORM64 -- NB: ML and JVM may have a different idea;
wenzelm
parents:
diff
changeset
|
20 |
ISABELLE_PLATFORM64=x86_64-linux |
cbb9ee265cdd
added ISABELLE_PLATFORM and ISABELLE_PLATFORM64 -- NB: ML and JVM may have a different idea;
wenzelm
parents:
diff
changeset
|
21 |
;; |
cbb9ee265cdd
added ISABELLE_PLATFORM and ISABELLE_PLATFORM64 -- NB: ML and JVM may have a different idea;
wenzelm
parents:
diff
changeset
|
22 |
esac |
cbb9ee265cdd
added ISABELLE_PLATFORM and ISABELLE_PLATFORM64 -- NB: ML and JVM may have a different idea;
wenzelm
parents:
diff
changeset
|
23 |
;; |
cbb9ee265cdd
added ISABELLE_PLATFORM and ISABELLE_PLATFORM64 -- NB: ML and JVM may have a different idea;
wenzelm
parents:
diff
changeset
|
24 |
Darwin) |
50182 | 25 |
ISABELLE_PLATFORM_FAMILY="macos" |
36196
cbb9ee265cdd
added ISABELLE_PLATFORM and ISABELLE_PLATFORM64 -- NB: ML and JVM may have a different idea;
wenzelm
parents:
diff
changeset
|
26 |
case $(uname -m) in |
cbb9ee265cdd
added ISABELLE_PLATFORM and ISABELLE_PLATFORM64 -- NB: ML and JVM may have a different idea;
wenzelm
parents:
diff
changeset
|
27 |
i?86) |
48455 | 28 |
ISABELLE_PLATFORM32=x86-darwin |
36196
cbb9ee265cdd
added ISABELLE_PLATFORM and ISABELLE_PLATFORM64 -- NB: ML and JVM may have a different idea;
wenzelm
parents:
diff
changeset
|
29 |
if [ "$(sysctl -n hw.optional.x86_64 2>/dev/null)" = 1 ]; then |
cbb9ee265cdd
added ISABELLE_PLATFORM and ISABELLE_PLATFORM64 -- NB: ML and JVM may have a different idea;
wenzelm
parents:
diff
changeset
|
30 |
ISABELLE_PLATFORM64=x86_64-darwin |
cbb9ee265cdd
added ISABELLE_PLATFORM and ISABELLE_PLATFORM64 -- NB: ML and JVM may have a different idea;
wenzelm
parents:
diff
changeset
|
31 |
fi |
cbb9ee265cdd
added ISABELLE_PLATFORM and ISABELLE_PLATFORM64 -- NB: ML and JVM may have a different idea;
wenzelm
parents:
diff
changeset
|
32 |
;; |
36213
4df49260bd82
accept x86_64 results gracefully -- NB: Mac OS does report that if booted in 64 bit mode;
wenzelm
parents:
36196
diff
changeset
|
33 |
x86_64) |
48455 | 34 |
ISABELLE_PLATFORM32=x86-darwin |
36213
4df49260bd82
accept x86_64 results gracefully -- NB: Mac OS does report that if booted in 64 bit mode;
wenzelm
parents:
36196
diff
changeset
|
35 |
ISABELLE_PLATFORM64=x86_64-darwin |
4df49260bd82
accept x86_64 results gracefully -- NB: Mac OS does report that if booted in 64 bit mode;
wenzelm
parents:
36196
diff
changeset
|
36 |
;; |
36196
cbb9ee265cdd
added ISABELLE_PLATFORM and ISABELLE_PLATFORM64 -- NB: ML and JVM may have a different idea;
wenzelm
parents:
diff
changeset
|
37 |
esac |
cbb9ee265cdd
added ISABELLE_PLATFORM and ISABELLE_PLATFORM64 -- NB: ML and JVM may have a different idea;
wenzelm
parents:
diff
changeset
|
38 |
;; |
cbb9ee265cdd
added ISABELLE_PLATFORM and ISABELLE_PLATFORM64 -- NB: ML and JVM may have a different idea;
wenzelm
parents:
diff
changeset
|
39 |
CYGWIN_NT*) |
50182 | 40 |
ISABELLE_PLATFORM_FAMILY="windows" |
36196
cbb9ee265cdd
added ISABELLE_PLATFORM and ISABELLE_PLATFORM64 -- NB: ML and JVM may have a different idea;
wenzelm
parents:
diff
changeset
|
41 |
case $(uname -m) in |
36213
4df49260bd82
accept x86_64 results gracefully -- NB: Mac OS does report that if booted in 64 bit mode;
wenzelm
parents:
36196
diff
changeset
|
42 |
i?86 | x86_64) |
48455 | 43 |
ISABELLE_PLATFORM32=x86-cygwin |
36196
cbb9ee265cdd
added ISABELLE_PLATFORM and ISABELLE_PLATFORM64 -- NB: ML and JVM may have a different idea;
wenzelm
parents:
diff
changeset
|
44 |
;; |
cbb9ee265cdd
added ISABELLE_PLATFORM and ISABELLE_PLATFORM64 -- NB: ML and JVM may have a different idea;
wenzelm
parents:
diff
changeset
|
45 |
esac |
cbb9ee265cdd
added ISABELLE_PLATFORM and ISABELLE_PLATFORM64 -- NB: ML and JVM may have a different idea;
wenzelm
parents:
diff
changeset
|
46 |
;; |
42716
45eb6829dde2
pretend that all versions of BSD are Linux, which might actually work due to binary compatibilty mode of these obsolete platforms;
wenzelm
parents:
37012
diff
changeset
|
47 |
*BSD) |
50182 | 48 |
ISABELLE_PLATFORM_FAMILY="linux" |
36196
cbb9ee265cdd
added ISABELLE_PLATFORM and ISABELLE_PLATFORM64 -- NB: ML and JVM may have a different idea;
wenzelm
parents:
diff
changeset
|
49 |
case $(uname -m) in |
36213
4df49260bd82
accept x86_64 results gracefully -- NB: Mac OS does report that if booted in 64 bit mode;
wenzelm
parents:
36196
diff
changeset
|
50 |
i?86 | x86_64) |
48455 | 51 |
ISABELLE_PLATFORM32=x86-linux #cf. BSD Linux Binary Compatibility |
36196
cbb9ee265cdd
added ISABELLE_PLATFORM and ISABELLE_PLATFORM64 -- NB: ML and JVM may have a different idea;
wenzelm
parents:
diff
changeset
|
52 |
;; |
cbb9ee265cdd
added ISABELLE_PLATFORM and ISABELLE_PLATFORM64 -- NB: ML and JVM may have a different idea;
wenzelm
parents:
diff
changeset
|
53 |
esac |
cbb9ee265cdd
added ISABELLE_PLATFORM and ISABELLE_PLATFORM64 -- NB: ML and JVM may have a different idea;
wenzelm
parents:
diff
changeset
|
54 |
;; |
cbb9ee265cdd
added ISABELLE_PLATFORM and ISABELLE_PLATFORM64 -- NB: ML and JVM may have a different idea;
wenzelm
parents:
diff
changeset
|
55 |
esac |
cbb9ee265cdd
added ISABELLE_PLATFORM and ISABELLE_PLATFORM64 -- NB: ML and JVM may have a different idea;
wenzelm
parents:
diff
changeset
|
56 |
|
48455 | 57 |
ISABELLE_PLATFORM="$ISABELLE_PLATFORM32" |
58 |