src/Tools/jEdit/jedit_build/Tools/jedit
author wenzelm
Sat, 21 May 2011 00:01:15 +0200
changeset 42900 4a26abd3d57b
child 42906 7438ee56b89a
permissions -rwxr-xr-x
build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
42900
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
     1
#!/usr/bin/env bash
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
     2
#
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
     3
# Author: Makarius
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
     4
#
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
     5
# DESCRIPTION: build and run Isabelle/jEdit on the spot
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
     6
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
     7
## diagnostics
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
     8
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
     9
function fail()
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
    10
{
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
    11
  echo "$1" >&2
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
    12
  exit 2
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
    13
}
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
    14
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
    15
function failed()
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
    16
{
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
    17
  fail "Failed!"
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
    18
}
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
    19
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
    20
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
    21
## dependencies
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
    22
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
    23
[ -z "$ISABELLE_HOME" ] && fail "Missing Isabelle settings environment"
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
    24
[ -z "$SCALA_HOME" ] && fail "Unknown SCALA_HOME -- Scala unavailable"
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
    25
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
    26
[ -z "$ISABELLE_JEDIT_BUILD_HOME" ] && \
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
    27
  fail "Unknown ISABELLE_JEDIT_BUILD_HOME -- missing auxiliary component"
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
    28
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
    29
[ -e "$ISABELLE_HOME/Admin/build" ] && \
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
    30
  { "$ISABELLE_HOME/Admin/build" jars || exit $?; }
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
    31
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
    32
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
    33
# sources
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
    34
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
    35
SRC_DIR="$ISABELLE_HOME/src/Tools/jEdit"
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
    36
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
    37
declare -a SOURCES=(
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
    38
  "$SRC_DIR/src/jedit/dockable.scala"
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
    39
  "$SRC_DIR/src/jedit/document_model.scala"
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
    40
  "$SRC_DIR/src/jedit/document_view.scala"
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
    41
  "$SRC_DIR/src/jedit/html_panel.scala"
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
    42
  "$SRC_DIR/src/jedit/isabelle_encoding.scala"
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
    43
  "$SRC_DIR/src/jedit/isabelle_hyperlinks.scala"
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
    44
  "$SRC_DIR/src/jedit/isabelle_markup.scala"
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
    45
  "$SRC_DIR/src/jedit/isabelle_options.scala"
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
    46
  "$SRC_DIR/src/jedit/isabelle_sidekick.scala"
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
    47
  "$SRC_DIR/src/jedit/output_dockable.scala"
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
    48
  "$SRC_DIR/src/jedit/plugin.scala"
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
    49
  "$SRC_DIR/src/jedit/protocol_dockable.scala"
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
    50
  "$SRC_DIR/src/jedit/raw_output_dockable.scala"
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
    51
  "$SRC_DIR/src/jedit/scala_console.scala"
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
    52
  "$SRC_DIR/src/jedit/session_dockable.scala"
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
    53
)
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
    54
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
    55
declare -a PLUGIN_FILES=(
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
    56
  "$SRC_DIR/plugin/actions.xml"
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
    57
  "$SRC_DIR/plugin/dockables.xml"
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
    58
  "$SRC_DIR/plugin/Isabelle.props"
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
    59
  "$SRC_DIR/plugin/services.xml"
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
    60
)
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
    61
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
    62
JEDIT_JAR="$ISABELLE_JEDIT_BUILD_HOME/contrib/$ISABELLE_JEDIT_BUILD_VERSION/jedit.jar"
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
    63
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
    64
JEDIT_JARS=(
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
    65
  "$ISABELLE_JEDIT_BUILD_HOME/contrib/Console.jar"
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
    66
  "$ISABELLE_JEDIT_BUILD_HOME/contrib/ErrorList.jar"
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
    67
  "$ISABELLE_JEDIT_BUILD_HOME/contrib/Hyperlinks.jar"
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
    68
  "$ISABELLE_JEDIT_BUILD_HOME/contrib/SideKick.jar"
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
    69
  "$ISABELLE_JEDIT_BUILD_HOME/contrib/cobra.jar"
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
    70
  "$ISABELLE_JEDIT_BUILD_HOME/contrib/js.jar"
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
    71
)
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
    72
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
    73
SCALA_JARS=(
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
    74
  "$SCALA_HOME/lib/scala-compiler.jar"
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
    75
  "$SCALA_HOME/lib/scala-library.jar"
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
    76
  "$SCALA_HOME/lib/scala-swing.jar"
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
    77
)
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
    78
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
    79
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
    80
# target
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
    81
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
    82
TARGET_DIR="$ISABELLE_JEDIT_BUILD_HOME/${ISABELLE_JEDIT_BUILD_VERSION}_Isabelle-$("$ISABELLE_TOOL" version -i)"
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
    83
TARGET="$TARGET_DIR/jars/Isabelle-jEdit.jar"
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
    84
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
    85
OUTDATED=false
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
    86
for SOURCE in "${SOURCES[@]}" "${PLUGIN_FILES[@]}" "$JEDIT_JAR" "${JEDIT_JARS[@]}"
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
    87
do
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
    88
  [ ! -e "$SOURCE" ] && fail "Missing file: $SOURCE"
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
    89
  [ ! -e "$TARGET" -o "$SOURCE" -nt "$TARGET" ] && OUTDATED=true
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
    90
done
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
    91
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
    92
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
    93
## main
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
    94
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
    95
if [ "$OUTDATED" = true ]
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
    96
then
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
    97
  echo "###"
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
    98
  echo "### Building Isabelle/jEdit ..."
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
    99
  echo "###"
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
   100
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
   101
  rm -rf "$TARGET_DIR" || failed
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
   102
  mkdir -p "$TARGET_DIR" "$TARGET_DIR/classes" || failed
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
   103
  cp -a "$ISABELLE_JEDIT_BUILD_HOME/contrib/$ISABELLE_JEDIT_BUILD_VERSION/." "$TARGET_DIR/."
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
   104
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
   105
  cp -a "${PLUGIN_FILES[@]}" "$TARGET_DIR/classes/."
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
   106
  cp -a "$SRC_DIR/dist-template/." "$TARGET_DIR/."
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
   107
  cp -a "$SRC_DIR/README" "$TARGET_DIR/."
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
   108
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
   109
  perl -i -e 'while (<>) { if (m/NAME="javacc"/) {
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
   110
    print qq,<MODE NAME="isabelle" FILE="isabelle.xml" FILE_NAME_GLOB="*.thy"/>\n\n,;
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
   111
    print qq,<MODE NAME="isabelle-session" FILE="isabelle-session.xml" FILE_NAME_GLOB="session.root"/>\n\n,; }
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
   112
    print; }' "$TARGET_DIR/modes/catalog"
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
   113
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
   114
  (
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
   115
    for JAR in "$JEDIT_JAR" "${JEDIT_JARS[@]}" "$SCALA_HOME/lib/scala-compiler.jar"
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
   116
    do
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
   117
      CLASSPATH="$CLASSPATH:$JAR"
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
   118
    done
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
   119
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
   120
    cp -a "${JEDIT_JARS[@]}" "${SCALA_JARS[@]}" "$ISABELLE_HOME/lib/classes/Pure.jar" \
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
   121
      "$TARGET_DIR/jars/." || failed
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
   122
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
   123
    CLASSPATH="$(jvmpath "$CLASSPATH")"
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
   124
    "$SCALA_HOME/bin/scalac" -unchecked -deprecation \
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
   125
      -d "$TARGET_DIR/classes" -target:jvm-1.5 "${SOURCES[@]}" || \
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
   126
      fail "Failed to compile sources"
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
   127
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
   128
    cd "$TARGET_DIR/classes"
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
   129
    jar cf "../jars/Isabelle-jEdit.jar" * || failed
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
   130
    cd ..
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
   131
    rm -rf classes
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
   132
  )
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
   133
fi
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
   134
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
   135
set -o allexport
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
   136
init_component "$TARGET_DIR"
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
   137
set +o allexport
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
   138
4a26abd3d57b build and run Isabelle/jEdit on the spot -- requires auxiliary "jedit_build" component;
wenzelm
parents:
diff changeset
   139
exec "$TARGET_DIR/lib/Tools/jedit" "$@"