src/Pure/build-jars
author wenzelm
Wed, 28 Jan 2015 19:15:13 +0100
changeset 59459 985fc55e9f27
parent 59441 ab2c3597f1d3
child 59713 6da3efec20ca
permissions -rwxr-xr-x
clarified module name;
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=(
56695
963732291084 consumer thread with unbounded queueing of requests (similar to Message_Channel in ML);
wenzelm
parents: 56693
diff changeset
    12
  Concurrent/consumer_thread.scala
43660
bfc0bb115fa1 explicit class Counter;
wenzelm
parents: 43651
diff changeset
    13
  Concurrent/counter.scala
56768
06388a5cfb7c added Scala version of module Event_Timer;
wenzelm
parents: 56716
diff changeset
    14
  Concurrent/event_timer.scala
43320
wenzelm
parents: 43285
diff changeset
    15
  Concurrent/future.scala
56693
0423c957b081 added Mailbox, as in ML;
wenzelm
parents: 56690
diff changeset
    16
  Concurrent/mailbox.scala
59136
c2b23cb8a677 added Par_List in Scala, in accordance to ML version;
wenzelm
parents: 58928
diff changeset
    17
  Concurrent/par_list.scala
43320
wenzelm
parents: 43285
diff changeset
    18
  Concurrent/simple_thread.scala
56685
535d59d4ed12 more uniform synchronized variables;
wenzelm
parents: 56659
diff changeset
    19
  Concurrent/synchronized.scala
57647
5c600dd17617 clarified file names;
wenzelm
parents: 57612
diff changeset
    20
  GUI/color_value.scala
5c600dd17617 clarified file names;
wenzelm
parents: 57612
diff changeset
    21
  GUI/gui.scala
5c600dd17617 clarified file names;
wenzelm
parents: 57612
diff changeset
    22
  GUI/gui_thread.scala
5c600dd17617 clarified file names;
wenzelm
parents: 57612
diff changeset
    23
  GUI/html5_panel.scala
57908
1937603dbdf2 separate Java FX modules -- no need to include jfxrt.jar by default;
wenzelm
parents: 57905
diff changeset
    24
  GUI/jfx_gui.scala
57647
5c600dd17617 clarified file names;
wenzelm
parents: 57612
diff changeset
    25
  GUI/popup.scala
5c600dd17617 clarified file names;
wenzelm
parents: 57612
diff changeset
    26
  GUI/system_dialog.scala
5c600dd17617 clarified file names;
wenzelm
parents: 57612
diff changeset
    27
  GUI/wrap_panel.scala
55511
984e210d412e antiquotations within plain text: Scala version in accordance to ML;
wenzelm
parents: 55497
diff changeset
    28
  General/antiquote.scala
54439
621a155c7715 immutable byte vectors versus UTF8 strings;
wenzelm
parents: 53841
diff changeset
    29
  General/bytes.scala
55673
0286219c1261 clarified module location (again, see 763d35697338);
wenzelm
parents: 55511
diff changeset
    30
  General/completion.scala
43320
wenzelm
parents: 43285
diff changeset
    31
  General/exn.scala
48411
5b3440850d36 more abstract file system operations in Scala, corresponding to ML version;
wenzelm
parents: 48410
diff changeset
    32
  General/file.scala
46611
669601fa1a62 directed graphs (in Scala);
wenzelm
parents: 45709
diff changeset
    33
  General/graph.scala
59244
19b5fc4b2b38 more uniform support for graph display in ML/Scala;
wenzelm
parents: 59232
diff changeset
    34
  General/graph_display.scala
51098
22d5c010ef5c file system operations for Graphics2D output;
wenzelm
parents: 50981
diff changeset
    35
  General/graphics_file.scala
43320
wenzelm
parents: 43285
diff changeset
    36
  General/linear_set.scala
56800
b904ea8edd73 support for long names in Scala;
wenzelm
parents: 56791
diff changeset
    37
  General/long_name.scala
52975
457c006f91bb support for maps with multiple entries per key;
wenzelm
parents: 52971
diff changeset
    38
  General/multi_map.scala
56782
433cf57550fa more systematic Isabelle output, like in classic Isabelle/ML (without markup);
wenzelm
parents: 56768
diff changeset
    39
  General/output.scala
43600
4ac04bf9ff89 abstract algebra of file paths in Scala (cf. path.ML);
wenzelm
parents: 43523
diff changeset
    40
  General/path.scala
43320
wenzelm
parents: 43285
diff changeset
    41
  General/position.scala
wenzelm
parents: 43285
diff changeset
    42
  General/pretty.scala
43780
2cb2310d68b6 more uniform Properties in ML and Scala;
wenzelm
parents: 43779
diff changeset
    43
  General/properties.scala
43320
wenzelm
parents: 43285
diff changeset
    44
  General/scan.scala
wenzelm
parents: 43285
diff changeset
    45
  General/sha1.scala
wenzelm
parents: 43285
diff changeset
    46
  General/symbol.scala
45674
eb65c9d17e2f clarified Time vs. Timing;
wenzelm
parents: 45673
diff changeset
    47
  General/time.scala
45666
d83797ef0d2d separate module for concrete Isabelle markup;
wenzelm
parents: 45027
diff changeset
    48
  General/timing.scala
57647
5c600dd17617 clarified file names;
wenzelm
parents: 57612
diff changeset
    49
  General/untyped.scala
56501
5fda9e5c5874 basic URL operations (with Isabelle/Scala error handling);
wenzelm
parents: 56429
diff changeset
    50
  General/url.scala
56599
c4424d8c890f tuned signature -- separate module Word;
wenzelm
parents: 56501
diff changeset
    51
  General/word.scala
52671
9a360530eac8 separate module XZ_File to avoid initial dependency on org.tukaani.xz;
wenzelm
parents: 52667
diff changeset
    52
  General/xz_file.scala
43320
wenzelm
parents: 43285
diff changeset
    53
  Isar/keyword.scala
wenzelm
parents: 43285
diff changeset
    54
  Isar/outer_syntax.scala
wenzelm
parents: 43285
diff changeset
    55
  Isar/parse.scala
wenzelm
parents: 43285
diff changeset
    56
  Isar/token.scala
55497
c0f8aebfb43d lexical syntax for SML (in Scala);
wenzelm
parents: 54730
diff changeset
    57
  ML/ml_lex.scala
59362
41f1645a4f63 some support for PIDE batch session;
wenzelm
parents: 59290
diff changeset
    58
  PIDE/batch_session.scala
43320
wenzelm
parents: 43285
diff changeset
    59
  PIDE/command.scala
57905
c0c5652e796e separate module Command_Span: mostly syntactic representation;
wenzelm
parents: 57900
diff changeset
    60
  PIDE/command_span.scala
43320
wenzelm
parents: 43285
diff changeset
    61
  PIDE/document.scala
52530
99dd8b4ef3fe explicit module Document_ID as source of globally unique identifiers across ML/Scala;
wenzelm
parents: 52444
diff changeset
    62
  PIDE/document_id.scala
52971
31926d2c04ee tuned signature -- more abstract PIDE editor operations;
wenzelm
parents: 52671
diff changeset
    63
  PIDE/editor.scala
45670
b84170538043 rearranged files;
wenzelm
parents: 45666
diff changeset
    64
  PIDE/markup.scala
43320
wenzelm
parents: 43285
diff changeset
    65
  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
    66
  PIDE/protocol.scala
56385
76acce58aeab more general prover operations;
wenzelm
parents: 56210
diff changeset
    67
  PIDE/prover.scala
52981
c7afd884dfb2 moved generic module to its proper place;
wenzelm
parents: 52975
diff changeset
    68
  PIDE/query_operation.scala
56208
06cc31dff138 clarifed module name;
wenzelm
parents: 55673
diff changeset
    69
  PIDE/resources.scala
56210
c7c85cdb725d clarified module arrangement;
wenzelm
parents: 56208
diff changeset
    70
  PIDE/session.scala
43320
wenzelm
parents: 43285
diff changeset
    71
  PIDE/text.scala
44698
0385292321a0 moved XML/YXML to src/Pure/PIDE;
wenzelm
parents: 43780
diff changeset
    72
  PIDE/xml.scala
0385292321a0 moved XML/YXML to src/Pure/PIDE;
wenzelm
parents: 43780
diff changeset
    73
  PIDE/yxml.scala
57647
5c600dd17617 clarified file names;
wenzelm
parents: 57612
diff changeset
    74
  ROOT.scala
48346
e2382bede914 more general support for Isabelle/Scala command line tools;
wenzelm
parents: 48276
diff changeset
    75
  System/command_line.scala
43744
2c7e1565b4a3 some support to invoke Scala methods under program control;
wenzelm
parents: 43730
diff changeset
    76
  System/invoke_scala.scala
43517
87ec9a1c0f98 basic setup for Isabelle charset;
wenzelm
parents: 43405
diff changeset
    77
  System/isabelle_charset.scala
43320
wenzelm
parents: 43285
diff changeset
    78
  System/isabelle_process.scala
wenzelm
parents: 43285
diff changeset
    79
  System/isabelle_system.scala
48365
d88aefda01c4 basic support for stand-alone options with external string representation;
wenzelm
parents: 48346
diff changeset
    80
  System/options.scala
43320
wenzelm
parents: 43285
diff changeset
    81
  System/platform.scala
56860
dc71c3d0e909 tuned signature;
wenzelm
parents: 56800
diff changeset
    82
  System/posix_interrupt.scala
45027
f459e93a038e more abstract wrapping of fifos as System_Channel;
wenzelm
parents: 44698
diff changeset
    83
  System/system_channel.scala
50203
00d8ad713e32 explicit module UTF8;
wenzelm
parents: 50201
diff changeset
    84
  System/utf8.scala
43320
wenzelm
parents: 43285
diff changeset
    85
  Thy/html.scala
50707
5b2bf7611662 maintain session index on Scala side, for more determistic results;
wenzelm
parents: 50689
diff changeset
    86
  Thy/present.scala
43320
wenzelm
parents: 43285
diff changeset
    87
  Thy/thy_header.scala
43651
511df47bcadc some support for theory files within Isabelle/Scala session;
wenzelm
parents: 43600
diff changeset
    88
  Thy/thy_info.scala
43320
wenzelm
parents: 43285
diff changeset
    89
  Thy/thy_syntax.scala
58523
937c479e62fe some support for bibtex files;
wenzelm
parents: 57908
diff changeset
    90
  Tools/bibtex.scala
57647
5c600dd17617 clarified file names;
wenzelm
parents: 57612
diff changeset
    91
  Tools/build.scala
5c600dd17617 clarified file names;
wenzelm
parents: 57612
diff changeset
    92
  Tools/build_console.scala
5c600dd17617 clarified file names;
wenzelm
parents: 57612
diff changeset
    93
  Tools/build_doc.scala
56791
23883e1879c5 some sanity checks for Isabelle sources;
wenzelm
parents: 56782
diff changeset
    94
  Tools/check_source.scala
52444
2cfe6656d6d6 slightly improved "isabelle doc" based on Isabelle/Scala;
wenzelm
parents: 52439
diff changeset
    95
  Tools/doc.scala
50687
a8db4bf70e90 moved files;
wenzelm
parents: 50686
diff changeset
    96
  Tools/main.scala
50981
1791a90a94fb tuned signature;
wenzelm
parents: 50980
diff changeset
    97
  Tools/ml_statistics.scala
56864
0446c7ac2e32 support print operations as asynchronous query;
wenzelm
parents: 56860
diff changeset
    98
  Tools/print_operation.scala
54730
de2d99b459b3 skeleton for Simplifier trace by Lars Hupel;
wenzelm
parents: 54709
diff changeset
    99
  Tools/simplifier_trace.scala
50980
bc746aa3e8d5 charts for future task runtime statistics;
wenzelm
parents: 50707
diff changeset
   100
  Tools/task_statistics.scala
58610
fffdbce036db added update_cartouches tool;
wenzelm
parents: 58523
diff changeset
   101
  Tools/update_cartouches.scala
58872
f0f623005324 added update_header tool;
wenzelm
parents: 58861
diff changeset
   102
  Tools/update_header.scala
58861
5ff61774df11 command-line terminator ";" is no longer accepted;
wenzelm
parents: 58842
diff changeset
   103
  Tools/update_semicolons.scala
43320
wenzelm
parents: 43285
diff changeset
   104
  library.scala
43730
a0ed7bc688b5 lambda terms with XML data representation in Scala;
wenzelm
parents: 43715
diff changeset
   105
  term.scala
43779
47bec02c6762 more uniform Term and Term_XML modules;
wenzelm
parents: 43776
diff changeset
   106
  term_xml.scala
59441
ab2c3597f1d3 separate module Graph_File;
wenzelm
parents: 59392
diff changeset
   107
  "../Tools/Graphview/graph_file.scala"
59202
711c2446dc9d clarified source location;
wenzelm
parents: 59136
diff changeset
   108
  "../Tools/Graphview/graph_panel.scala"
59459
985fc55e9f27 clarified module name;
wenzelm
parents: 59441
diff changeset
   109
  "../Tools/Graphview/graphview.scala"
59232
07a7dfd6d694 tuned signature;
wenzelm
parents: 59202
diff changeset
   110
  "../Tools/Graphview/layout.scala"
59202
711c2446dc9d clarified source location;
wenzelm
parents: 59136
diff changeset
   111
  "../Tools/Graphview/main_panel.scala"
59290
569a8109eeb2 separate module Metrics;
wenzelm
parents: 59244
diff changeset
   112
  "../Tools/Graphview/metrics.scala"
59202
711c2446dc9d clarified source location;
wenzelm
parents: 59136
diff changeset
   113
  "../Tools/Graphview/model.scala"
59392
02bacfc31446 support for tree view on graph nodes;
wenzelm
parents: 59362
diff changeset
   114
  "../Tools/Graphview/mutator.scala"
59202
711c2446dc9d clarified source location;
wenzelm
parents: 59136
diff changeset
   115
  "../Tools/Graphview/mutator_dialog.scala"
711c2446dc9d clarified source location;
wenzelm
parents: 59136
diff changeset
   116
  "../Tools/Graphview/mutator_event.scala"
711c2446dc9d clarified source location;
wenzelm
parents: 59136
diff changeset
   117
  "../Tools/Graphview/popups.scala"
711c2446dc9d clarified source location;
wenzelm
parents: 59136
diff changeset
   118
  "../Tools/Graphview/shapes.scala"
59392
02bacfc31446 support for tree view on graph nodes;
wenzelm
parents: 59362
diff changeset
   119
  "../Tools/Graphview/tree_panel.scala"
43320
wenzelm
parents: 43285
diff changeset
   120
)
wenzelm
parents: 43285
diff changeset
   121
34282
549969a7f582 simplified build/bootstrap of Isabelle/Scala components -- avoid make;
wenzelm
parents:
diff changeset
   122
549969a7f582 simplified build/bootstrap of Isabelle/Scala components -- avoid make;
wenzelm
parents:
diff changeset
   123
## diagnostics
549969a7f582 simplified build/bootstrap of Isabelle/Scala components -- avoid make;
wenzelm
parents:
diff changeset
   124
43280
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   125
PRG="$(basename "$0")"
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   126
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   127
function usage()
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   128
{
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   129
  echo
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   130
  echo "Usage: isabelle $PRG [OPTIONS]"
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   131
  echo
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   132
  echo "  Options are:"
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   133
  echo "    -f           fresh build"
47408
63c05991882e slightly faster default compilation of Isabelle/Scala;
wenzelm
parents: 47115
diff changeset
   134
  echo "    -t           test separate compilation of PIDE"
43280
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   135
  echo
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   136
  exit 1
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   137
}
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   138
34282
549969a7f582 simplified build/bootstrap of Isabelle/Scala components -- avoid make;
wenzelm
parents:
diff changeset
   139
function fail()
549969a7f582 simplified build/bootstrap of Isabelle/Scala components -- avoid make;
wenzelm
parents:
diff changeset
   140
{
549969a7f582 simplified build/bootstrap of Isabelle/Scala components -- avoid make;
wenzelm
parents:
diff changeset
   141
  echo "$1" >&2
549969a7f582 simplified build/bootstrap of Isabelle/Scala components -- avoid make;
wenzelm
parents:
diff changeset
   142
  exit 2
549969a7f582 simplified build/bootstrap of Isabelle/Scala components -- avoid make;
wenzelm
parents:
diff changeset
   143
}
549969a7f582 simplified build/bootstrap of Isabelle/Scala components -- avoid make;
wenzelm
parents:
diff changeset
   144
42899
108e815fdc8e misc tuning and update;
wenzelm
parents: 42720
diff changeset
   145
[ -z "$ISABELLE_HOME" ] && fail "Missing Isabelle settings environment"
34282
549969a7f582 simplified build/bootstrap of Isabelle/Scala components -- avoid make;
wenzelm
parents:
diff changeset
   146
549969a7f582 simplified build/bootstrap of Isabelle/Scala components -- avoid make;
wenzelm
parents:
diff changeset
   147
43280
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   148
## process command line
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   149
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   150
# options
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   151
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   152
FRESH=""
47408
63c05991882e slightly faster default compilation of Isabelle/Scala;
wenzelm
parents: 47115
diff changeset
   153
TEST_PIDE=""
43280
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   154
47408
63c05991882e slightly faster default compilation of Isabelle/Scala;
wenzelm
parents: 47115
diff changeset
   155
while getopts "ft" OPT
43280
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   156
do
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   157
  case "$OPT" in
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   158
    f)
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   159
      FRESH=true
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   160
      ;;
47408
63c05991882e slightly faster default compilation of Isabelle/Scala;
wenzelm
parents: 47115
diff changeset
   161
    t)
63c05991882e slightly faster default compilation of Isabelle/Scala;
wenzelm
parents: 47115
diff changeset
   162
      TEST_PIDE=true
63c05991882e slightly faster default compilation of Isabelle/Scala;
wenzelm
parents: 47115
diff changeset
   163
      ;;
43280
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   164
    \?)
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   165
      usage
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   166
      ;;
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   167
  esac
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   168
done
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   169
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   170
shift $(($OPTIND - 1))
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   171
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   172
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   173
# args
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   174
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   175
[ "$#" -ne 0 ] && usage
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   176
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   177
49558
af7b652180d5 minimal component and build setup for graphview;
wenzelm
parents: 49449
diff changeset
   178
## build
34282
549969a7f582 simplified build/bootstrap of Isabelle/Scala components -- avoid make;
wenzelm
parents:
diff changeset
   179
34284
33ad3571ad83 tuned Isabelle/Scala build;
wenzelm
parents: 34282
diff changeset
   180
TARGET_DIR="$ISABELLE_HOME/lib/classes"
53577
d033bc00b762 clarified directory structure;
wenzelm
parents: 53576
diff changeset
   181
TARGET="$TARGET_DIR/Pure.jar"
34282
549969a7f582 simplified build/bootstrap of Isabelle/Scala components -- avoid make;
wenzelm
parents:
diff changeset
   182
45673
cd41e3903fbf separate compilation of PIDE vs. Pure sources, which enables independent Scala library;
wenzelm
parents: 45672
diff changeset
   183
declare -a PIDE_SOURCES=()
cd41e3903fbf separate compilation of PIDE vs. Pure sources, which enables independent Scala library;
wenzelm
parents: 45672
diff changeset
   184
declare -a PURE_SOURCES=()
cd41e3903fbf separate compilation of PIDE vs. Pure sources, which enables independent Scala library;
wenzelm
parents: 45672
diff changeset
   185
cd41e3903fbf separate compilation of PIDE vs. Pure sources, which enables independent Scala library;
wenzelm
parents: 45672
diff changeset
   186
for DEP in "${SOURCES[@]}"
cd41e3903fbf separate compilation of PIDE vs. Pure sources, which enables independent Scala library;
wenzelm
parents: 45672
diff changeset
   187
do
cd41e3903fbf separate compilation of PIDE vs. Pure sources, which enables independent Scala library;
wenzelm
parents: 45672
diff changeset
   188
  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
   189
  then
cd41e3903fbf separate compilation of PIDE vs. Pure sources, which enables independent Scala library;
wenzelm
parents: 45672
diff changeset
   190
    PIDE_SOURCES["${#PIDE_SOURCES[@]}"]="$DEP"
cd41e3903fbf separate compilation of PIDE vs. Pure sources, which enables independent Scala library;
wenzelm
parents: 45672
diff changeset
   191
  else
cd41e3903fbf separate compilation of PIDE vs. Pure sources, which enables independent Scala library;
wenzelm
parents: 45672
diff changeset
   192
    PURE_SOURCES["${#PURE_SOURCES[@]}"]="$DEP"
cd41e3903fbf separate compilation of PIDE vs. Pure sources, which enables independent Scala library;
wenzelm
parents: 45672
diff changeset
   193
  fi
cd41e3903fbf separate compilation of PIDE vs. Pure sources, which enables independent Scala library;
wenzelm
parents: 45672
diff changeset
   194
done
cd41e3903fbf separate compilation of PIDE vs. Pure sources, which enables independent Scala library;
wenzelm
parents: 45672
diff changeset
   195
43405
723a8af9d3f0 tuned messages;
wenzelm
parents: 43320
diff changeset
   196
declare -a UPDATED=()
723a8af9d3f0 tuned messages;
wenzelm
parents: 43320
diff changeset
   197
43280
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   198
if [ -n "$FRESH" ]; then
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   199
  OUTDATED=true
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   200
else
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   201
  OUTDATED=false
43523
5aaa0fe92672 simplified arrangement of jars;
wenzelm
parents: 43521
diff changeset
   202
  if [ ! -e "$TARGET" ]; then
5aaa0fe92672 simplified arrangement of jars;
wenzelm
parents: 43521
diff changeset
   203
    OUTDATED=true
5aaa0fe92672 simplified arrangement of jars;
wenzelm
parents: 43521
diff changeset
   204
  else
43405
723a8af9d3f0 tuned messages;
wenzelm
parents: 43320
diff changeset
   205
    for DEP in "${SOURCES[@]}"
43280
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   206
    do
43405
723a8af9d3f0 tuned messages;
wenzelm
parents: 43320
diff changeset
   207
      [ ! -e "$DEP" ] && fail "Missing file: $DEP"
43523
5aaa0fe92672 simplified arrangement of jars;
wenzelm
parents: 43521
diff changeset
   208
      [ "$DEP" -nt "$TARGET" ] && {
5aaa0fe92672 simplified arrangement of jars;
wenzelm
parents: 43521
diff changeset
   209
        OUTDATED=true
5aaa0fe92672 simplified arrangement of jars;
wenzelm
parents: 43521
diff changeset
   210
        UPDATED["${#UPDATED[@]}"]="$DEP"
5aaa0fe92672 simplified arrangement of jars;
wenzelm
parents: 43521
diff changeset
   211
      }
43280
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   212
    done
43405
723a8af9d3f0 tuned messages;
wenzelm
parents: 43320
diff changeset
   213
  fi
43280
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   214
fi
34282
549969a7f582 simplified build/bootstrap of Isabelle/Scala components -- avoid make;
wenzelm
parents:
diff changeset
   215
34284
33ad3571ad83 tuned Isabelle/Scala build;
wenzelm
parents: 34282
diff changeset
   216
if [ "$OUTDATED" = true ]
33ad3571ad83 tuned Isabelle/Scala build;
wenzelm
parents: 34282
diff changeset
   217
then
49173
fa01a202399c eliminated potentially confusing terminology of Scala "layer";
wenzelm
parents: 49068
diff changeset
   218
  echo "### Building Isabelle/Scala ..."
34282
549969a7f582 simplified build/bootstrap of Isabelle/Scala components -- avoid make;
wenzelm
parents:
diff changeset
   219
43405
723a8af9d3f0 tuned messages;
wenzelm
parents: 43320
diff changeset
   220
  [ "${#UPDATED[@]}" -gt 0 ] && {
723a8af9d3f0 tuned messages;
wenzelm
parents: 43320
diff changeset
   221
    echo "Changed files:"
723a8af9d3f0 tuned messages;
wenzelm
parents: 43320
diff changeset
   222
    for FILE in "${UPDATED[@]}"
723a8af9d3f0 tuned messages;
wenzelm
parents: 43320
diff changeset
   223
    do
723a8af9d3f0 tuned messages;
wenzelm
parents: 43320
diff changeset
   224
      echo "  $FILE"
723a8af9d3f0 tuned messages;
wenzelm
parents: 43320
diff changeset
   225
    done
723a8af9d3f0 tuned messages;
wenzelm
parents: 43320
diff changeset
   226
  }
723a8af9d3f0 tuned messages;
wenzelm
parents: 43320
diff changeset
   227
34282
549969a7f582 simplified build/bootstrap of Isabelle/Scala components -- avoid make;
wenzelm
parents:
diff changeset
   228
  rm -rf classes && mkdir classes
45673
cd41e3903fbf separate compilation of PIDE vs. Pure sources, which enables independent Scala library;
wenzelm
parents: 45672
diff changeset
   229
47009
97b68d61de2e less noisy Isabelle/Scala build process;
wenzelm
parents: 46611
diff changeset
   230
  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
   231
50689
0607d557d073 some support for chart drawing;
wenzelm
parents: 50687
diff changeset
   232
  (
58791
00916b0dd596 clarified ISABELLE_JDK_HOME vs. JAVA_HOME;
wenzelm
parents: 58706
diff changeset
   233
    classpath "$JAVA_HOME/lib/jfxrt.jar"
53576
793a429c63e7 maintain classpath in more elementary manner: turn ISABELLE_CLASSPATH into -classpath option, so that all jars are covered by sun.misc.Launcher.AppClassLoader (e.g. relevant for loading add-on resources);
wenzelm
parents: 53519
diff changeset
   234
    classpath classes
793a429c63e7 maintain classpath in more elementary manner: turn ISABELLE_CLASSPATH into -classpath option, so that all jars are covered by sun.misc.Launcher.AppClassLoader (e.g. relevant for loading add-on resources);
wenzelm
parents: 53519
diff changeset
   235
    export CLASSPATH="$(jvmpath "$ISABELLE_CLASSPATH")"
50689
0607d557d073 some support for chart drawing;
wenzelm
parents: 50687
diff changeset
   236
0607d557d073 some support for chart drawing;
wenzelm
parents: 50687
diff changeset
   237
    if [ "$TEST_PIDE" = true ]; then
0607d557d073 some support for chart drawing;
wenzelm
parents: 50687
diff changeset
   238
      isabelle_scala scalac $SCALAC_OPTIONS "${PIDE_SOURCES[@]}" || \
0607d557d073 some support for chart drawing;
wenzelm
parents: 50687
diff changeset
   239
        fail "Failed to compile PIDE sources"
0607d557d073 some support for chart drawing;
wenzelm
parents: 50687
diff changeset
   240
      isabelle_scala scalac $SCALAC_OPTIONS "${PURE_SOURCES[@]}" || \
0607d557d073 some support for chart drawing;
wenzelm
parents: 50687
diff changeset
   241
        fail "Failed to compile Pure sources"
0607d557d073 some support for chart drawing;
wenzelm
parents: 50687
diff changeset
   242
    else
0607d557d073 some support for chart drawing;
wenzelm
parents: 50687
diff changeset
   243
      isabelle_scala scalac $SCALAC_OPTIONS "${PIDE_SOURCES[@]}" "${PURE_SOURCES[@]}" || \
0607d557d073 some support for chart drawing;
wenzelm
parents: 50687
diff changeset
   244
        fail "Failed to compile sources"
0607d557d073 some support for chart drawing;
wenzelm
parents: 50687
diff changeset
   245
    fi
51508
48a1e09120d4 actually exit on scalac failure;
wenzelm
parents: 51504
diff changeset
   246
  ) || exit "$?"
45673
cd41e3903fbf separate compilation of PIDE vs. Pure sources, which enables independent Scala library;
wenzelm
parents: 45672
diff changeset
   247
53577
d033bc00b762 clarified directory structure;
wenzelm
parents: 53576
diff changeset
   248
  mkdir -p "$TARGET_DIR" || fail "Failed to create directory $TARGET_DIR"
43280
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   249
43285
966f359dc724 further jedit build option;
wenzelm
parents: 43280
diff changeset
   250
  pushd classes >/dev/null
43280
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   251
43517
87ec9a1c0f98 basic setup for Isabelle charset;
wenzelm
parents: 43405
diff changeset
   252
  CHARSET_SERVICE="META-INF/services/java.nio.charset.spi.CharsetProvider"
87ec9a1c0f98 basic setup for Isabelle charset;
wenzelm
parents: 43405
diff changeset
   253
  mkdir -p "$(dirname "$CHARSET_SERVICE")"
87ec9a1c0f98 basic setup for Isabelle charset;
wenzelm
parents: 43405
diff changeset
   254
  echo isabelle.Isabelle_Charset_Provider > "$CHARSET_SERVICE"
87ec9a1c0f98 basic setup for Isabelle charset;
wenzelm
parents: 43405
diff changeset
   255
54676
6b2ca4850b71 uniform use of transparent icons, as for main "apps";
wenzelm
parents: 54671
diff changeset
   256
  cp "$ISABELLE_HOME/lib/logo/isabelle_transparent-32.gif" isabelle/.
54709
87402674fe2f alternative hires icon;
wenzelm
parents: 54676
diff changeset
   257
  cp "$ISABELLE_HOME/lib/logo/isabelle_transparent.gif" isabelle/.
53452
8181bc357dc4 more portable access to icon -- avoid Isabelle_System which is not yet initialized in bootstrap;
wenzelm
parents: 53279
diff changeset
   258
53841
73536e119310 obsolete;
wenzelm
parents: 53783
diff changeset
   259
  isabelle_jdk jar cfe "$(jvmpath "$TARGET")" isabelle.Main META-INF isabelle || \
43523
5aaa0fe92672 simplified arrangement of jars;
wenzelm
parents: 43521
diff changeset
   260
    fail "Failed to produce $TARGET"
34282
549969a7f582 simplified build/bootstrap of Isabelle/Scala components -- avoid make;
wenzelm
parents:
diff changeset
   261
43280
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   262
  popd >/dev/null
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   263
34282
549969a7f582 simplified build/bootstrap of Isabelle/Scala components -- avoid make;
wenzelm
parents:
diff changeset
   264
  rm -rf classes
549969a7f582 simplified build/bootstrap of Isabelle/Scala components -- avoid make;
wenzelm
parents:
diff changeset
   265
fi