src/Pure/Tools/build.scala
changeset 68198 6710167e17af
parent 68148 fb661e4c4717
child 68204 a554da2811f2
     1.1 --- a/src/Pure/Tools/build.scala	Wed May 16 21:07:12 2018 +0200
     1.2 +++ b/src/Pure/Tools/build.scala	Wed May 16 21:36:59 2018 +0200
     1.3 @@ -195,6 +195,7 @@
     1.4      private val graph_file = Isabelle_System.tmp_file("session_graph", "pdf")
     1.5      isabelle.graphview.Graph_File.write(options, graph_file, deps(name).session_graph_display)
     1.6  
     1.7 +    private val export_tmp_dir = Isabelle_System.tmp_dir("export")
     1.8      private val export_consumer = Export.consumer(SQLite.open_database(store.output_database(name)))
     1.9  
    1.10      private val future_result: Future[Process_Result] =
    1.11 @@ -222,6 +223,7 @@
    1.12  
    1.13          val env =
    1.14            Isabelle_System.settings() +
    1.15 +            ("ISABELLE_EXPORT_TMP" -> File.standard_path(export_tmp_dir)) +
    1.16              ("ISABELLE_ML_DEBUGGER" -> options.bool("ML_debugger").toString)
    1.17  
    1.18          def save_heap: String =
    1.19 @@ -323,6 +325,8 @@
    1.20            case errs => result.errors(errs)
    1.21          }
    1.22  
    1.23 +      Isabelle_System.rm_tree(export_tmp_dir)
    1.24 +
    1.25        if (export_result.ok)
    1.26          Present.finish(progress, store.browser_info, graph_file, info, name)
    1.27