author | wenzelm |
Mon, 03 Dec 2018 15:15:54 +0100 | |
changeset 69394 | f3240f3aa698 |
parent 66731 | fe2a6ec20b4d |
child 71342 | d72d4a9316c9 |
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 |
# |
66731 | 3 |
# determine general hardware and operating system type for Isabelle system tools |
36196
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 |
|
50182 | 6 |
ISABELLE_PLATFORM_FAMILY="" |
48455 | 7 |
ISABELLE_PLATFORM32="" |
36196
cbb9ee265cdd
added ISABELLE_PLATFORM and ISABELLE_PLATFORM64 -- NB: ML and JVM may have a different idea;
wenzelm
parents:
diff
changeset
|
8 |
ISABELLE_PLATFORM64="" |
65072 | 9 |
ISABELLE_WINDOWS_PLATFORM32="" |
10 |
ISABELLE_WINDOWS_PLATFORM64="" |
|
36196
cbb9ee265cdd
added ISABELLE_PLATFORM and ISABELLE_PLATFORM64 -- NB: ML and JVM may have a different idea;
wenzelm
parents:
diff
changeset
|
11 |
|
cbb9ee265cdd
added ISABELLE_PLATFORM and ISABELLE_PLATFORM64 -- NB: ML and JVM may have a different idea;
wenzelm
parents:
diff
changeset
|
12 |
case $(uname -s) in |
cbb9ee265cdd
added ISABELLE_PLATFORM and ISABELLE_PLATFORM64 -- NB: ML and JVM may have a different idea;
wenzelm
parents:
diff
changeset
|
13 |
Linux) |
50182 | 14 |
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
|
15 |
case $(uname -m) in |
cbb9ee265cdd
added ISABELLE_PLATFORM and ISABELLE_PLATFORM64 -- NB: ML and JVM may have a different idea;
wenzelm
parents:
diff
changeset
|
16 |
i?86) |
48455 | 17 |
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
|
18 |
;; |
cbb9ee265cdd
added ISABELLE_PLATFORM and ISABELLE_PLATFORM64 -- NB: ML and JVM may have a different idea;
wenzelm
parents:
diff
changeset
|
19 |
x86_64) |
48455 | 20 |
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
|
21 |
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
|
22 |
;; |
cbb9ee265cdd
added ISABELLE_PLATFORM and ISABELLE_PLATFORM64 -- NB: ML and JVM may have a different idea;
wenzelm
parents:
diff
changeset
|
23 |
esac |
cbb9ee265cdd
added ISABELLE_PLATFORM and ISABELLE_PLATFORM64 -- NB: ML and JVM may have a different idea;
wenzelm
parents:
diff
changeset
|
24 |
;; |
cbb9ee265cdd
added ISABELLE_PLATFORM and ISABELLE_PLATFORM64 -- NB: ML and JVM may have a different idea;
wenzelm
parents:
diff
changeset
|
25 |
Darwin) |
50182 | 26 |
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
|
27 |
case $(uname -m) in |
cbb9ee265cdd
added ISABELLE_PLATFORM and ISABELLE_PLATFORM64 -- NB: ML and JVM may have a different idea;
wenzelm
parents:
diff
changeset
|
28 |
i?86) |
48455 | 29 |
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
|
30 |
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
|
31 |
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
|
32 |
fi |
cbb9ee265cdd
added ISABELLE_PLATFORM and ISABELLE_PLATFORM64 -- NB: ML and JVM may have a different idea;
wenzelm
parents:
diff
changeset
|
33 |
;; |
36213
4df49260bd82
accept x86_64 results gracefully -- NB: Mac OS does report that if booted in 64 bit mode;
wenzelm
parents:
36196
diff
changeset
|
34 |
x86_64) |
48455 | 35 |
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
|
36 |
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
|
37 |
;; |
36196
cbb9ee265cdd
added ISABELLE_PLATFORM and ISABELLE_PLATFORM64 -- NB: ML and JVM may have a different idea;
wenzelm
parents:
diff
changeset
|
38 |
esac |
cbb9ee265cdd
added ISABELLE_PLATFORM and ISABELLE_PLATFORM64 -- NB: ML and JVM may have a different idea;
wenzelm
parents:
diff
changeset
|
39 |
;; |
cbb9ee265cdd
added ISABELLE_PLATFORM and ISABELLE_PLATFORM64 -- NB: ML and JVM may have a different idea;
wenzelm
parents:
diff
changeset
|
40 |
CYGWIN_NT*) |
50182 | 41 |
ISABELLE_PLATFORM_FAMILY="windows" |
66691 | 42 |
if [ "$PROCESSOR_ARCHITECTURE" = "AMD64" -o "$PROCESSOR_ARCHITEW6432" = "AMD64" ]; then |
43 |
ISABELLE_WINDOWS_PLATFORM32="x86-windows" |
|
44 |
ISABELLE_WINDOWS_PLATFORM64="x86_64-windows" |
|
45 |
else |
|
46 |
ISABELLE_WINDOWS_PLATFORM32="x86-windows" |
|
47 |
fi |
|
36196
cbb9ee265cdd
added ISABELLE_PLATFORM and ISABELLE_PLATFORM64 -- NB: ML and JVM may have a different idea;
wenzelm
parents:
diff
changeset
|
48 |
case $(uname -m) in |
66691 | 49 |
x86_64) |
50 |
ISABELLE_PLATFORM64=x86_64-cygwin |
|
51 |
;; |
|
52 |
i?86) |
|
48455 | 53 |
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
|
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 |
;; |
cbb9ee265cdd
added ISABELLE_PLATFORM and ISABELLE_PLATFORM64 -- NB: ML and JVM may have a different idea;
wenzelm
parents:
diff
changeset
|
57 |
esac |
cbb9ee265cdd
added ISABELLE_PLATFORM and ISABELLE_PLATFORM64 -- NB: ML and JVM may have a different idea;
wenzelm
parents:
diff
changeset
|
58 |
|
66691 | 59 |
ISABELLE_PLATFORM="${ISABELLE_PLATFORM32:-$ISABELLE_PLATFORM64}" |
60 |
ISABELLE_WINDOWS_PLATFORM="${ISABELLE_WINDOWS_PLATFORM32:-$ISABELLE_WINDOWS_PLATFORM64}" |