ISABELLE_JDK_HOME settings variable points to JDK with javac and jar (not just JRE);
update for prospective jdk1.7.x component;
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
52 System/session_manager.scala
53 System/standard_system.scala
54 System/swing_thread.scala
55 System/system_channel.scala
71 PRG="$(basename "$0")"
76 echo "Usage: isabelle $PRG [OPTIONS]"
79 echo " -f fresh build"
90 [ -z "$ISABELLE_HOME" ] && fail "Missing Isabelle settings environment"
91 [ -z "$SCALA_HOME" ] && fail "Unknown SCALA_HOME -- Scala unavailable"
94 ## process command line
100 while getopts "f" OPT
112 shift $(($OPTIND - 1))
117 [ "$#" -ne 0 ] && usage
123 TARGET_DIR="$ISABELLE_HOME/lib/classes"
124 TARGET="$TARGET_DIR/ext/Pure.jar"
126 declare -a PIDE_SOURCES=()
127 declare -a PURE_SOURCES=()
129 for DEP in "${SOURCES[@]}"
131 if grep "Module:.*PIDE" "$DEP" >/dev/null
133 PIDE_SOURCES["${#PIDE_SOURCES[@]}"]="$DEP"
135 PURE_SOURCES["${#PURE_SOURCES[@]}"]="$DEP"
139 declare -a UPDATED=()
141 if [ -n "$FRESH" ]; then
145 if [ ! -e "$TARGET" ]; then
148 for DEP in "${SOURCES[@]}"
150 [ ! -e "$DEP" ] && fail "Missing file: $DEP"
151 [ "$DEP" -nt "$TARGET" ] && {
153 UPDATED["${#UPDATED[@]}"]="$DEP"
159 if [ "$OUTDATED" = true ]
161 echo "### Building Isabelle/Scala layer ..."
163 [ "${#UPDATED[@]}" -gt 0 ] && {
164 echo "Changed files:"
165 for FILE in "${UPDATED[@]}"
171 rm -rf classes && mkdir classes
173 SCALAC_OPTIONS="$ISABELLE_SCALA_BUILD_OPTIONS -d classes"
175 "$SCALA_HOME/bin/scalac" $SCALAC_OPTIONS "${PIDE_SOURCES[@]}" || \
176 fail "Failed to compile PIDE sources"
178 "$SCALA_HOME/bin/scalac" $SCALAC_OPTIONS -classpath classes "${PURE_SOURCES[@]}" || \
179 fail "Failed to compile Pure sources"
181 mkdir -p "$TARGET_DIR/ext" || fail "Failed to create directory $TARGET_DIR/ext"
183 pushd classes >/dev/null
185 CHARSET_SERVICE="META-INF/services/java.nio.charset.spi.CharsetProvider"
186 mkdir -p "$(dirname "$CHARSET_SERVICE")"
187 echo isabelle.Isabelle_Charset_Provider > "$CHARSET_SERVICE"
189 "$ISABELLE_JDK_HOME/bin/jar" cfe "$(jvmpath "$TARGET")" isabelle.GUI_Setup META-INF isabelle || \
190 fail "Failed to produce $TARGET"
192 cp "$SCALA_HOME/lib/scala-swing.jar" "$SCALA_HOME/lib/scala-library.jar" "$TARGET_DIR/ext"