32 heap: Int = default_heap, |
32 heap: Int = default_heap, |
33 more_settings: List[String] = Nil, |
33 more_settings: List[String] = Nil, |
34 verbose: Boolean = false, |
34 verbose: Boolean = false, |
35 build_args: List[String] = Nil): Process_Result = |
35 build_args: List[String] = Nil): Process_Result = |
36 { |
36 { |
|
37 /* sanity checks */ |
|
38 |
37 if (threads < 1) error("Bad threads value < 1: " + threads) |
39 if (threads < 1) error("Bad threads value < 1: " + threads) |
38 if (heap < 100) error("Bad heap value < 100: " + heap) |
40 if (heap < 100) error("Bad heap value < 100: " + heap) |
39 |
41 |
|
42 System.getenv("ISABELLE_SETTINGS_PRESENT") match { |
|
43 case null | "" => |
|
44 case _ => error("Cannot run build_history within existing Isabelle settings environment") |
|
45 } |
|
46 |
|
47 |
|
48 /* purge repository */ |
|
49 |
40 hg.update(rev = rev, clean = true) |
50 hg.update(rev = rev, clean = true) |
41 if (verbose) Output.writeln(hg.log(rev, options = "-l1")) |
51 if (verbose) Output.writeln(hg.log(rev, options = "-l1")) |
|
52 |
|
53 |
|
54 /* invoke isabelle tools */ |
42 |
55 |
43 def bash(script: String): Process_Result = |
56 def bash(script: String): Process_Result = |
44 Isabelle_System.bash("env ISABELLE_IDENTIFIER=" + File.bash_string(isabelle_identifier) + |
57 Isabelle_System.bash("env ISABELLE_IDENTIFIER=" + File.bash_string(isabelle_identifier) + |
45 " " + script, cwd = hg.root.file, env = null) |
58 " " + script, cwd = hg.root.file, env = null) |
46 |
59 |