clarified modules (again) -- NB: both Document and Protocol are specific to this particular prover;
5 # build-jars - build Isabelle/Scala
7 # Requires proper Isabelle settings environment.
12 Concurrent/counter.scala
13 Concurrent/future.scala
14 Concurrent/simple_thread.scala
15 Concurrent/volatile.scala
17 General/linear_set.scala
19 General/position.scala
21 General/properties.scala
28 Isar/outer_syntax.scala
34 PIDE/isabelle_markup.scala
36 PIDE/markup_tree.scala
43 System/event_bus.scala
44 System/gui_setup.scala
45 System/invoke_scala.scala
46 System/isabelle_charset.scala
47 System/isabelle_process.scala
48 System/isabelle_system.scala
51 System/session_manager.scala
52 System/standard_system.scala
53 System/swing_thread.scala
54 System/system_channel.scala
70 PRG="$(basename "$0")"
75 echo "Usage: isabelle $PRG [OPTIONS]"
78 echo " -f fresh build"
89 [ -z "$ISABELLE_HOME" ] && fail "Missing Isabelle settings environment"
90 [ -z "$SCALA_HOME" ] && fail "Unknown SCALA_HOME -- Scala unavailable"
93 ## process command line
111 shift $(($OPTIND - 1))
116 [ "$#" -ne 0 ] && usage
122 TARGET_DIR="$ISABELLE_HOME/lib/classes"
123 TARGET="$TARGET_DIR/ext/Pure.jar"
125 declare -a PIDE_SOURCES=()
126 declare -a PURE_SOURCES=()
128 for DEP in "${SOURCES[@]}"
130 if grep "Module:.*PIDE" "$DEP" >/dev/null
132 PIDE_SOURCES["${#PIDE_SOURCES[@]}"]="$DEP"
134 PURE_SOURCES["${#PURE_SOURCES[@]}"]="$DEP"
138 declare -a UPDATED=()
140 if [ -n "$FRESH" ]; then
144 if [ ! -e "$TARGET" ]; then
147 for DEP in "${SOURCES[@]}"
149 [ ! -e "$DEP" ] && fail "Missing file: $DEP"
150 [ "$DEP" -nt "$TARGET" ] && {
152 UPDATED["${#UPDATED[@]}"]="$DEP"
158 if [ "$OUTDATED" = true ]
160 echo "### Building Isabelle/Scala layer ..."
162 [ "${#UPDATED[@]}" -gt 0 ] && {
163 echo "Changed files:"
164 for FILE in "${UPDATED[@]}"
170 rm -rf classes && mkdir classes
172 SCALAC_OPTIONS="-unchecked -deprecation -d classes -target:jvm-1.5"
174 "$SCALA_HOME/bin/scalac" $SCALAC_OPTIONS "${PIDE_SOURCES[@]}" || \
175 fail "Failed to compile PIDE sources"
177 "$SCALA_HOME/bin/scalac" $SCALAC_OPTIONS -classpath classes "${PURE_SOURCES[@]}" || \
178 fail "Failed to compile Pure sources"
180 mkdir -p "$TARGET_DIR/ext" || fail "Failed to create directory $TARGET_DIR/ext"
182 pushd classes >/dev/null
184 CHARSET_SERVICE="META-INF/services/java.nio.charset.spi.CharsetProvider"
185 mkdir -p "$(dirname "$CHARSET_SERVICE")"
186 echo isabelle.Isabelle_Charset_Provider > "$CHARSET_SERVICE"
188 jar cfe "$(jvmpath "$TARGET")" isabelle.GUI_Setup META-INF isabelle || \
189 fail "Failed to produce $TARGET"
191 cp "$SCALA_HOME/lib/scala-swing.jar" "$SCALA_HOME/lib/scala-library.jar" "$TARGET_DIR/ext"