merged, resolving obvious conflicts in NEWS and src/Pure/System/isabelle_process.ML;
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
20 General/graphics_file.scala
21 General/linear_set.scala
22 General/multi_map.scala
24 General/position.scala
26 General/properties.scala
38 GUI/swing_thread.scala
39 GUI/system_dialog.scala
43 Isar/outer_syntax.scala
48 PIDE/document_id.scala
51 PIDE/markup_tree.scala
53 PIDE/query_operation.scala
57 System/command_line.scala
58 System/event_bus.scala
59 System/interrupt.scala
60 System/invoke_scala.scala
61 System/isabelle_charset.scala
62 System/isabelle_font.scala
63 System/isabelle_process.scala
64 System/isabelle_system.scala
68 System/system_channel.scala
80 Tools/ml_statistics.scala
81 Tools/sledgehammer_params.scala
82 Tools/task_statistics.scala
92 PRG="$(basename "$0")"
97 echo "Usage: isabelle $PRG [OPTIONS]"
100 echo " -f fresh build"
101 echo " -t test separate compilation of PIDE"
112 [ -z "$ISABELLE_HOME" ] && fail "Missing Isabelle settings environment"
115 ## process command line
122 while getopts "ft" OPT
137 shift $(($OPTIND - 1))
142 [ "$#" -ne 0 ] && usage
147 TARGET_DIR="$ISABELLE_HOME/lib/classes"
148 TARGET="$TARGET_DIR/Pure.jar"
150 declare -a PIDE_SOURCES=()
151 declare -a PURE_SOURCES=()
153 for DEP in "${SOURCES[@]}"
155 if grep "Module:.*PIDE" "$DEP" >/dev/null
157 PIDE_SOURCES["${#PIDE_SOURCES[@]}"]="$DEP"
159 PURE_SOURCES["${#PURE_SOURCES[@]}"]="$DEP"
163 declare -a UPDATED=()
165 if [ -n "$FRESH" ]; then
169 if [ ! -e "$TARGET" ]; then
172 for DEP in "${SOURCES[@]}"
174 [ ! -e "$DEP" ] && fail "Missing file: $DEP"
175 [ "$DEP" -nt "$TARGET" ] && {
177 UPDATED["${#UPDATED[@]}"]="$DEP"
183 if [ "$OUTDATED" = true ]
185 echo "### Building Isabelle/Scala ..."
187 [ "${#UPDATED[@]}" -gt 0 ] && {
188 echo "Changed files:"
189 for FILE in "${UPDATED[@]}"
195 rm -rf classes && mkdir classes
197 SCALAC_OPTIONS="$ISABELLE_SCALA_BUILD_OPTIONS -d classes"
200 classpath "$ISABELLE_JDK_HOME/jre/lib/jfxrt.jar"
202 export CLASSPATH="$(jvmpath "$ISABELLE_CLASSPATH")"
204 if [ "$TEST_PIDE" = true ]; then
205 isabelle_scala scalac $SCALAC_OPTIONS "${PIDE_SOURCES[@]}" || \
206 fail "Failed to compile PIDE sources"
207 isabelle_scala scalac $SCALAC_OPTIONS "${PURE_SOURCES[@]}" || \
208 fail "Failed to compile Pure sources"
210 isabelle_scala scalac $SCALAC_OPTIONS "${PIDE_SOURCES[@]}" "${PURE_SOURCES[@]}" || \
211 fail "Failed to compile sources"
215 mkdir -p "$TARGET_DIR" || fail "Failed to create directory $TARGET_DIR"
217 pushd classes >/dev/null
219 CHARSET_SERVICE="META-INF/services/java.nio.charset.spi.CharsetProvider"
220 mkdir -p "$(dirname "$CHARSET_SERVICE")"
221 echo isabelle.Isabelle_Charset_Provider > "$CHARSET_SERVICE"
223 cp "$ISABELLE_HOME/lib/logo/isabelle-32.gif" isabelle/.
225 isabelle_jdk jar cfe "$(jvmpath "$TARGET")" isabelle.Main META-INF isabelle || \
226 fail "Failed to produce $TARGET"
228 cp "$SCALA_HOME/lib/scala-compiler.jar" \
229 "$SCALA_HOME/lib/scala-library.jar" \
230 "$SCALA_HOME/lib/scala-swing.jar" \
231 "$SCALA_HOME/lib/scala-actors.jar" \
232 "$SCALA_HOME/lib/scala-reflect.jar" \