--- a/src/Pure/Tools/build.ML Tue Mar 15 14:30:18 2016 +0100
+++ b/src/Pure/Tools/build.ML Tue Mar 15 16:23:27 2016 +0100
@@ -120,54 +120,52 @@
" (undefined " ^ commas conds ^ ")\n")
end;
-fun build args_file = Command_Line.tool0 (fn () =>
- let
- val _ = SHA1_Samples.test ();
+fun build args_file =
+ let
+ val _ = SHA1_Samples.test ();
- val (symbol_codes, (command_timings, (output, (verbose, (browser_info,
- (document_files, (graph_file, (parent_name, (chapter, (name, theories)))))))))) =
- File.read (Path.explode args_file) |> YXML.parse_body |>
- let open XML.Decode in
- pair (list (pair string int)) (pair (list properties) (pair string
- (pair bool (pair string (pair (list (pair string string)) (pair string
- (pair string (pair string (pair string
- ((list (pair Options.decode (list (string #> rpair Position.none))))))))))))))
- end;
- val do_output = output <> "";
+ val (symbol_codes, (command_timings, (do_output, (verbose, (browser_info,
+ (document_files, (graph_file, (parent_name, (chapter, (name, theories)))))))))) =
+ File.read (Path.explode args_file) |> YXML.parse_body |>
+ let open XML.Decode in
+ pair (list (pair string int)) (pair (list properties) (pair bool
+ (pair bool (pair string (pair (list (pair string string)) (pair string
+ (pair string (pair string (pair string
+ ((list (pair Options.decode (list (string #> rpair Position.none))))))))))))))
+ end;
- val symbols = HTML.make_symbols symbol_codes;
- val _ = Isabelle_Process.init_build_options ();
+ val symbols = HTML.make_symbols symbol_codes;
+ val _ = Isabelle_Process.init_build_options ();
- val _ = writeln ("\fSession.name = " ^ name);
- val _ =
- Session.init
- symbols
- do_output
- (Options.default_bool "browser_info")
- (Path.explode browser_info)
- (Options.default_string "document")
- (Options.default_string "document_output")
- (Present.document_variants (Options.default_string "document_variants"))
- (map (apply2 Path.explode) document_files)
- (Path.explode graph_file)
- parent_name (chapter, name)
- verbose;
+ val _ = writeln ("\fSession.name = " ^ name);
+ val _ =
+ Session.init
+ symbols
+ do_output
+ (Options.default_bool "browser_info")
+ (Path.explode browser_info)
+ (Options.default_string "document")
+ (Options.default_string "document_output")
+ (Present.document_variants (Options.default_string "document_variants"))
+ (map (apply2 Path.explode) document_files)
+ (Path.explode graph_file)
+ parent_name (chapter, name)
+ verbose;
- val last_timing = lookup_timings (fold update_timings command_timings empty_timings);
+ val last_timing = lookup_timings (fold update_timings command_timings empty_timings);
- val res1 =
- theories |>
- (List.app (build_theories symbols last_timing Path.current)
- |> session_timing name verbose
- |> Unsynchronized.setmp Output.protocol_message_fn protocol_message
- |> Multithreading.max_threads_setmp (Options.default_int "threads")
- |> Exn.capture);
- val res2 = Exn.capture Session.finish ();
- val _ = Par_Exn.release_all [res1, res2];
+ val res1 =
+ theories |>
+ (List.app (build_theories symbols last_timing Path.current)
+ |> session_timing name verbose
+ |> Unsynchronized.setmp Output.protocol_message_fn protocol_message
+ |> Multithreading.max_threads_setmp (Options.default_int "threads")
+ |> Exn.capture);
+ val res2 = Exn.capture Session.finish ();
+ val _ = Par_Exn.release_all [res1, res2];
- val _ = Options.reset_default ();
- val _ = if do_output then (ML_Heap.share_common_data (); ML_Heap.save_state output) else ();
- in () end);
+ val _ = Options.reset_default ();
+ in () end;
(* PIDE protocol *)