equal
deleted
inserted
replaced
5 # DESCRIPTION: Isabelle/jEdit interface wrapper |
5 # DESCRIPTION: Isabelle/jEdit interface wrapper |
6 |
6 |
7 |
7 |
8 ## sources |
8 ## sources |
9 |
9 |
10 declare -a SOURCES=( |
10 declare -a SOURCE_FILES=( |
11 "src/dockable.scala" |
11 "src/dockable.scala" |
12 "src/document_model.scala" |
12 "src/document_model.scala" |
13 "src/document_view.scala" |
13 "src/document_view.scala" |
14 "src/html_panel.scala" |
14 "src/html_panel.scala" |
15 "src/isabelle_encoding.scala" |
15 "src/isabelle_encoding.scala" |
23 "src/raw_output_dockable.scala" |
23 "src/raw_output_dockable.scala" |
24 "src/scala_console.scala" |
24 "src/scala_console.scala" |
25 "src/session_dockable.scala" |
25 "src/session_dockable.scala" |
26 ) |
26 ) |
27 |
27 |
28 declare -a PLUGIN_FILES=( |
28 declare -a MORE_FILES=( |
29 "plugin/actions.xml" |
29 "src/actions.xml" |
30 "plugin/dockables.xml" |
30 "src/dockables.xml" |
31 "plugin/Isabelle.props" |
31 "src/Isabelle.props" |
32 "plugin/services.xml" |
32 "src/services.xml" |
33 ) |
33 ) |
34 |
34 |
35 |
35 |
36 ## diagnostics |
36 ## diagnostics |
37 |
37 |
167 |
167 |
168 if [ "$BUILD_JARS" = jars_fresh ]; then |
168 if [ "$BUILD_JARS" = jars_fresh ]; then |
169 OUTDATED=true |
169 OUTDATED=true |
170 else |
170 else |
171 OUTDATED=false |
171 OUTDATED=false |
172 for SOURCE in "${SOURCES[@]}" "${PLUGIN_FILES[@]}" "$JEDIT_JAR" "${JEDIT_JARS[@]}" |
172 for SOURCE in "${SOURCE_FILES[@]}" "${MORE_FILES[@]}" "$JEDIT_JAR" "${JEDIT_JARS[@]}" |
173 do |
173 do |
174 [ ! -e "$SOURCE" ] && fail "Missing file: $SOURCE" |
174 [ ! -e "$SOURCE" ] && fail "Missing file: $SOURCE" |
175 [ ! -e "$TARGET" -o "$SOURCE" -nt "$TARGET" ] && OUTDATED=true |
175 [ ! -e "$TARGET" -o "$SOURCE" -nt "$TARGET" ] && OUTDATED=true |
176 done |
176 done |
177 fi |
177 fi |
196 |
196 |
197 rm -rf dist || failed |
197 rm -rf dist || failed |
198 mkdir -p dist dist/classes || failed |
198 mkdir -p dist dist/classes || failed |
199 cp -a "$ISABELLE_JEDIT_BUILD_HOME/contrib/$ISABELLE_JEDIT_BUILD_VERSION/." dist/. |
199 cp -a "$ISABELLE_JEDIT_BUILD_HOME/contrib/$ISABELLE_JEDIT_BUILD_VERSION/." dist/. |
200 |
200 |
201 cp -a "${PLUGIN_FILES[@]}" dist/classes/. |
201 cp -a "${MORE_FILES[@]}" dist/classes/. |
202 cp -a dist-template/. dist/. |
202 cp -a dist-template/. dist/. |
203 cp -a README dist/. |
|
204 |
203 |
205 perl -i -e 'while (<>) { if (m/NAME="javacc"/) { |
204 perl -i -e 'while (<>) { if (m/NAME="javacc"/) { |
206 print qq,<MODE NAME="isabelle" FILE="isabelle.xml" FILE_NAME_GLOB="*.thy"/>\n\n,; |
205 print qq,<MODE NAME="isabelle" FILE="isabelle.xml" FILE_NAME_GLOB="*.thy"/>\n\n,; |
207 print qq,<MODE NAME="isabelle-session" FILE="isabelle-session.xml" FILE_NAME_GLOB="session.root"/>\n\n,; } |
206 print qq,<MODE NAME="isabelle-session" FILE="isabelle-session.xml" FILE_NAME_GLOB="session.root"/>\n\n,; } |
208 print; }' dist/modes/catalog |
207 print; }' dist/modes/catalog |
216 CLASSPATH="$CLASSPATH:$JAR" |
215 CLASSPATH="$CLASSPATH:$JAR" |
217 done |
216 done |
218 CLASSPATH="$(jvmpath "$CLASSPATH")" |
217 CLASSPATH="$(jvmpath "$CLASSPATH")" |
219 |
218 |
220 exec "$SCALA_HOME/bin/scalac" -unchecked -deprecation \ |
219 exec "$SCALA_HOME/bin/scalac" -unchecked -deprecation \ |
221 -d dist/classes -target:jvm-1.5 "${SOURCES[@]}" |
220 -d dist/classes -target:jvm-1.5 "${SOURCE_FILES[@]}" |
222 ) || fail "Failed to compile sources" |
221 ) || fail "Failed to compile sources" |
223 |
222 |
224 cd dist/classes |
223 cd dist/classes |
225 jar cf "../jars/Isabelle-jEdit.jar" * || failed |
224 jar cf "../jars/Isabelle-jEdit.jar" * || failed |
226 cd ../.. |
225 cd ../.. |