src/Pure/build-jars
author wenzelm
Thu, 24 May 2012 22:49:39 +0200
changeset 47995 72f52cd7c633
parent 47849 48b52cdc214a
child 47997 0a43fc778cd2
permissions -rwxr-xr-x
include scala-compiler.jar in basic Isabelle/Scala environment, to make Isabelle/jEdit console work with scala-2.10.0-M3;
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
34282
549969a7f582 simplified build/bootstrap of Isabelle/Scala components -- avoid make;
wenzelm
parents:
diff changeset
     1
#!/usr/bin/env bash
549969a7f582 simplified build/bootstrap of Isabelle/Scala components -- avoid make;
wenzelm
parents:
diff changeset
     2
#
549969a7f582 simplified build/bootstrap of Isabelle/Scala components -- avoid make;
wenzelm
parents:
diff changeset
     3
# Author: Makarius
549969a7f582 simplified build/bootstrap of Isabelle/Scala components -- avoid make;
wenzelm
parents:
diff changeset
     4
#
42899
108e815fdc8e misc tuning and update;
wenzelm
parents: 42720
diff changeset
     5
# build-jars - build Isabelle/Scala
34282
549969a7f582 simplified build/bootstrap of Isabelle/Scala components -- avoid make;
wenzelm
parents:
diff changeset
     6
#
549969a7f582 simplified build/bootstrap of Isabelle/Scala components -- avoid make;
wenzelm
parents:
diff changeset
     7
# Requires proper Isabelle settings environment.
549969a7f582 simplified build/bootstrap of Isabelle/Scala components -- avoid make;
wenzelm
parents:
diff changeset
     8
43320
wenzelm
parents: 43285
diff changeset
     9
## sources
wenzelm
parents: 43285
diff changeset
    10
wenzelm
parents: 43285
diff changeset
    11
declare -a SOURCES=(
43660
bfc0bb115fa1 explicit class Counter;
wenzelm
parents: 43651
diff changeset
    12
  Concurrent/counter.scala
43320
wenzelm
parents: 43285
diff changeset
    13
  Concurrent/future.scala
wenzelm
parents: 43285
diff changeset
    14
  Concurrent/simple_thread.scala
wenzelm
parents: 43285
diff changeset
    15
  Concurrent/volatile.scala
wenzelm
parents: 43285
diff changeset
    16
  General/exn.scala
46611
669601fa1a62 directed graphs (in Scala);
wenzelm
parents: 45709
diff changeset
    17
  General/graph.scala
43320
wenzelm
parents: 43285
diff changeset
    18
  General/linear_set.scala
43600
4ac04bf9ff89 abstract algebra of file paths in Scala (cf. path.ML);
wenzelm
parents: 43523
diff changeset
    19
  General/path.scala
43320
wenzelm
parents: 43285
diff changeset
    20
  General/position.scala
wenzelm
parents: 43285
diff changeset
    21
  General/pretty.scala
43780
2cb2310d68b6 more uniform Properties in ML and Scala;
wenzelm
parents: 43779
diff changeset
    22
  General/properties.scala
43320
wenzelm
parents: 43285
diff changeset
    23
  General/scan.scala
wenzelm
parents: 43285
diff changeset
    24
  General/sha1.scala
wenzelm
parents: 43285
diff changeset
    25
  General/symbol.scala
45674
eb65c9d17e2f clarified Time vs. Timing;
wenzelm
parents: 45673
diff changeset
    26
  General/time.scala
45666
d83797ef0d2d separate module for concrete Isabelle markup;
wenzelm
parents: 45027
diff changeset
    27
  General/timing.scala
43320
wenzelm
parents: 43285
diff changeset
    28
  Isar/keyword.scala
wenzelm
parents: 43285
diff changeset
    29
  Isar/outer_syntax.scala
wenzelm
parents: 43285
diff changeset
    30
  Isar/parse.scala
wenzelm
parents: 43285
diff changeset
    31
  Isar/token.scala
43715
518e44a0ee15 some support for blobs (arbitrary text files) within document nodes;
wenzelm
parents: 43695
diff changeset
    32
  PIDE/blob.scala
43320
wenzelm
parents: 43285
diff changeset
    33
  PIDE/command.scala
wenzelm
parents: 43285
diff changeset
    34
  PIDE/document.scala
45670
b84170538043 rearranged files;
wenzelm
parents: 45666
diff changeset
    35
  PIDE/isabelle_markup.scala
b84170538043 rearranged files;
wenzelm
parents: 45666
diff changeset
    36
  PIDE/markup.scala
43320
wenzelm
parents: 43285
diff changeset
    37
  PIDE/markup_tree.scala
45709
87017fcbad83 clarified modules (again) -- NB: both Document and Protocol are specific to this particular prover;
wenzelm
parents: 45674
diff changeset
    38
  PIDE/protocol.scala
43320
wenzelm
parents: 43285
diff changeset
    39
  PIDE/text.scala
44698
0385292321a0 moved XML/YXML to src/Pure/PIDE;
wenzelm
parents: 43780
diff changeset
    40
  PIDE/xml.scala
0385292321a0 moved XML/YXML to src/Pure/PIDE;
wenzelm
parents: 43780
diff changeset
    41
  PIDE/yxml.scala
43320
wenzelm
parents: 43285
diff changeset
    42
  System/cygwin.scala
wenzelm
parents: 43285
diff changeset
    43
  System/download.scala
wenzelm
parents: 43285
diff changeset
    44
  System/event_bus.scala
wenzelm
parents: 43285
diff changeset
    45
  System/gui_setup.scala
43744
2c7e1565b4a3 some support to invoke Scala methods under program control;
wenzelm
parents: 43730
diff changeset
    46
  System/invoke_scala.scala
43517
87ec9a1c0f98 basic setup for Isabelle charset;
wenzelm
parents: 43405
diff changeset
    47
  System/isabelle_charset.scala
43320
wenzelm
parents: 43285
diff changeset
    48
  System/isabelle_process.scala
wenzelm
parents: 43285
diff changeset
    49
  System/isabelle_system.scala
47663
20e0865ae9e7 default Isabelle application wrapper -- JVM entry point for Isabelle.exe;
wenzelm
parents: 47408
diff changeset
    50
  System/main.scala
43320
wenzelm
parents: 43285
diff changeset
    51
  System/platform.scala
wenzelm
parents: 43285
diff changeset
    52
  System/session.scala
wenzelm
parents: 43285
diff changeset
    53
  System/session_manager.scala
wenzelm
parents: 43285
diff changeset
    54
  System/standard_system.scala
wenzelm
parents: 43285
diff changeset
    55
  System/swing_thread.scala
45027
f459e93a038e more abstract wrapping of fifos as System_Channel;
wenzelm
parents: 44698
diff changeset
    56
  System/system_channel.scala
43320
wenzelm
parents: 43285
diff changeset
    57
  Thy/completion.scala
wenzelm
parents: 43285
diff changeset
    58
  Thy/html.scala
wenzelm
parents: 43285
diff changeset
    59
  Thy/thy_header.scala
43651
511df47bcadc some support for theory files within Isabelle/Scala session;
wenzelm
parents: 43600
diff changeset
    60
  Thy/thy_info.scala
511df47bcadc some support for theory files within Isabelle/Scala session;
wenzelm
parents: 43600
diff changeset
    61
  Thy/thy_load.scala
43320
wenzelm
parents: 43285
diff changeset
    62
  Thy/thy_syntax.scala
wenzelm
parents: 43285
diff changeset
    63
  library.scala
wenzelm
parents: 43285
diff changeset
    64
  package.scala
43730
a0ed7bc688b5 lambda terms with XML data representation in Scala;
wenzelm
parents: 43715
diff changeset
    65
  term.scala
43779
47bec02c6762 more uniform Term and Term_XML modules;
wenzelm
parents: 43776
diff changeset
    66
  term_xml.scala
43320
wenzelm
parents: 43285
diff changeset
    67
)
wenzelm
parents: 43285
diff changeset
    68
34282
549969a7f582 simplified build/bootstrap of Isabelle/Scala components -- avoid make;
wenzelm
parents:
diff changeset
    69
549969a7f582 simplified build/bootstrap of Isabelle/Scala components -- avoid make;
wenzelm
parents:
diff changeset
    70
## diagnostics
549969a7f582 simplified build/bootstrap of Isabelle/Scala components -- avoid make;
wenzelm
parents:
diff changeset
    71
43280
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
    72
PRG="$(basename "$0")"
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
    73
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
    74
function usage()
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
    75
{
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
    76
  echo
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
    77
  echo "Usage: isabelle $PRG [OPTIONS]"
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
    78
  echo
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
    79
  echo "  Options are:"
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
    80
  echo "    -f           fresh build"
47408
63c05991882e slightly faster default compilation of Isabelle/Scala;
wenzelm
parents: 47115
diff changeset
    81
  echo "    -t           test separate compilation of PIDE"
43280
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
    82
  echo
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
    83
  exit 1
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
    84
}
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
    85
34282
549969a7f582 simplified build/bootstrap of Isabelle/Scala components -- avoid make;
wenzelm
parents:
diff changeset
    86
function fail()
549969a7f582 simplified build/bootstrap of Isabelle/Scala components -- avoid make;
wenzelm
parents:
diff changeset
    87
{
549969a7f582 simplified build/bootstrap of Isabelle/Scala components -- avoid make;
wenzelm
parents:
diff changeset
    88
  echo "$1" >&2
549969a7f582 simplified build/bootstrap of Isabelle/Scala components -- avoid make;
wenzelm
parents:
diff changeset
    89
  exit 2
549969a7f582 simplified build/bootstrap of Isabelle/Scala components -- avoid make;
wenzelm
parents:
diff changeset
    90
}
549969a7f582 simplified build/bootstrap of Isabelle/Scala components -- avoid make;
wenzelm
parents:
diff changeset
    91
42899
108e815fdc8e misc tuning and update;
wenzelm
parents: 42720
diff changeset
    92
[ -z "$ISABELLE_HOME" ] && fail "Missing Isabelle settings environment"
34282
549969a7f582 simplified build/bootstrap of Isabelle/Scala components -- avoid make;
wenzelm
parents:
diff changeset
    93
549969a7f582 simplified build/bootstrap of Isabelle/Scala components -- avoid make;
wenzelm
parents:
diff changeset
    94
43280
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
    95
## process command line
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
    96
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
    97
# options
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
    98
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
    99
FRESH=""
47408
63c05991882e slightly faster default compilation of Isabelle/Scala;
wenzelm
parents: 47115
diff changeset
   100
TEST_PIDE=""
43280
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   101
47408
63c05991882e slightly faster default compilation of Isabelle/Scala;
wenzelm
parents: 47115
diff changeset
   102
while getopts "ft" OPT
43280
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   103
do
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   104
  case "$OPT" in
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   105
    f)
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   106
      FRESH=true
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   107
      ;;
47408
63c05991882e slightly faster default compilation of Isabelle/Scala;
wenzelm
parents: 47115
diff changeset
   108
    t)
63c05991882e slightly faster default compilation of Isabelle/Scala;
wenzelm
parents: 47115
diff changeset
   109
      TEST_PIDE=true
63c05991882e slightly faster default compilation of Isabelle/Scala;
wenzelm
parents: 47115
diff changeset
   110
      ;;
43280
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   111
    \?)
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   112
      usage
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   113
      ;;
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   114
  esac
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   115
done
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   116
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   117
shift $(($OPTIND - 1))
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   118
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   119
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   120
# args
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   121
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   122
[ "$#" -ne 0 ] && usage
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   123
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   124
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   125
43523
5aaa0fe92672 simplified arrangement of jars;
wenzelm
parents: 43521
diff changeset
   126
# build
34282
549969a7f582 simplified build/bootstrap of Isabelle/Scala components -- avoid make;
wenzelm
parents:
diff changeset
   127
34284
33ad3571ad83 tuned Isabelle/Scala build;
wenzelm
parents: 34282
diff changeset
   128
TARGET_DIR="$ISABELLE_HOME/lib/classes"
43523
5aaa0fe92672 simplified arrangement of jars;
wenzelm
parents: 43521
diff changeset
   129
TARGET="$TARGET_DIR/ext/Pure.jar"
34282
549969a7f582 simplified build/bootstrap of Isabelle/Scala components -- avoid make;
wenzelm
parents:
diff changeset
   130
45673
cd41e3903fbf separate compilation of PIDE vs. Pure sources, which enables independent Scala library;
wenzelm
parents: 45672
diff changeset
   131
declare -a PIDE_SOURCES=()
cd41e3903fbf separate compilation of PIDE vs. Pure sources, which enables independent Scala library;
wenzelm
parents: 45672
diff changeset
   132
declare -a PURE_SOURCES=()
cd41e3903fbf separate compilation of PIDE vs. Pure sources, which enables independent Scala library;
wenzelm
parents: 45672
diff changeset
   133
cd41e3903fbf separate compilation of PIDE vs. Pure sources, which enables independent Scala library;
wenzelm
parents: 45672
diff changeset
   134
for DEP in "${SOURCES[@]}"
cd41e3903fbf separate compilation of PIDE vs. Pure sources, which enables independent Scala library;
wenzelm
parents: 45672
diff changeset
   135
do
cd41e3903fbf separate compilation of PIDE vs. Pure sources, which enables independent Scala library;
wenzelm
parents: 45672
diff changeset
   136
  if grep "Module:.*PIDE" "$DEP" >/dev/null
cd41e3903fbf separate compilation of PIDE vs. Pure sources, which enables independent Scala library;
wenzelm
parents: 45672
diff changeset
   137
  then
cd41e3903fbf separate compilation of PIDE vs. Pure sources, which enables independent Scala library;
wenzelm
parents: 45672
diff changeset
   138
    PIDE_SOURCES["${#PIDE_SOURCES[@]}"]="$DEP"
cd41e3903fbf separate compilation of PIDE vs. Pure sources, which enables independent Scala library;
wenzelm
parents: 45672
diff changeset
   139
  else
cd41e3903fbf separate compilation of PIDE vs. Pure sources, which enables independent Scala library;
wenzelm
parents: 45672
diff changeset
   140
    PURE_SOURCES["${#PURE_SOURCES[@]}"]="$DEP"
cd41e3903fbf separate compilation of PIDE vs. Pure sources, which enables independent Scala library;
wenzelm
parents: 45672
diff changeset
   141
  fi
cd41e3903fbf separate compilation of PIDE vs. Pure sources, which enables independent Scala library;
wenzelm
parents: 45672
diff changeset
   142
done
cd41e3903fbf separate compilation of PIDE vs. Pure sources, which enables independent Scala library;
wenzelm
parents: 45672
diff changeset
   143
43405
723a8af9d3f0 tuned messages;
wenzelm
parents: 43320
diff changeset
   144
declare -a UPDATED=()
723a8af9d3f0 tuned messages;
wenzelm
parents: 43320
diff changeset
   145
43280
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   146
if [ -n "$FRESH" ]; then
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   147
  OUTDATED=true
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   148
else
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   149
  OUTDATED=false
43523
5aaa0fe92672 simplified arrangement of jars;
wenzelm
parents: 43521
diff changeset
   150
  if [ ! -e "$TARGET" ]; then
5aaa0fe92672 simplified arrangement of jars;
wenzelm
parents: 43521
diff changeset
   151
    OUTDATED=true
5aaa0fe92672 simplified arrangement of jars;
wenzelm
parents: 43521
diff changeset
   152
  else
43405
723a8af9d3f0 tuned messages;
wenzelm
parents: 43320
diff changeset
   153
    for DEP in "${SOURCES[@]}"
43280
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   154
    do
43405
723a8af9d3f0 tuned messages;
wenzelm
parents: 43320
diff changeset
   155
      [ ! -e "$DEP" ] && fail "Missing file: $DEP"
43523
5aaa0fe92672 simplified arrangement of jars;
wenzelm
parents: 43521
diff changeset
   156
      [ "$DEP" -nt "$TARGET" ] && {
5aaa0fe92672 simplified arrangement of jars;
wenzelm
parents: 43521
diff changeset
   157
        OUTDATED=true
5aaa0fe92672 simplified arrangement of jars;
wenzelm
parents: 43521
diff changeset
   158
        UPDATED["${#UPDATED[@]}"]="$DEP"
5aaa0fe92672 simplified arrangement of jars;
wenzelm
parents: 43521
diff changeset
   159
      }
43280
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   160
    done
43405
723a8af9d3f0 tuned messages;
wenzelm
parents: 43320
diff changeset
   161
  fi
43280
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   162
fi
34282
549969a7f582 simplified build/bootstrap of Isabelle/Scala components -- avoid make;
wenzelm
parents:
diff changeset
   163
34284
33ad3571ad83 tuned Isabelle/Scala build;
wenzelm
parents: 34282
diff changeset
   164
if [ "$OUTDATED" = true ]
33ad3571ad83 tuned Isabelle/Scala build;
wenzelm
parents: 34282
diff changeset
   165
then
34876
b52e03f68cc3 clarified terminology;
wenzelm
parents: 34871
diff changeset
   166
  echo "### Building Isabelle/Scala layer ..."
34282
549969a7f582 simplified build/bootstrap of Isabelle/Scala components -- avoid make;
wenzelm
parents:
diff changeset
   167
43405
723a8af9d3f0 tuned messages;
wenzelm
parents: 43320
diff changeset
   168
  [ "${#UPDATED[@]}" -gt 0 ] && {
723a8af9d3f0 tuned messages;
wenzelm
parents: 43320
diff changeset
   169
    echo "Changed files:"
723a8af9d3f0 tuned messages;
wenzelm
parents: 43320
diff changeset
   170
    for FILE in "${UPDATED[@]}"
723a8af9d3f0 tuned messages;
wenzelm
parents: 43320
diff changeset
   171
    do
723a8af9d3f0 tuned messages;
wenzelm
parents: 43320
diff changeset
   172
      echo "  $FILE"
723a8af9d3f0 tuned messages;
wenzelm
parents: 43320
diff changeset
   173
    done
723a8af9d3f0 tuned messages;
wenzelm
parents: 43320
diff changeset
   174
  }
723a8af9d3f0 tuned messages;
wenzelm
parents: 43320
diff changeset
   175
34282
549969a7f582 simplified build/bootstrap of Isabelle/Scala components -- avoid make;
wenzelm
parents:
diff changeset
   176
  rm -rf classes && mkdir classes
45673
cd41e3903fbf separate compilation of PIDE vs. Pure sources, which enables independent Scala library;
wenzelm
parents: 45672
diff changeset
   177
47009
97b68d61de2e less noisy Isabelle/Scala build process;
wenzelm
parents: 46611
diff changeset
   178
  SCALAC_OPTIONS="$ISABELLE_SCALA_BUILD_OPTIONS -d classes"
45673
cd41e3903fbf separate compilation of PIDE vs. Pure sources, which enables independent Scala library;
wenzelm
parents: 45672
diff changeset
   179
47408
63c05991882e slightly faster default compilation of Isabelle/Scala;
wenzelm
parents: 47115
diff changeset
   180
  if [ "$TEST_PIDE" = true ]; then
63c05991882e slightly faster default compilation of Isabelle/Scala;
wenzelm
parents: 47115
diff changeset
   181
    isabelle_scala scalac $SCALAC_OPTIONS "${PIDE_SOURCES[@]}" || \
63c05991882e slightly faster default compilation of Isabelle/Scala;
wenzelm
parents: 47115
diff changeset
   182
      fail "Failed to compile PIDE sources"
63c05991882e slightly faster default compilation of Isabelle/Scala;
wenzelm
parents: 47115
diff changeset
   183
    isabelle_scala scalac $SCALAC_OPTIONS -classpath classes "${PURE_SOURCES[@]}" || \
63c05991882e slightly faster default compilation of Isabelle/Scala;
wenzelm
parents: 47115
diff changeset
   184
      fail "Failed to compile Pure sources"
63c05991882e slightly faster default compilation of Isabelle/Scala;
wenzelm
parents: 47115
diff changeset
   185
  else
63c05991882e slightly faster default compilation of Isabelle/Scala;
wenzelm
parents: 47115
diff changeset
   186
    isabelle_scala scalac $SCALAC_OPTIONS -classpath classes \
63c05991882e slightly faster default compilation of Isabelle/Scala;
wenzelm
parents: 47115
diff changeset
   187
      "${PIDE_SOURCES[@]}" "${PURE_SOURCES[@]}" || \
63c05991882e slightly faster default compilation of Isabelle/Scala;
wenzelm
parents: 47115
diff changeset
   188
      fail "Failed to compile sources"
63c05991882e slightly faster default compilation of Isabelle/Scala;
wenzelm
parents: 47115
diff changeset
   189
  fi
45673
cd41e3903fbf separate compilation of PIDE vs. Pure sources, which enables independent Scala library;
wenzelm
parents: 45672
diff changeset
   190
43523
5aaa0fe92672 simplified arrangement of jars;
wenzelm
parents: 43521
diff changeset
   191
  mkdir -p "$TARGET_DIR/ext" || fail "Failed to create directory $TARGET_DIR/ext"
43280
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   192
43285
966f359dc724 further jedit build option;
wenzelm
parents: 43280
diff changeset
   193
  pushd classes >/dev/null
43280
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   194
43517
87ec9a1c0f98 basic setup for Isabelle charset;
wenzelm
parents: 43405
diff changeset
   195
  CHARSET_SERVICE="META-INF/services/java.nio.charset.spi.CharsetProvider"
87ec9a1c0f98 basic setup for Isabelle charset;
wenzelm
parents: 43405
diff changeset
   196
  mkdir -p "$(dirname "$CHARSET_SERVICE")"
87ec9a1c0f98 basic setup for Isabelle charset;
wenzelm
parents: 43405
diff changeset
   197
  echo isabelle.Isabelle_Charset_Provider > "$CHARSET_SERVICE"
87ec9a1c0f98 basic setup for Isabelle charset;
wenzelm
parents: 43405
diff changeset
   198
47115
1a05adae1cc9 more robust command invocation via ISABELLE_JDK_HOME or SCALA_HOME (NB: bash exec requires genuine executable, not function);
wenzelm
parents: 47113
diff changeset
   199
  isabelle_jdk jar cfe "$(jvmpath "$TARGET")" isabelle.GUI_Setup META-INF isabelle || \
43523
5aaa0fe92672 simplified arrangement of jars;
wenzelm
parents: 43521
diff changeset
   200
    fail "Failed to produce $TARGET"
34282
549969a7f582 simplified build/bootstrap of Isabelle/Scala components -- avoid make;
wenzelm
parents:
diff changeset
   201
47995
72f52cd7c633 include scala-compiler.jar in basic Isabelle/Scala environment, to make Isabelle/jEdit console work with scala-2.10.0-M3;
wenzelm
parents: 47849
diff changeset
   202
  cp "$SCALA_HOME/lib/scala-compiler.jar" \
72f52cd7c633 include scala-compiler.jar in basic Isabelle/Scala environment, to make Isabelle/jEdit console work with scala-2.10.0-M3;
wenzelm
parents: 47849
diff changeset
   203
    "$SCALA_HOME/lib/scala-library.jar" \
72f52cd7c633 include scala-compiler.jar in basic Isabelle/Scala environment, to make Isabelle/jEdit console work with scala-2.10.0-M3;
wenzelm
parents: 47849
diff changeset
   204
    "$SCALA_HOME/lib/scala-swing.jar" "$TARGET_DIR/ext"
72f52cd7c633 include scala-compiler.jar in basic Isabelle/Scala environment, to make Isabelle/jEdit console work with scala-2.10.0-M3;
wenzelm
parents: 47849
diff changeset
   205
47849
48b52cdc214a accomodate scala-2.10.0-M3 with its extra jar;
wenzelm
parents: 47663
diff changeset
   206
  [ -e "$SCALA_HOME/lib/scala-actors.jar" ] && \
48b52cdc214a accomodate scala-2.10.0-M3 with its extra jar;
wenzelm
parents: 47663
diff changeset
   207
    cp "$SCALA_HOME/lib/scala-actors.jar" "$TARGET_DIR/ext"
43521
d477b92109b8 provide Isabelle/Scala environment as Java extension, instead of user classpath
wenzelm
parents: 43517
diff changeset
   208
43280
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   209
  popd >/dev/null
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   210
34282
549969a7f582 simplified build/bootstrap of Isabelle/Scala components -- avoid make;
wenzelm
parents:
diff changeset
   211
  rm -rf classes
549969a7f582 simplified build/bootstrap of Isabelle/Scala components -- avoid make;
wenzelm
parents:
diff changeset
   212
fi