src/Pure/build-jars
author wenzelm
Sun, 12 Nov 2017 19:42:22 +0100
changeset 67058 03d4954c68bb
parent 67054 9498b7522a99
child 67172 97d199699a6b
permissions -rwxr-xr-x
simplified: eliminated pointless Thy_Document_Model;
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=(
66820
fc516da7ee4f some administrative support for AFP;
wenzelm
parents: 66790
diff changeset
    12
  Admin/afp.scala
65071
9ed87c82cbe7 proper Isabelle/Scala tool;
wenzelm
parents: 65006
diff changeset
    13
  Admin/build_cygwin.scala
64161
2b1128e95dfb explicit indication of Admin tools;
wenzelm
parents: 64160
diff changeset
    14
  Admin/build_doc.scala
64160
1eea419fab65 clarified files;
wenzelm
parents: 64148
diff changeset
    15
  Admin/build_history.scala
64929
3b4e5fad4dc2 build_jdk in Scala;
wenzelm
parents: 64900
diff changeset
    16
  Admin/build_jdk.scala
64160
1eea419fab65 clarified files;
wenzelm
parents: 64148
diff changeset
    17
  Admin/build_log.scala
64483
bba1d341bdf6 build_polyml in Scala;
wenzelm
parents: 64375
diff changeset
    18
  Admin/build_polyml.scala
64202
967515846691 replaced shell script by Isabelle/Scala;
wenzelm
parents: 64188
diff changeset
    19
  Admin/build_release.scala
65743
4847ca570454 clarified name;
wenzelm
parents: 65734
diff changeset
    20
  Admin/build_status.scala
64161
2b1128e95dfb explicit indication of Admin tools;
wenzelm
parents: 64160
diff changeset
    21
  Admin/check_sources.scala
64160
1eea419fab65 clarified files;
wenzelm
parents: 64148
diff changeset
    22
  Admin/ci_profile.scala
64148
bbf43b7c4d0d basic setup for Isabelle cronjob;
wenzelm
parents: 64143
diff changeset
    23
  Admin/isabelle_cronjob.scala
65770
fb8a7962f2ae clarified modules;
wenzelm
parents: 65743
diff changeset
    24
  Admin/isabelle_devel.scala
65650
48ef286b847b clarified modules;
wenzelm
parents: 65557
diff changeset
    25
  Admin/jenkins.scala
64369
6a9816764b37 proper Admin tool;
wenzelm
parents: 64342
diff changeset
    26
  Admin/news.scala
64188
f88bae1922c4 clarified modules;
wenzelm
parents: 64161
diff changeset
    27
  Admin/other_isabelle.scala
64161
2b1128e95dfb explicit indication of Admin tools;
wenzelm
parents: 64160
diff changeset
    28
  Admin/remote_dmg.scala
56695
963732291084 consumer thread with unbounded queueing of requests (similar to Message_Channel in ML);
wenzelm
parents: 56693
diff changeset
    29
  Concurrent/consumer_thread.scala
43660
bfc0bb115fa1 explicit class Counter;
wenzelm
parents: 43651
diff changeset
    30
  Concurrent/counter.scala
56768
06388a5cfb7c added Scala version of module Event_Timer;
wenzelm
parents: 56716
diff changeset
    31
  Concurrent/event_timer.scala
43320
wenzelm
parents: 43285
diff changeset
    32
  Concurrent/future.scala
56693
0423c957b081 added Mailbox, as in ML;
wenzelm
parents: 56690
diff changeset
    33
  Concurrent/mailbox.scala
59136
c2b23cb8a677 added Par_List in Scala, in accordance to ML version;
wenzelm
parents: 58928
diff changeset
    34
  Concurrent/par_list.scala
61556
0d4ee4168e41 clarified modules;
wenzelm
parents: 61337
diff changeset
    35
  Concurrent/standard_thread.scala
56685
535d59d4ed12 more uniform synchronized variables;
wenzelm
parents: 56659
diff changeset
    36
  Concurrent/synchronized.scala
57647
5c600dd17617 clarified file names;
wenzelm
parents: 57612
diff changeset
    37
  GUI/color_value.scala
5c600dd17617 clarified file names;
wenzelm
parents: 57612
diff changeset
    38
  GUI/gui.scala
5c600dd17617 clarified file names;
wenzelm
parents: 57612
diff changeset
    39
  GUI/gui_thread.scala
5c600dd17617 clarified file names;
wenzelm
parents: 57612
diff changeset
    40
  GUI/html5_panel.scala
57908
1937603dbdf2 separate Java FX modules -- no need to include jfxrt.jar by default;
wenzelm
parents: 57905
diff changeset
    41
  GUI/jfx_gui.scala
57647
5c600dd17617 clarified file names;
wenzelm
parents: 57612
diff changeset
    42
  GUI/popup.scala
5c600dd17617 clarified file names;
wenzelm
parents: 57612
diff changeset
    43
  GUI/wrap_panel.scala
55511
984e210d412e antiquotations within plain text: Scala version in accordance to ML;
wenzelm
parents: 55497
diff changeset
    44
  General/antiquote.scala
54439
621a155c7715 immutable byte vectors versus UTF8 strings;
wenzelm
parents: 53841
diff changeset
    45
  General/bytes.scala
64610
1b89608974e9 clarified modules;
wenzelm
parents: 64609
diff changeset
    46
  General/codepoint.scala
55673
0286219c1261 clarified module location (again, see 763d35697338);
wenzelm
parents: 55511
diff changeset
    47
  General/completion.scala
64056
0edc966bee55 more date and time operations from Java 8;
wenzelm
parents: 64045
diff changeset
    48
  General/date.scala
62508
d0b68218ea55 discontinued RAW session: bootstrap directly from isabelle_process RAW_ML_SYSTEM;
wenzelm
parents: 62452
diff changeset
    49
  General/exn.scala
48411
5b3440850d36 more abstract file system operations in Scala, corresponding to ML version;
wenzelm
parents: 48410
diff changeset
    50
  General/file.scala
64699
218c35908d5f watcher for file-system events;
wenzelm
parents: 64682
diff changeset
    51
  General/file_watcher.scala
46611
669601fa1a62 directed graphs (in Scala);
wenzelm
parents: 45709
diff changeset
    52
  General/graph.scala
59244
19b5fc4b2b38 more uniform support for graph display in ML/Scala;
wenzelm
parents: 59232
diff changeset
    53
  General/graph_display.scala
51098
22d5c010ef5c file system operations for Graphics2D output;
wenzelm
parents: 50981
diff changeset
    54
  General/graphics_file.scala
65077
2d6e716c9d6e clarified modules;
wenzelm
parents: 65071
diff changeset
    55
  General/http.scala
63644
ed266398da33 support for JSON parsing;
wenzelm
parents: 63604
diff changeset
    56
  General/json.scala
43320
wenzelm
parents: 43285
diff changeset
    57
  General/linear_set.scala
64606
a871fa7c24fc clarified modules;
wenzelm
parents: 64605
diff changeset
    58
  General/logger.scala
56800
b904ea8edd73 support for long names in Scala;
wenzelm
parents: 56791
diff changeset
    59
  General/long_name.scala
63997
e11ccb5aa82f more formal Mercurial support (with the potential to upgrade to command server);
wenzelm
parents: 63823
diff changeset
    60
  General/mercurial.scala
52975
457c006f91bb support for maps with multiple entries per key;
wenzelm
parents: 52971
diff changeset
    61
  General/multi_map.scala
56782
433cf57550fa more systematic Isabelle output, like in classic Isabelle/ML (without markup);
wenzelm
parents: 56768
diff changeset
    62
  General/output.scala
43600
4ac04bf9ff89 abstract algebra of file paths in Scala (cf. path.ML);
wenzelm
parents: 43523
diff changeset
    63
  General/path.scala
43320
wenzelm
parents: 43285
diff changeset
    64
  General/position.scala
wenzelm
parents: 43285
diff changeset
    65
  General/pretty.scala
43780
2cb2310d68b6 more uniform Properties in ML and Scala;
wenzelm
parents: 43779
diff changeset
    66
  General/properties.scala
43320
wenzelm
parents: 43285
diff changeset
    67
  General/scan.scala
wenzelm
parents: 43285
diff changeset
    68
  General/sha1.scala
63788
3160826b92f8 clarified modules;
wenzelm
parents: 63778
diff changeset
    69
  General/sql.scala
64123
a967b5a07f92 support for SSH in Isabelle/Scala;
wenzelm
parents: 64056
diff changeset
    70
  General/ssh.scala
43320
wenzelm
parents: 43285
diff changeset
    71
  General/symbol.scala
45674
eb65c9d17e2f clarified Time vs. Timing;
wenzelm
parents: 45673
diff changeset
    72
  General/time.scala
45666
d83797ef0d2d separate module for concrete Isabelle markup;
wenzelm
parents: 45027
diff changeset
    73
  General/timing.scala
57647
5c600dd17617 clarified file names;
wenzelm
parents: 57612
diff changeset
    74
  General/untyped.scala
56501
5fda9e5c5874 basic URL operations (with Isabelle/Scala error handling);
wenzelm
parents: 56429
diff changeset
    75
  General/url.scala
64639
bad5de3f9554 clarified directories;
wenzelm
parents: 64623
diff changeset
    76
  General/utf8.scala
63805
c272680df665 clarified modules;
wenzelm
parents: 63788
diff changeset
    77
  General/value.scala
56599
c4424d8c890f tuned signature -- separate module Word;
wenzelm
parents: 56501
diff changeset
    78
  General/word.scala
64000
445b3deced8f clarified modules;
wenzelm
parents: 63997
diff changeset
    79
  General/xz.scala
63604
d8de4f8b95eb clarified modules;
wenzelm
parents: 63603
diff changeset
    80
  Isar/document_structure.scala
43320
wenzelm
parents: 43285
diff changeset
    81
  Isar/keyword.scala
63603
9d9ea2c6bc38 clarified modules;
wenzelm
parents: 63288
diff changeset
    82
  Isar/line_structure.scala
43320
wenzelm
parents: 43285
diff changeset
    83
  Isar/outer_syntax.scala
wenzelm
parents: 43285
diff changeset
    84
  Isar/parse.scala
wenzelm
parents: 43285
diff changeset
    85
  Isar/token.scala
65477
64e61b0f6972 clarified directories;
wenzelm
parents: 65313
diff changeset
    86
  ML/ml_console.scala
55497
c0f8aebfb43d lexical syntax for SML (in Scala);
wenzelm
parents: 54730
diff changeset
    87
  ML/ml_lex.scala
65477
64e61b0f6972 clarified directories;
wenzelm
parents: 65313
diff changeset
    88
  ML/ml_process.scala
64e61b0f6972 clarified directories;
wenzelm
parents: 65313
diff changeset
    89
  ML/ml_statistics.scala
62528
c8c532b22947 clarified ML syntax for strings concerning UTF8;
wenzelm
parents: 62508
diff changeset
    90
  ML/ml_syntax.scala
43320
wenzelm
parents: 43285
diff changeset
    91
  PIDE/command.scala
57905
c0c5652e796e separate module Command_Span: mostly syntactic representation;
wenzelm
parents: 57900
diff changeset
    92
  PIDE/command_span.scala
43320
wenzelm
parents: 43285
diff changeset
    93
  PIDE/document.scala
52530
99dd8b4ef3fe explicit module Document_ID as source of globally unique identifiers across ML/Scala;
wenzelm
parents: 52444
diff changeset
    94
  PIDE/document_id.scala
52971
31926d2c04ee tuned signature -- more abstract PIDE editor operations;
wenzelm
parents: 52671
diff changeset
    95
  PIDE/editor.scala
64611
d72d63d05bdb clarified modules;
wenzelm
parents: 64610
diff changeset
    96
  PIDE/line.scala
45670
b84170538043 rearranged files;
wenzelm
parents: 45666
diff changeset
    97
  PIDE/markup.scala
43320
wenzelm
parents: 43285
diff changeset
    98
  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
    99
  PIDE/protocol.scala
65214
a2ec0db555c7 clarified modules;
wenzelm
parents: 65191
diff changeset
   100
  PIDE/protocol_handlers.scala
59713
6da3efec20ca clarified modules;
wenzelm
parents: 59459
diff changeset
   101
  PIDE/protocol_message.scala
56385
76acce58aeab more general prover operations;
wenzelm
parents: 56210
diff changeset
   102
  PIDE/prover.scala
52981
c7afd884dfb2 moved generic module to its proper place;
wenzelm
parents: 52975
diff changeset
   103
  PIDE/query_operation.scala
64622
529bbb8977c7 more uniform rendering for Isabelle/jEdit and Isabelle/VSCode;
wenzelm
parents: 64617
diff changeset
   104
  PIDE/rendering.scala
56208
06cc31dff138 clarifed module name;
wenzelm
parents: 55673
diff changeset
   105
  PIDE/resources.scala
56210
c7c85cdb725d clarified module arrangement;
wenzelm
parents: 56208
diff changeset
   106
  PIDE/session.scala
43320
wenzelm
parents: 43285
diff changeset
   107
  PIDE/text.scala
44698
0385292321a0 moved XML/YXML to src/Pure/PIDE;
wenzelm
parents: 43780
diff changeset
   108
  PIDE/xml.scala
0385292321a0 moved XML/YXML to src/Pure/PIDE;
wenzelm
parents: 43780
diff changeset
   109
  PIDE/yxml.scala
57647
5c600dd17617 clarified file names;
wenzelm
parents: 57612
diff changeset
   110
  ROOT.scala
62584
6cd36a0d2a28 clarified files;
wenzelm
parents: 62559
diff changeset
   111
  System/bash.scala
61925
ab52f183f020 clarified directory structure;
wenzelm
parents: 61556
diff changeset
   112
  System/command_line.scala
61282
3e578ddef85d clarified Isabelle_System.init;
wenzelm
parents: 61276
diff changeset
   113
  System/cygwin.scala
62845
31177a9c3025 clarified modules;
wenzelm
parents: 62829
diff changeset
   114
  System/distribution.scala
62431
fbccea37091d support for command-line options as in GNU bash;
wenzelm
parents: 62400
diff changeset
   115
  System/getopts.scala
43744
2c7e1565b4a3 some support to invoke Scala methods under program control;
wenzelm
parents: 43730
diff changeset
   116
  System/invoke_scala.scala
43517
87ec9a1c0f98 basic setup for Isabelle charset;
wenzelm
parents: 43405
diff changeset
   117
  System/isabelle_charset.scala
43320
wenzelm
parents: 43285
diff changeset
   118
  System/isabelle_process.scala
wenzelm
parents: 43285
diff changeset
   119
  System/isabelle_system.scala
62829
4141c2a8458b clarified Isabelle tool wrapper: bash, Scala, no perl, no ML;
wenzelm
parents: 62631
diff changeset
   120
  System/isabelle_tool.scala
64264
42138702d6ec support for Non-Uniform Memory Access of separate CPU nodes;
wenzelm
parents: 64202
diff changeset
   121
  System/numa.scala
48365
d88aefda01c4 basic support for stand-alone options with external string representation;
wenzelm
parents: 48346
diff changeset
   122
  System/options.scala
43320
wenzelm
parents: 43285
diff changeset
   123
  System/platform.scala
56860
dc71c3d0e909 tuned signature;
wenzelm
parents: 56800
diff changeset
   124
  System/posix_interrupt.scala
62400
833af0d6d469 clarified modules;
wenzelm
parents: 62114
diff changeset
   125
  System/process_result.scala
61276
8a4bd05c1735 clarified modules;
wenzelm
parents: 61216
diff changeset
   126
  System/progress.scala
45027
f459e93a038e more abstract wrapping of fifos as System_Channel;
wenzelm
parents: 44698
diff changeset
   127
  System/system_channel.scala
43320
wenzelm
parents: 43285
diff changeset
   128
  Thy/html.scala
50707
5b2bf7611662 maintain session index on Scala side, for more determistic results;
wenzelm
parents: 50689
diff changeset
   129
  Thy/present.scala
62631
c39614ddb80b clarified modules;
wenzelm
parents: 62586
diff changeset
   130
  Thy/sessions.scala
43320
wenzelm
parents: 43285
diff changeset
   131
  Thy/thy_header.scala
67054
9498b7522a99 PIDE resources for theory files;
wenzelm
parents: 67041
diff changeset
   132
  Thy/thy_resources.scala
43320
wenzelm
parents: 43285
diff changeset
   133
  Thy/thy_syntax.scala
58523
937c479e62fe some support for bibtex files;
wenzelm
parents: 57908
diff changeset
   134
  Tools/bibtex.scala
57647
5c600dd17617 clarified file names;
wenzelm
parents: 57612
diff changeset
   135
  Tools/build.scala
66790
c0e68e6a1beb build_docker is regular tool (non-admin);
wenzelm
parents: 66347
diff changeset
   136
  Tools/build_docker.scala
59891
9ce697050455 added isabelle build option -k, for fast off-line checking of theory sources;
wenzelm
parents: 59713
diff changeset
   137
  Tools/check_keywords.scala
60749
f727b99faaf7 skeleton for interactive debugger;
wenzelm
parents: 59891
diff changeset
   138
  Tools/debugger.scala
52444
2cfe6656d6d6 slightly improved "isabelle doc" based on Isabelle/Scala;
wenzelm
parents: 52439
diff changeset
   139
  Tools/doc.scala
65557
29c69a599743 clarified tool name -- more official status;
wenzelm
parents: 65518
diff changeset
   140
  Tools/imports.scala
50687
a8db4bf70e90 moved files;
wenzelm
parents: 50686
diff changeset
   141
  Tools/main.scala
67041
f8b0367046bd converted to Isabelle/Scala;
wenzelm
parents: 67016
diff changeset
   142
  Tools/mkroot.scala
56864
0446c7ac2e32 support print operations as asynchronous query;
wenzelm
parents: 56860
diff changeset
   143
  Tools/print_operation.scala
64342
53fb4a19fb98 regular user tool;
wenzelm
parents: 64311
diff changeset
   144
  Tools/profiling_report.scala
66347
23eaab37e4a8 support for resident Isabelle servers;
wenzelm
parents: 66211
diff changeset
   145
  Tools/server.scala
54730
de2d99b459b3 skeleton for Simplifier trace by Lars Hupel;
wenzelm
parents: 54709
diff changeset
   146
  Tools/simplifier_trace.scala
65139
0a2c0712e432 clarified modules: spell-checker in Pure;
wenzelm
parents: 65138
diff changeset
   147
  Tools/spell_checker.scala
50980
bc746aa3e8d5 charts for future task runtime statistics;
wenzelm
parents: 50707
diff changeset
   148
  Tools/task_statistics.scala
58610
fffdbce036db added update_cartouches tool;
wenzelm
parents: 58523
diff changeset
   149
  Tools/update_cartouches.scala
58872
f0f623005324 added update_header tool;
wenzelm
parents: 58861
diff changeset
   150
  Tools/update_header.scala
61216
4ca490f09ec6 added isabelle update_then;
wenzelm
parents: 60991
diff changeset
   151
  Tools/update_then.scala
61337
4645502c3c64 fewer aliases for toplevel theorem statements;
wenzelm
parents: 61294
diff changeset
   152
  Tools/update_theorems.scala
43320
wenzelm
parents: 43285
diff changeset
   153
  library.scala
43730
a0ed7bc688b5 lambda terms with XML data representation in Scala;
wenzelm
parents: 43715
diff changeset
   154
  term.scala
43779
47bec02c6762 more uniform Term and Term_XML modules;
wenzelm
parents: 43776
diff changeset
   155
  term_xml.scala
64609
wenzelm
parents: 64606
diff changeset
   156
  ../Tools/Graphview/graph_file.scala
wenzelm
parents: 64606
diff changeset
   157
  ../Tools/Graphview/graph_panel.scala
wenzelm
parents: 64606
diff changeset
   158
  ../Tools/Graphview/graphview.scala
wenzelm
parents: 64606
diff changeset
   159
  ../Tools/Graphview/layout.scala
wenzelm
parents: 64606
diff changeset
   160
  ../Tools/Graphview/main_panel.scala
wenzelm
parents: 64606
diff changeset
   161
  ../Tools/Graphview/metrics.scala
wenzelm
parents: 64606
diff changeset
   162
  ../Tools/Graphview/model.scala
wenzelm
parents: 64606
diff changeset
   163
  ../Tools/Graphview/mutator.scala
wenzelm
parents: 64606
diff changeset
   164
  ../Tools/Graphview/mutator_dialog.scala
wenzelm
parents: 64606
diff changeset
   165
  ../Tools/Graphview/mutator_event.scala
wenzelm
parents: 64606
diff changeset
   166
  ../Tools/Graphview/popups.scala
wenzelm
parents: 64606
diff changeset
   167
  ../Tools/Graphview/shapes.scala
wenzelm
parents: 64606
diff changeset
   168
  ../Tools/Graphview/tree_panel.scala
65138
64dfee6bd243 added admin tool "isabelle build_vscode";
wenzelm
parents: 65077
diff changeset
   169
  ../Tools/VSCode/src/build_vscode.scala
64609
wenzelm
parents: 64606
diff changeset
   170
  ../Tools/VSCode/src/channel.scala
wenzelm
parents: 64606
diff changeset
   171
  ../Tools/VSCode/src/document_model.scala
65191
4c9c83311cad dynamic output, depending on caret focus (see also Tools/jEdit/src/output_dockable.scala);
wenzelm
parents: 65139
diff changeset
   172
  ../Tools/VSCode/src/dynamic_output.scala
64738
bcdecd466cb2 generate static TextMate grammar for VSCode editor;
wenzelm
parents: 64699
diff changeset
   173
  ../Tools/VSCode/src/grammar.scala
66098
5aa9cb83e70e clarified modules;
wenzelm
parents: 66096
diff changeset
   174
  ../Tools/VSCode/src/preview_panel.scala
64609
wenzelm
parents: 64606
diff changeset
   175
  ../Tools/VSCode/src/protocol.scala
wenzelm
parents: 64606
diff changeset
   176
  ../Tools/VSCode/src/server.scala
66098
5aa9cb83e70e clarified modules;
wenzelm
parents: 66096
diff changeset
   177
  ../Tools/VSCode/src/state_panel.scala
66211
100c9c997e2b HTML GUI actions via JavaScript;
wenzelm
parents: 66141
diff changeset
   178
  ../Tools/VSCode/src/vscode_javascript.scala
64622
529bbb8977c7 more uniform rendering for Isabelle/jEdit and Isabelle/VSCode;
wenzelm
parents: 64617
diff changeset
   179
  ../Tools/VSCode/src/vscode_rendering.scala
64623
83f012ce2567 clarified module name;
wenzelm
parents: 64622
diff changeset
   180
  ../Tools/VSCode/src/vscode_resources.scala
66141
81c8bb1d33b9 clarified modules;
wenzelm
parents: 66098
diff changeset
   181
  ../Tools/VSCode/src/vscode_spell_checker.scala
43320
wenzelm
parents: 43285
diff changeset
   182
)
wenzelm
parents: 43285
diff changeset
   183
34282
549969a7f582 simplified build/bootstrap of Isabelle/Scala components -- avoid make;
wenzelm
parents:
diff changeset
   184
549969a7f582 simplified build/bootstrap of Isabelle/Scala components -- avoid make;
wenzelm
parents:
diff changeset
   185
## diagnostics
549969a7f582 simplified build/bootstrap of Isabelle/Scala components -- avoid make;
wenzelm
parents:
diff changeset
   186
43280
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   187
PRG="$(basename "$0")"
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   188
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   189
function usage()
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   190
{
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   191
  echo
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   192
  echo "Usage: isabelle $PRG [OPTIONS]"
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   193
  echo
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   194
  echo "  Options are:"
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   195
  echo "    -f           fresh build"
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   196
  echo
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   197
  exit 1
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   198
}
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   199
34282
549969a7f582 simplified build/bootstrap of Isabelle/Scala components -- avoid make;
wenzelm
parents:
diff changeset
   200
function fail()
549969a7f582 simplified build/bootstrap of Isabelle/Scala components -- avoid make;
wenzelm
parents:
diff changeset
   201
{
549969a7f582 simplified build/bootstrap of Isabelle/Scala components -- avoid make;
wenzelm
parents:
diff changeset
   202
  echo "$1" >&2
549969a7f582 simplified build/bootstrap of Isabelle/Scala components -- avoid make;
wenzelm
parents:
diff changeset
   203
  exit 2
549969a7f582 simplified build/bootstrap of Isabelle/Scala components -- avoid make;
wenzelm
parents:
diff changeset
   204
}
549969a7f582 simplified build/bootstrap of Isabelle/Scala components -- avoid make;
wenzelm
parents:
diff changeset
   205
42899
108e815fdc8e misc tuning and update;
wenzelm
parents: 42720
diff changeset
   206
[ -z "$ISABELLE_HOME" ] && fail "Missing Isabelle settings environment"
34282
549969a7f582 simplified build/bootstrap of Isabelle/Scala components -- avoid make;
wenzelm
parents:
diff changeset
   207
549969a7f582 simplified build/bootstrap of Isabelle/Scala components -- avoid make;
wenzelm
parents:
diff changeset
   208
43280
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   209
## process command line
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   210
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   211
# options
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   212
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   213
FRESH=""
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   214
64370
865b39487b5d discontinued unused / untested distinction of separate PIDE modules;
wenzelm
parents: 64369
diff changeset
   215
while getopts "f" OPT
43280
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   216
do
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   217
  case "$OPT" in
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   218
    f)
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   219
      FRESH=true
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   220
      ;;
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   221
    \?)
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   222
      usage
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   223
      ;;
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   224
  esac
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   225
done
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   226
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   227
shift $(($OPTIND - 1))
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   228
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   229
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   230
# args
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   231
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   232
[ "$#" -ne 0 ] && usage
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   233
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   234
49558
af7b652180d5 minimal component and build setup for graphview;
wenzelm
parents: 49449
diff changeset
   235
## build
34282
549969a7f582 simplified build/bootstrap of Isabelle/Scala components -- avoid make;
wenzelm
parents:
diff changeset
   236
34284
33ad3571ad83 tuned Isabelle/Scala build;
wenzelm
parents: 34282
diff changeset
   237
TARGET_DIR="$ISABELLE_HOME/lib/classes"
53577
d033bc00b762 clarified directory structure;
wenzelm
parents: 53576
diff changeset
   238
TARGET="$TARGET_DIR/Pure.jar"
34282
549969a7f582 simplified build/bootstrap of Isabelle/Scala components -- avoid make;
wenzelm
parents:
diff changeset
   239
43405
723a8af9d3f0 tuned messages;
wenzelm
parents: 43320
diff changeset
   240
declare -a UPDATED=()
723a8af9d3f0 tuned messages;
wenzelm
parents: 43320
diff changeset
   241
43280
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   242
if [ -n "$FRESH" ]; then
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   243
  OUTDATED=true
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   244
else
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   245
  OUTDATED=false
43523
5aaa0fe92672 simplified arrangement of jars;
wenzelm
parents: 43521
diff changeset
   246
  if [ ! -e "$TARGET" ]; then
5aaa0fe92672 simplified arrangement of jars;
wenzelm
parents: 43521
diff changeset
   247
    OUTDATED=true
5aaa0fe92672 simplified arrangement of jars;
wenzelm
parents: 43521
diff changeset
   248
  else
43405
723a8af9d3f0 tuned messages;
wenzelm
parents: 43320
diff changeset
   249
    for DEP in "${SOURCES[@]}"
43280
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   250
    do
43405
723a8af9d3f0 tuned messages;
wenzelm
parents: 43320
diff changeset
   251
      [ ! -e "$DEP" ] && fail "Missing file: $DEP"
43523
5aaa0fe92672 simplified arrangement of jars;
wenzelm
parents: 43521
diff changeset
   252
      [ "$DEP" -nt "$TARGET" ] && {
5aaa0fe92672 simplified arrangement of jars;
wenzelm
parents: 43521
diff changeset
   253
        OUTDATED=true
5aaa0fe92672 simplified arrangement of jars;
wenzelm
parents: 43521
diff changeset
   254
        UPDATED["${#UPDATED[@]}"]="$DEP"
5aaa0fe92672 simplified arrangement of jars;
wenzelm
parents: 43521
diff changeset
   255
      }
43280
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   256
    done
43405
723a8af9d3f0 tuned messages;
wenzelm
parents: 43320
diff changeset
   257
  fi
43280
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   258
fi
34282
549969a7f582 simplified build/bootstrap of Isabelle/Scala components -- avoid make;
wenzelm
parents:
diff changeset
   259
34284
33ad3571ad83 tuned Isabelle/Scala build;
wenzelm
parents: 34282
diff changeset
   260
if [ "$OUTDATED" = true ]
33ad3571ad83 tuned Isabelle/Scala build;
wenzelm
parents: 34282
diff changeset
   261
then
49173
fa01a202399c eliminated potentially confusing terminology of Scala "layer";
wenzelm
parents: 49068
diff changeset
   262
  echo "### Building Isabelle/Scala ..."
34282
549969a7f582 simplified build/bootstrap of Isabelle/Scala components -- avoid make;
wenzelm
parents:
diff changeset
   263
43405
723a8af9d3f0 tuned messages;
wenzelm
parents: 43320
diff changeset
   264
  [ "${#UPDATED[@]}" -gt 0 ] && {
723a8af9d3f0 tuned messages;
wenzelm
parents: 43320
diff changeset
   265
    echo "Changed files:"
723a8af9d3f0 tuned messages;
wenzelm
parents: 43320
diff changeset
   266
    for FILE in "${UPDATED[@]}"
723a8af9d3f0 tuned messages;
wenzelm
parents: 43320
diff changeset
   267
    do
723a8af9d3f0 tuned messages;
wenzelm
parents: 43320
diff changeset
   268
      echo "  $FILE"
723a8af9d3f0 tuned messages;
wenzelm
parents: 43320
diff changeset
   269
    done
723a8af9d3f0 tuned messages;
wenzelm
parents: 43320
diff changeset
   270
  }
723a8af9d3f0 tuned messages;
wenzelm
parents: 43320
diff changeset
   271
64375
74a2af7c5145 remove old target: it is on the classpath and may break scalac;
wenzelm
parents: 64370
diff changeset
   272
  rm -f "$TARGET"
34282
549969a7f582 simplified build/bootstrap of Isabelle/Scala components -- avoid make;
wenzelm
parents:
diff changeset
   273
  rm -rf classes && mkdir classes
45673
cd41e3903fbf separate compilation of PIDE vs. Pure sources, which enables independent Scala library;
wenzelm
parents: 45672
diff changeset
   274
64900
3687036107cd clarified settings;
wenzelm
parents: 64890
diff changeset
   275
  SCALAC_OPTIONS="$ISABELLE_SCALAC_OPTIONS -d classes"
45673
cd41e3903fbf separate compilation of PIDE vs. Pure sources, which enables independent Scala library;
wenzelm
parents: 45672
diff changeset
   276
50689
0607d557d073 some support for chart drawing;
wenzelm
parents: 50687
diff changeset
   277
  (
58791
00916b0dd596 clarified ISABELLE_JDK_HOME vs. JAVA_HOME;
wenzelm
parents: 58706
diff changeset
   278
    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
   279
    classpath classes
61294
2d3d26e9b191 renamed jvmpath to platform_path;
wenzelm
parents: 61288
diff changeset
   280
    export CLASSPATH="$(platform_path "$ISABELLE_CLASSPATH")"
50689
0607d557d073 some support for chart drawing;
wenzelm
parents: 50687
diff changeset
   281
64370
865b39487b5d discontinued unused / untested distinction of separate PIDE modules;
wenzelm
parents: 64369
diff changeset
   282
    isabelle_scala scalac $SCALAC_OPTIONS "${SOURCES[@]}" || \
865b39487b5d discontinued unused / untested distinction of separate PIDE modules;
wenzelm
parents: 64369
diff changeset
   283
      fail "Failed to compile sources"
51508
48a1e09120d4 actually exit on scalac failure;
wenzelm
parents: 51504
diff changeset
   284
  ) || exit "$?"
45673
cd41e3903fbf separate compilation of PIDE vs. Pure sources, which enables independent Scala library;
wenzelm
parents: 45672
diff changeset
   285
53577
d033bc00b762 clarified directory structure;
wenzelm
parents: 53576
diff changeset
   286
  mkdir -p "$TARGET_DIR" || fail "Failed to create directory $TARGET_DIR"
43280
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   287
43285
966f359dc724 further jedit build option;
wenzelm
parents: 43280
diff changeset
   288
  pushd classes >/dev/null
43280
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   289
43517
87ec9a1c0f98 basic setup for Isabelle charset;
wenzelm
parents: 43405
diff changeset
   290
  CHARSET_SERVICE="META-INF/services/java.nio.charset.spi.CharsetProvider"
87ec9a1c0f98 basic setup for Isabelle charset;
wenzelm
parents: 43405
diff changeset
   291
  mkdir -p "$(dirname "$CHARSET_SERVICE")"
87ec9a1c0f98 basic setup for Isabelle charset;
wenzelm
parents: 43405
diff changeset
   292
  echo isabelle.Isabelle_Charset_Provider > "$CHARSET_SERVICE"
87ec9a1c0f98 basic setup for Isabelle charset;
wenzelm
parents: 43405
diff changeset
   293
54676
6b2ca4850b71 uniform use of transparent icons, as for main "apps";
wenzelm
parents: 54671
diff changeset
   294
  cp "$ISABELLE_HOME/lib/logo/isabelle_transparent-32.gif" isabelle/.
54709
87402674fe2f alternative hires icon;
wenzelm
parents: 54676
diff changeset
   295
  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
   296
61294
2d3d26e9b191 renamed jvmpath to platform_path;
wenzelm
parents: 61288
diff changeset
   297
  isabelle_jdk jar cfe "$(platform_path "$TARGET")" isabelle.Main META-INF isabelle || \
43523
5aaa0fe92672 simplified arrangement of jars;
wenzelm
parents: 43521
diff changeset
   298
    fail "Failed to produce $TARGET"
34282
549969a7f582 simplified build/bootstrap of Isabelle/Scala components -- avoid make;
wenzelm
parents:
diff changeset
   299
43280
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   300
  popd >/dev/null
e5dd0ae1b054 support fresh build of jars;
wenzelm
parents: 42899
diff changeset
   301
34282
549969a7f582 simplified build/bootstrap of Isabelle/Scala components -- avoid make;
wenzelm
parents:
diff changeset
   302
  rm -rf classes
549969a7f582 simplified build/bootstrap of Isabelle/Scala components -- avoid make;
wenzelm
parents:
diff changeset
   303
fi