author | wenzelm |
Fri, 08 Dec 2023 13:36:47 +0100 | |
changeset 79199 | 8b77c95ed36a |
parent 78591 | b1e0fb71435d |
permissions | -rwxr-xr-x |
74038 | 1 |
#!/usr/bin/env bash |
2 |
# |
|
3 |
# Author: Makarius |
|
4 |
# |
|
5 |
# DESCRIPTION: build Isabelle/Scala/Java components |
|
6 |
||
7 |
## diagnostics |
|
8 |
||
9 |
PRG="$(basename "$0")" |
|
10 |
||
11 |
function usage() |
|
12 |
{ |
|
13 |
echo |
|
14 |
echo "Usage: isabelle $PRG [OPTIONS]" |
|
15 |
echo |
|
16 |
echo " Options are:" |
|
17 |
echo " -f force fresh build" |
|
18 |
echo " -q quiet mode: suppress stdout/stderr" |
|
19 |
echo |
|
74041 | 20 |
echo " Build Isabelle/Scala/Java modules of all registered components" |
21 |
echo " (if required)." |
|
22 |
echo |
|
74038 | 23 |
exit 1 |
24 |
} |
|
25 |
||
26 |
||
27 |
## process command line |
|
28 |
||
29 |
COMMAND="build" |
|
30 |
QUIET="" |
|
31 |
||
32 |
while getopts "fq" OPT |
|
33 |
do |
|
34 |
case "$OPT" in |
|
35 |
f) |
|
36 |
COMMAND="build_fresh" |
|
37 |
;; |
|
38 |
q) |
|
39 |
QUIET="true" |
|
40 |
;; |
|
41 |
\?) |
|
42 |
usage |
|
43 |
;; |
|
44 |
esac |
|
45 |
done |
|
46 |
||
47 |
shift $(($OPTIND - 1)) |
|
48 |
||
49 |
[ "$#" -ne 0 ] && usage |
|
50 |
||
51 |
||
52 |
## main |
|
53 |
||
76343
6a6f650cc5a2
more robust reset of CLASSPATH: unset variable means "." in certain situations, e.g. scalac;
wenzelm
parents:
74041
diff
changeset
|
54 |
classpath "$CLASSPATH"; export CLASSPATH="" |
74038 | 55 |
|
56 |
eval "declare -a JAVA_ARGS=($ISABELLE_TOOL_JAVA_OPTIONS)" |
|
57 |
||
58 |
JAVA_ARGS["${#JAVA_ARGS[@]}"]="-classpath" |
|
59 |
JAVA_ARGS["${#JAVA_ARGS[@]}"]="$(platform_path "$ISABELLE_CLASSPATH")" |
|
60 |
JAVA_ARGS["${#JAVA_ARGS[@]}"]="isabelle.setup.Setup" |
|
61 |
JAVA_ARGS["${#JAVA_ARGS[@]}"]="$COMMAND" |
|
62 |
||
63 |
if [ -z "$QUIET" ]; then |
|
64 |
isabelle_java java "${JAVA_ARGS[@]}" |
|
65 |
else |
|
66 |
isabelle_java java "${JAVA_ARGS[@]}" > /dev/null 2> /dev/null |
|
67 |
fi |