src/Pure/Tools/build.scala
changeset 60958 5d70b5c509f8
parent 60215 5fb4990dfc73
child 60959 3565c9f407ec
--- a/src/Pure/Tools/build.scala	Mon Aug 17 19:34:15 2015 +0200
+++ b/src/Pure/Tools/build.scala	Mon Aug 17 21:22:55 2015 +0200
@@ -590,11 +590,16 @@
                 (info.chapter, (name, theories)))))))))))
         }))
 
-    private val env =
+    private val env0 =
       Map("INPUT" -> parent, "TARGET" -> name, "OUTPUT" -> Isabelle_System.standard_path(output),
         (if (is_pure(name)) "ISABELLE_PROCESS_OPTIONS" else "ARGS_FILE") ->
           Isabelle_System.posix_path(args_file))
 
+    private val env =
+      if (is_pure(name))
+        env0 + ("ISABELLE_ML_DEBUGGER" -> info.options.bool("ML_debugger").toString)
+      else env0
+
     private val script =
       if (is_pure(name)) {
         if (do_output) "./build " + name + " \"$OUTPUT\""