proper init_settings, before inspecting ML_HOME etc;
authorwenzelm
Tue May 16 16:04:50 2017 +0200 (23 months ago)
changeset 65845b8ff63149256
parent 65844 76e60a142ca1
child 65846 aa6e58dc54d0
proper init_settings, before inspecting ML_HOME etc;
src/Pure/Admin/build_history.scala
src/Pure/Admin/other_isabelle.scala
     1.1 --- a/src/Pure/Admin/build_history.scala	Tue May 16 15:53:27 2017 +0200
     1.2 +++ b/src/Pure/Admin/build_history.scala	Tue May 16 16:04:50 2017 +0200
     1.3 @@ -29,7 +29,6 @@
     1.4      arch_64: Boolean,
     1.5      heap: Int,
     1.6      max_heap: Option[Int],
     1.7 -    init_settings: List[String],
     1.8      more_settings: List[String]): String =
     1.9    {
    1.10      val (ml_platform, ml_settings) =
    1.11 @@ -85,7 +84,6 @@
    1.12          "ISABELLE_BUILD_OPTIONS=\"threads=" + threads + "\"")
    1.13  
    1.14      val settings =
    1.15 -      (if (init_settings.isEmpty) Nil else List(init_settings)) :::
    1.16        List(ml_settings, thread_settings) :::
    1.17        (if (more_settings.isEmpty) Nil else List(more_settings))
    1.18  
    1.19 @@ -163,11 +161,10 @@
    1.20      {
    1.21        /* init settings */
    1.22  
    1.23 -      other_isabelle.init_settings(components_base, nonfree)
    1.24 +      other_isabelle.init_settings(components_base, nonfree, init_settings)
    1.25        other_isabelle.resolve_components(verbose)
    1.26        val ml_platform =
    1.27 -        augment_settings(other_isabelle, threads, arch_64, heap, max_heap,
    1.28 -          init_settings, more_settings)
    1.29 +        augment_settings(other_isabelle, threads, arch_64, heap, max_heap, more_settings)
    1.30  
    1.31        val isabelle_output = Path.explode(other_isabelle("getenv -b ISABELLE_OUTPUT").check.out)
    1.32        val isabelle_output_log = isabelle_output + Path.explode("log")
     2.1 --- a/src/Pure/Admin/other_isabelle.scala	Tue May 16 15:53:27 2017 +0200
     2.2 +++ b/src/Pure/Admin/other_isabelle.scala	Tue May 16 16:04:50 2017 +0200
     2.3 @@ -33,7 +33,7 @@
     2.4  
     2.5    /* init settings */
     2.6  
     2.7 -  def init_settings(components_base: String, nonfree: Boolean)
     2.8 +  def init_settings(components_base: String, nonfree: Boolean, more_settings: List[String])
     2.9    {
    2.10      if (etc_settings.is_file && !File.read(etc_settings).startsWith("# generated by Isabelle"))
    2.11        error("Cannot proceed with existing user settings file: " + etc_settings)
    2.12 @@ -56,6 +56,11 @@
    2.13          "init_components " + File.bash_path(components_base_path) +
    2.14            " \"$ISABELLE_HOME/Admin/components/" + catalog + "\"")
    2.15      }
    2.16 -    File.append(etc_settings, "\n" + terminate_lines(component_settings))
    2.17 +
    2.18 +    val settings =
    2.19 +      List(component_settings) :::
    2.20 +      (if (more_settings.isEmpty) Nil else List(more_settings))
    2.21 +
    2.22 +    File.append(etc_settings, "\n" + cat_lines(settings.map(terminate_lines(_))))
    2.23    }
    2.24  }