equal
deleted
inserted
replaced
1029 Command_Line.tool { |
1029 Command_Line.tool { |
1030 def show_settings(): String = |
1030 def show_settings(): String = |
1031 cat_lines(List( |
1031 cat_lines(List( |
1032 "ISABELLE_BUILD_OPTIONS=" + |
1032 "ISABELLE_BUILD_OPTIONS=" + |
1033 quote(Isabelle_System.getenv("ISABELLE_BUILD_OPTIONS")), |
1033 quote(Isabelle_System.getenv("ISABELLE_BUILD_OPTIONS")), |
1034 "", |
|
1035 "ISABELLE_BUILD_JAVA_OPTIONS=" + |
1034 "ISABELLE_BUILD_JAVA_OPTIONS=" + |
1036 quote(Isabelle_System.getenv("ISABELLE_BUILD_JAVA_OPTIONS")) + |
1035 quote(Isabelle_System.getenv("ISABELLE_BUILD_JAVA_OPTIONS")), |
1037 "", |
1036 "", |
1038 "ML_PLATFORM=" + quote(Isabelle_System.getenv("ML_PLATFORM")), |
1037 "ML_PLATFORM=" + quote(Isabelle_System.getenv("ML_PLATFORM")), |
1039 "ML_HOME=" + quote(Isabelle_System.getenv("ML_HOME")), |
1038 "ML_HOME=" + quote(Isabelle_System.getenv("ML_HOME")), |
1040 "ML_SYSTEM=" + quote(Isabelle_System.getenv("ML_SYSTEM")), |
1039 "ML_SYSTEM=" + quote(Isabelle_System.getenv("ML_SYSTEM")), |
1041 "ML_OPTIONS=" + quote(Isabelle_System.getenv("ML_OPTIONS")))) |
1040 "ML_OPTIONS=" + quote(Isabelle_System.getenv("ML_OPTIONS")))) |
1078 -o OPTION override Isabelle system OPTION (via NAME=VAL or NAME) |
1077 -o OPTION override Isabelle system OPTION (via NAME=VAL or NAME) |
1079 -s system build mode: produce output in ISABELLE_HOME |
1078 -s system build mode: produce output in ISABELLE_HOME |
1080 -v verbose |
1079 -v verbose |
1081 -x NAME exclude session NAME and all descendants |
1080 -x NAME exclude session NAME and all descendants |
1082 |
1081 |
1083 Build and manage Isabelle sessions, depending on implicit |
1082 Build and manage Isabelle sessions, depending on implicit settings: |
|
1083 |
1084 """ + Library.prefix_lines(" ", show_settings()), |
1084 """ + Library.prefix_lines(" ", show_settings()), |
1085 "D:" -> (arg => select_dirs = select_dirs ::: List(Path.explode(arg))), |
1085 "D:" -> (arg => select_dirs = select_dirs ::: List(Path.explode(arg))), |
1086 "R" -> (_ => requirements = true), |
1086 "R" -> (_ => requirements = true), |
1087 "X:" -> (arg => exclude_session_groups = exclude_session_groups ::: List(arg)), |
1087 "X:" -> (arg => exclude_session_groups = exclude_session_groups ::: List(arg)), |
1088 "a" -> (_ => all_sessions = true), |
1088 "a" -> (_ => all_sessions = true), |
1105 |
1105 |
1106 if (verbose) { |
1106 if (verbose) { |
1107 progress.echo( |
1107 progress.echo( |
1108 Library.trim_line( |
1108 Library.trim_line( |
1109 Isabelle_System.bash( |
1109 Isabelle_System.bash( |
1110 """echo "Started at $(date) ($ML_IDENTIFIER on $(hostname))" """).out)) |
1110 """echo "Started at $(date) ($ML_IDENTIFIER on $(hostname))" """).out) + "\n") |
1111 progress.echo(show_settings()) |
1111 progress.echo(show_settings() + "\n") |
1112 } |
1112 } |
1113 |
1113 |
1114 val start_time = Time.now() |
1114 val start_time = Time.now() |
1115 val results = |
1115 val results = |
1116 progress.interrupt_handler { |
1116 progress.interrupt_handler { |
1119 check_keywords, no_build, system_mode, verbose, exclude_sessions, sessions) |
1119 check_keywords, no_build, system_mode, verbose, exclude_sessions, sessions) |
1120 } |
1120 } |
1121 val elapsed_time = Time.now() - start_time |
1121 val elapsed_time = Time.now() - start_time |
1122 |
1122 |
1123 if (verbose) { |
1123 if (verbose) { |
1124 progress.echo( |
1124 progress.echo("\n" + |
1125 Library.trim_line( |
1125 Library.trim_line( |
1126 Isabelle_System.bash("""echo "Finished at "; date""").out)) |
1126 Isabelle_System.bash("""echo -n "Finished at "; date""").out)) |
1127 } |
1127 } |
1128 |
1128 |
1129 val total_timing = |
1129 val total_timing = |
1130 (Timing.zero /: results.sessions.iterator.map(a => results(a).timing))(_ + _). |
1130 (Timing.zero /: results.sessions.iterator.map(a => results(a).timing))(_ + _). |
1131 copy(elapsed = elapsed_time) |
1131 copy(elapsed = elapsed_time) |