author | wenzelm |
Thu, 15 Jul 2021 16:35:45 +0200 | |
changeset 73987 | fc363a3b690a |
parent 73705 | ac07f6be27ea |
child 73993 | 3868fed3c34b |
permissions | -rwxr-xr-x |
27628
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
1 |
#!/usr/bin/env bash |
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
2 |
# |
27629 | 3 |
# Administrative build for Isabelle source distribution. |
27628
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
4 |
|
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
5 |
## directory layout |
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
6 |
|
34282
549969a7f582
simplified build/bootstrap of Isabelle/Scala components -- avoid make;
wenzelm
parents:
31831
diff
changeset
|
7 |
if [ -z "$ISABELLE_HOME" ]; then |
73705
ac07f6be27ea
avoid unexpected output+behaviour when CDPATH is set
kleing
parents:
71367
diff
changeset
|
8 |
unset CDPATH |
34282
549969a7f582
simplified build/bootstrap of Isabelle/Scala components -- avoid make;
wenzelm
parents:
31831
diff
changeset
|
9 |
ISABELLE_HOME="$(cd "$(dirname "$0")"; cd "$(pwd -P)"; cd ..; pwd)" |
549969a7f582
simplified build/bootstrap of Isabelle/Scala components -- avoid make;
wenzelm
parents:
31831
diff
changeset
|
10 |
ISABELLE_TOOL="$ISABELLE_HOME/bin/isabelle" |
549969a7f582
simplified build/bootstrap of Isabelle/Scala components -- avoid make;
wenzelm
parents:
31831
diff
changeset
|
11 |
fi |
27628
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
12 |
|
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
13 |
|
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
14 |
## diagnostics |
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
15 |
|
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
16 |
PRG="$(basename "$0")" |
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
17 |
|
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
18 |
function usage() |
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
19 |
{ |
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
20 |
cat <<EOF |
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
21 |
|
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
22 |
Usage: $PRG [MODULES] |
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
23 |
|
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
24 |
Produce Isabelle distribution modules from current repository sources. |
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
25 |
The MODULES list may contain any of the following: |
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
26 |
|
48691
335d60e1e328
discontinued presumably obsolete attempts at doc-src testing (cf. 3b02b0ef8d48, 89cc3dfb383b);
wenzelm
parents:
48498
diff
changeset
|
27 |
all all modules below |
58791 | 28 |
browser graph browser |
29 |
jars Isabelle/Scala |
|
43280 | 30 |
jars_fresh fresh build of jars |
27628
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
31 |
|
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
32 |
EOF |
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
33 |
exit 1 |
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
34 |
} |
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
35 |
|
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
36 |
function fail() |
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
37 |
{ |
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
38 |
echo "$1" >&2 |
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
39 |
exit 2 |
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
40 |
} |
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
41 |
|
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
42 |
|
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
43 |
## process command line |
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
44 |
|
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
45 |
[ "$#" -eq 0 ] && usage |
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
46 |
|
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
47 |
MODULES="$@"; shift "$#" |
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
48 |
|
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
49 |
|
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
50 |
## modules |
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
51 |
|
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
52 |
function build_all () |
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
53 |
{ |
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
54 |
build_browser |
73987
fc363a3b690a
build.props for isabelle.jar, including isabelle.jedit;
wenzelm
parents:
73705
diff
changeset
|
55 |
build_setup build |
27628
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
56 |
} |
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
57 |
|
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
58 |
|
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
59 |
function build_browser () |
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
60 |
{ |
34283
7911e83d06c0
simplified build/bootstrap of graph browser -- avoid make;
wenzelm
parents:
34282
diff
changeset
|
61 |
pushd "$ISABELLE_HOME/lib/browser" >/dev/null |
34297 | 62 |
"$ISABELLE_TOOL" env ./build || exit $? |
34283
7911e83d06c0
simplified build/bootstrap of graph browser -- avoid make;
wenzelm
parents:
34282
diff
changeset
|
63 |
popd >/dev/null |
27628
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
64 |
} |
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
65 |
|
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
66 |
|
73987
fc363a3b690a
build.props for isabelle.jar, including isabelle.jedit;
wenzelm
parents:
73705
diff
changeset
|
67 |
function build_setup () |
27628
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
68 |
{ |
73987
fc363a3b690a
build.props for isabelle.jar, including isabelle.jedit;
wenzelm
parents:
73705
diff
changeset
|
69 |
rm -rf \ |
fc363a3b690a
build.props for isabelle.jar, including isabelle.jedit;
wenzelm
parents:
73705
diff
changeset
|
70 |
"$ISABELLE_HOME/lib/classes/Pure.jar" \ |
fc363a3b690a
build.props for isabelle.jar, including isabelle.jedit;
wenzelm
parents:
73705
diff
changeset
|
71 |
"$ISABELLE_HOME/lib/classes/Pure.shasum" \ |
fc363a3b690a
build.props for isabelle.jar, including isabelle.jedit;
wenzelm
parents:
73705
diff
changeset
|
72 |
"$ISABELLE_HOME/src/Tools/jEdit/dist" |
fc363a3b690a
build.props for isabelle.jar, including isabelle.jedit;
wenzelm
parents:
73705
diff
changeset
|
73 |
"$ISABELLE_TOOL" java isabelle.setup.Setup "$@" |
27628
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
74 |
} |
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
75 |
|
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
76 |
|
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
77 |
## main |
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
78 |
|
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
79 |
for MODULE in $MODULES |
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
80 |
do |
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
81 |
case $MODULE in |
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
82 |
all) build_all;; |
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
83 |
browser) build_browser;; |
73987
fc363a3b690a
build.props for isabelle.jar, including isabelle.jedit;
wenzelm
parents:
73705
diff
changeset
|
84 |
jars) build_setup build;; |
fc363a3b690a
build.props for isabelle.jar, including isabelle.jedit;
wenzelm
parents:
73705
diff
changeset
|
85 |
jars_fresh) build_setup build_fresh;; |
27628
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
86 |
*) fail "Bad module $MODULE" |
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
87 |
esac |
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
88 |
done |