include scala-compiler.jar in basic Isabelle/Scala environment, to make Isabelle/jEdit console work with scala-2.10.0-M3;
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
18 General/linear_set.scala
20 General/position.scala
22 General/properties.scala
29 Isar/outer_syntax.scala
35 PIDE/isabelle_markup.scala
37 PIDE/markup_tree.scala
44 System/event_bus.scala
45 System/gui_setup.scala
46 System/invoke_scala.scala
47 System/isabelle_charset.scala
48 System/isabelle_process.scala
49 System/isabelle_system.scala
53 System/session_manager.scala
54 System/standard_system.scala
55 System/swing_thread.scala
56 System/system_channel.scala
72 PRG="$(basename "$0")"
77 echo "Usage: isabelle $PRG [OPTIONS]"
80 echo " -f fresh build"
81 echo " -t test separate compilation of PIDE"
92 [ -z "$ISABELLE_HOME" ] && fail "Missing Isabelle settings environment"
95 ## process command line
102 while getopts "ft" OPT
117 shift $(($OPTIND - 1))
122 [ "$#" -ne 0 ] && usage
128 TARGET_DIR="$ISABELLE_HOME/lib/classes"
129 TARGET="$TARGET_DIR/ext/Pure.jar"
131 declare -a PIDE_SOURCES=()
132 declare -a PURE_SOURCES=()
134 for DEP in "${SOURCES[@]}"
136 if grep "Module:.*PIDE" "$DEP" >/dev/null
138 PIDE_SOURCES["${#PIDE_SOURCES[@]}"]="$DEP"
140 PURE_SOURCES["${#PURE_SOURCES[@]}"]="$DEP"
144 declare -a UPDATED=()
146 if [ -n "$FRESH" ]; then
150 if [ ! -e "$TARGET" ]; then
153 for DEP in "${SOURCES[@]}"
155 [ ! -e "$DEP" ] && fail "Missing file: $DEP"
156 [ "$DEP" -nt "$TARGET" ] && {
158 UPDATED["${#UPDATED[@]}"]="$DEP"
164 if [ "$OUTDATED" = true ]
166 echo "### Building Isabelle/Scala layer ..."
168 [ "${#UPDATED[@]}" -gt 0 ] && {
169 echo "Changed files:"
170 for FILE in "${UPDATED[@]}"
176 rm -rf classes && mkdir classes
178 SCALAC_OPTIONS="$ISABELLE_SCALA_BUILD_OPTIONS -d classes"
180 if [ "$TEST_PIDE" = true ]; then
181 isabelle_scala scalac $SCALAC_OPTIONS "${PIDE_SOURCES[@]}" || \
182 fail "Failed to compile PIDE sources"
183 isabelle_scala scalac $SCALAC_OPTIONS -classpath classes "${PURE_SOURCES[@]}" || \
184 fail "Failed to compile Pure sources"
186 isabelle_scala scalac $SCALAC_OPTIONS -classpath classes \
187 "${PIDE_SOURCES[@]}" "${PURE_SOURCES[@]}" || \
188 fail "Failed to compile sources"
191 mkdir -p "$TARGET_DIR/ext" || fail "Failed to create directory $TARGET_DIR/ext"
193 pushd classes >/dev/null
195 CHARSET_SERVICE="META-INF/services/java.nio.charset.spi.CharsetProvider"
196 mkdir -p "$(dirname "$CHARSET_SERVICE")"
197 echo isabelle.Isabelle_Charset_Provider > "$CHARSET_SERVICE"
199 isabelle_jdk jar cfe "$(jvmpath "$TARGET")" isabelle.GUI_Setup META-INF isabelle || \
200 fail "Failed to produce $TARGET"
202 cp "$SCALA_HOME/lib/scala-compiler.jar" \
203 "$SCALA_HOME/lib/scala-library.jar" \
204 "$SCALA_HOME/lib/scala-swing.jar" "$TARGET_DIR/ext"
206 [ -e "$SCALA_HOME/lib/scala-actors.jar" ] && \
207 cp "$SCALA_HOME/lib/scala-actors.jar" "$TARGET_DIR/ext"