src/Pure/Tools/build_history.scala
changeset 64032 46c1ffc78d73
parent 64031 eef8a3f8ef4a
child 64034 51bf28aa18a5
equal deleted inserted replaced
64031:eef8a3f8ef4a 64032:46c1ffc78d73
    73     File.write(etc_settings,
    73     File.write(etc_settings,
    74       "# generated by Isabelle " + Calendar.getInstance.getTime + "\n" +
    74       "# generated by Isabelle " + Calendar.getInstance.getTime + "\n" +
    75       "#-*- shell-script -*- :mode=shellscript:\n")
    75       "#-*- shell-script -*- :mode=shellscript:\n")
    76 
    76 
    77 
    77 
    78     /* component settings */
    78     /* initial settings */
    79 
    79 
    80     val component_settings =
    80     val component_settings =
    81     {
    81     {
    82       val components_base_path =
    82       val components_base_path =
    83         if (components_base == "") isabelle_home_user.dir + Path.explode("contrib")
    83         if (components_base == "") isabelle_home_user.dir + Path.explode("contrib")
    92     }
    92     }
    93 
    93 
    94     File.append(etc_settings, "\n" + Library.terminate_lines(component_settings))
    94     File.append(etc_settings, "\n" + Library.terminate_lines(component_settings))
    95 
    95 
    96 
    96 
    97     /* ML settings */
    97     /* augmented settings */
    98 
    98 
    99     val ml_settings =
    99     val ml_settings =
   100     {
   100     {
   101       val windows_32 = "x86-windows"
   101       val windows_32 = "x86-windows"
   102       val windows_64 = "x86_64-windows"
   102       val windows_64 = "x86_64-windows"
   136         "ML_HOME=" + File.bash_path(ml_home(ml_platform)),
   136         "ML_HOME=" + File.bash_path(ml_home(ml_platform)),
   137         "ML_PLATFORM=" + quote(ml_platform),
   137         "ML_PLATFORM=" + quote(ml_platform),
   138         "ML_OPTIONS=" + quote(ml_options))
   138         "ML_OPTIONS=" + quote(ml_options))
   139     }
   139     }
   140 
   140 
   141 
       
   142     /* thread settings */
       
   143 
       
   144     val thread_settings =
   141     val thread_settings =
   145       List(
   142       List(
   146         "ISABELLE_JAVA_SYSTEM_OPTIONS=\"$ISABELLE_JAVA_SYSTEM_OPTIONS -Disabelle.threads=" + threads + "\"",
   143         "ISABELLE_JAVA_SYSTEM_OPTIONS=\"$ISABELLE_JAVA_SYSTEM_OPTIONS -Disabelle.threads=" + threads + "\"",
   147         "ISABELLE_BUILD_OPTIONS=\"threads=" + threads + "\"")
   144         "ISABELLE_BUILD_OPTIONS=\"threads=" + threads + "\"")
   148 
   145 
   149 
       
   150     /* build */
       
   151 
       
   152     File.append(etc_settings, "\n" +
   146     File.append(etc_settings, "\n" +
   153       cat_lines(List(ml_settings, thread_settings).map(Library.terminate_lines(_))))
   147       cat_lines(List(ml_settings, thread_settings).map(Library.terminate_lines(_))))
   154 
   148 
   155     if (more_settings.nonEmpty)
   149     if (more_settings.nonEmpty)
   156       File.append(etc_settings, "\n" + Library.terminate_lines(more_settings))
   150       File.append(etc_settings, "\n" + Library.terminate_lines(more_settings))
       
   151 
       
   152 
       
   153     /* build */
   157 
   154 
   158     isabelle("components -a").check.print_if(verbose)
   155     isabelle("components -a").check.print_if(verbose)
   159     isabelle("jedit -b" + (if (fresh) " -f" else "")).check.print_if(verbose)
   156     isabelle("jedit -b" + (if (fresh) " -f" else "")).check.print_if(verbose)
   160 
   157 
   161     isabelle("build " + File.bash_args(build_args))
   158     isabelle("build " + File.bash_args(build_args))