src/Pure/Admin/build_polyml.scala
author wenzelm
Fri, 11 Nov 2016 16:49:59 +0100
changeset 64495 754e1b4634c3
parent 64494 979520c83f30
child 64496 50806c43e01b
permissions -rw-r--r--
build sha1 library;
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
64483
bba1d341bdf6 build_polyml in Scala;
wenzelm
parents:
diff changeset
     1
/*  Title:      Pure/Admin/build_polyml.scala
bba1d341bdf6 build_polyml in Scala;
wenzelm
parents:
diff changeset
     2
    Author:     Makarius
bba1d341bdf6 build_polyml in Scala;
wenzelm
parents:
diff changeset
     3
bba1d341bdf6 build_polyml in Scala;
wenzelm
parents:
diff changeset
     4
Build Poly/ML from sources.
bba1d341bdf6 build_polyml in Scala;
wenzelm
parents:
diff changeset
     5
*/
bba1d341bdf6 build_polyml in Scala;
wenzelm
parents:
diff changeset
     6
bba1d341bdf6 build_polyml in Scala;
wenzelm
parents:
diff changeset
     7
package isabelle
bba1d341bdf6 build_polyml in Scala;
wenzelm
parents:
diff changeset
     8
bba1d341bdf6 build_polyml in Scala;
wenzelm
parents:
diff changeset
     9
bba1d341bdf6 build_polyml in Scala;
wenzelm
parents:
diff changeset
    10
object Build_PolyML
bba1d341bdf6 build_polyml in Scala;
wenzelm
parents:
diff changeset
    11
{
bba1d341bdf6 build_polyml in Scala;
wenzelm
parents:
diff changeset
    12
  sealed case class Platform_Info(
bba1d341bdf6 build_polyml in Scala;
wenzelm
parents:
diff changeset
    13
    options: List[String] = Nil,
bba1d341bdf6 build_polyml in Scala;
wenzelm
parents:
diff changeset
    14
    options_multilib: List[String] = Nil,
64487
b843bcdd40f0 more precise environment (for Windows);
wenzelm
parents: 64486
diff changeset
    15
    setup: String = "",
64483
bba1d341bdf6 build_polyml in Scala;
wenzelm
parents:
diff changeset
    16
    copy_files: List[String] = Nil)
bba1d341bdf6 build_polyml in Scala;
wenzelm
parents:
diff changeset
    17
bba1d341bdf6 build_polyml in Scala;
wenzelm
parents:
diff changeset
    18
  private val platform_info = Map(
bba1d341bdf6 build_polyml in Scala;
wenzelm
parents:
diff changeset
    19
    "x86-linux" ->
bba1d341bdf6 build_polyml in Scala;
wenzelm
parents:
diff changeset
    20
      Platform_Info(
bba1d341bdf6 build_polyml in Scala;
wenzelm
parents:
diff changeset
    21
        options_multilib =
64484
784e28e4dc57 proper options;
wenzelm
parents: 64483
diff changeset
    22
          List("--build=i386", "CFLAGS=-m32 -O3", "CXXFLAGS=-m32 -O3", "CCASFLAGS=-m32")),
64483
bba1d341bdf6 build_polyml in Scala;
wenzelm
parents:
diff changeset
    23
    "x86_64-linux" -> Platform_Info(),
bba1d341bdf6 build_polyml in Scala;
wenzelm
parents:
diff changeset
    24
    "x86-darwin" ->
bba1d341bdf6 build_polyml in Scala;
wenzelm
parents:
diff changeset
    25
      Platform_Info(
bba1d341bdf6 build_polyml in Scala;
wenzelm
parents:
diff changeset
    26
        options =
64484
784e28e4dc57 proper options;
wenzelm
parents: 64483
diff changeset
    27
          List("--build=i686-darwin", "CFLAGS=-arch i686 -O3 -I../libffi/include",
784e28e4dc57 proper options;
wenzelm
parents: 64483
diff changeset
    28
            "CXXFLAGS=-arch i686 -O3 -I../libffi/include", "CCASFLAGS=-arch i686 -O3",
784e28e4dc57 proper options;
wenzelm
parents: 64483
diff changeset
    29
            "LDFLAGS=-segprot POLY rwx rwx")),
64483
bba1d341bdf6 build_polyml in Scala;
wenzelm
parents:
diff changeset
    30
    "x86_64-darwin" ->
bba1d341bdf6 build_polyml in Scala;
wenzelm
parents:
diff changeset
    31
      Platform_Info(
bba1d341bdf6 build_polyml in Scala;
wenzelm
parents:
diff changeset
    32
        options =
64484
784e28e4dc57 proper options;
wenzelm
parents: 64483
diff changeset
    33
          List("--build=x86_64-darwin", "CFLAGS=-arch x86_64 -O3 -I../libffi/include",
784e28e4dc57 proper options;
wenzelm
parents: 64483
diff changeset
    34
            "CXXFLAGS=-arch x86_64 -O3 -I../libffi/include", "CCASFLAGS=-arch x86_64",
784e28e4dc57 proper options;
wenzelm
parents: 64483
diff changeset
    35
            "LDFLAGS=-segprot POLY rwx rwx")),
64483
bba1d341bdf6 build_polyml in Scala;
wenzelm
parents:
diff changeset
    36
    "x86-windows" ->
bba1d341bdf6 build_polyml in Scala;
wenzelm
parents:
diff changeset
    37
      Platform_Info(
bba1d341bdf6 build_polyml in Scala;
wenzelm
parents:
diff changeset
    38
        options =
64484
784e28e4dc57 proper options;
wenzelm
parents: 64483
diff changeset
    39
          List("--host=i686-w32-mingw32", "CPPFLAGS=-I/mingw32/include", "--disable-windows-gui"),
64494
979520c83f30 proper CONFIG_SITE for msys;
wenzelm
parents: 64493
diff changeset
    40
        setup =
979520c83f30 proper CONFIG_SITE for msys;
wenzelm
parents: 64493
diff changeset
    41
          """PATH=/usr/bin:/bin:/mingw32/bin
979520c83f30 proper CONFIG_SITE for msys;
wenzelm
parents: 64493
diff changeset
    42
            export CONFIG_SITE=/etc/config.site""",
64483
bba1d341bdf6 build_polyml in Scala;
wenzelm
parents:
diff changeset
    43
        copy_files =
bba1d341bdf6 build_polyml in Scala;
wenzelm
parents:
diff changeset
    44
          List("/mingw32/bin/libgcc_s_dw2-1.dll",
bba1d341bdf6 build_polyml in Scala;
wenzelm
parents:
diff changeset
    45
            "/mingw32/bin/libgmp-10.dll",
bba1d341bdf6 build_polyml in Scala;
wenzelm
parents:
diff changeset
    46
            "/mingw32/bin/libstdc++-6.dll")),
bba1d341bdf6 build_polyml in Scala;
wenzelm
parents:
diff changeset
    47
    "x86_64-windows" ->
bba1d341bdf6 build_polyml in Scala;
wenzelm
parents:
diff changeset
    48
      Platform_Info(
bba1d341bdf6 build_polyml in Scala;
wenzelm
parents:
diff changeset
    49
        options =
64484
784e28e4dc57 proper options;
wenzelm
parents: 64483
diff changeset
    50
          List("--host=x86_64-w64-mingw32", "CPPFLAGS=-I/mingw64/include", "--disable-windows-gui"),
64494
979520c83f30 proper CONFIG_SITE for msys;
wenzelm
parents: 64493
diff changeset
    51
        setup =
979520c83f30 proper CONFIG_SITE for msys;
wenzelm
parents: 64493
diff changeset
    52
          """PATH=/usr/bin:/bin:/mingw64/bin
979520c83f30 proper CONFIG_SITE for msys;
wenzelm
parents: 64493
diff changeset
    53
            export CONFIG_SITE=/etc/config.site""",
64483
bba1d341bdf6 build_polyml in Scala;
wenzelm
parents:
diff changeset
    54
        copy_files =
bba1d341bdf6 build_polyml in Scala;
wenzelm
parents:
diff changeset
    55
          List("/mingw64/bin/libgcc_s_seh-1.dll",
bba1d341bdf6 build_polyml in Scala;
wenzelm
parents:
diff changeset
    56
            "/mingw64/bin/libgmp-10.dll",
bba1d341bdf6 build_polyml in Scala;
wenzelm
parents:
diff changeset
    57
            "/mingw64/bin/libstdc++-6.dll")))
bba1d341bdf6 build_polyml in Scala;
wenzelm
parents:
diff changeset
    58
bba1d341bdf6 build_polyml in Scala;
wenzelm
parents:
diff changeset
    59
  def build_polyml(
64489
db1bc2732554 clarified command-line;
wenzelm
parents: 64488
diff changeset
    60
    root: Path,
64495
754e1b4634c3 build sha1 library;
wenzelm
parents: 64494
diff changeset
    61
    sha1_root: Option[Path] = None,
64483
bba1d341bdf6 build_polyml in Scala;
wenzelm
parents:
diff changeset
    62
    progress: Progress = Ignore_Progress,
64493
a2eebcc8bb69 clarified platform selection;
wenzelm
parents: 64492
diff changeset
    63
    arch_64: Boolean = false,
64485
e996c0a5eca9 support other bash executable (notably for msys on Windows);
wenzelm
parents: 64484
diff changeset
    64
    options: List[String] = Nil,
e996c0a5eca9 support other bash executable (notably for msys on Windows);
wenzelm
parents: 64484
diff changeset
    65
    other_bash: String = "")
64483
bba1d341bdf6 build_polyml in Scala;
wenzelm
parents:
diff changeset
    66
  {
64489
db1bc2732554 clarified command-line;
wenzelm
parents: 64488
diff changeset
    67
    if (!((root + Path.explode("configure")).is_file && (root + Path.explode("PolyML")).is_dir))
db1bc2732554 clarified command-line;
wenzelm
parents: 64488
diff changeset
    68
      error("Bad Poly/ML root directory: " + root)
64483
bba1d341bdf6 build_polyml in Scala;
wenzelm
parents:
diff changeset
    69
64493
a2eebcc8bb69 clarified platform selection;
wenzelm
parents: 64492
diff changeset
    70
    val platform =
a2eebcc8bb69 clarified platform selection;
wenzelm
parents: 64492
diff changeset
    71
      (if (arch_64) "x86_64" else "x86") +
a2eebcc8bb69 clarified platform selection;
wenzelm
parents: 64492
diff changeset
    72
      (if (Platform.is_windows) "-windows" else if (Platform.is_macos) "-darwin" else "-linux")
a2eebcc8bb69 clarified platform selection;
wenzelm
parents: 64492
diff changeset
    73
64483
bba1d341bdf6 build_polyml in Scala;
wenzelm
parents:
diff changeset
    74
    val info =
bba1d341bdf6 build_polyml in Scala;
wenzelm
parents:
diff changeset
    75
      platform_info.get(platform) getOrElse
bba1d341bdf6 build_polyml in Scala;
wenzelm
parents:
diff changeset
    76
        error("Bad platform identifier: " + quote(platform))
bba1d341bdf6 build_polyml in Scala;
wenzelm
parents:
diff changeset
    77
64493
a2eebcc8bb69 clarified platform selection;
wenzelm
parents: 64492
diff changeset
    78
    if (Platform.is_windows && other_bash == "")
64492
98215fa4f8d1 more robust Windows platform;
wenzelm
parents: 64491
diff changeset
    79
      error("Windows requires other bash (for msys)")
98215fa4f8d1 more robust Windows platform;
wenzelm
parents: 64491
diff changeset
    80
64491
6a1a1bbfcb93 copy libgmp on Linux;
wenzelm
parents: 64490
diff changeset
    81
64495
754e1b4634c3 build sha1 library;
wenzelm
parents: 64494
diff changeset
    82
    /* bash */
754e1b4634c3 build sha1 library;
wenzelm
parents: 64494
diff changeset
    83
754e1b4634c3 build sha1 library;
wenzelm
parents: 64494
diff changeset
    84
    def bash(cwd: Path, script: String, echo: Boolean = false): Process_Result =
754e1b4634c3 build sha1 library;
wenzelm
parents: 64494
diff changeset
    85
      progress.bash(
754e1b4634c3 build sha1 library;
wenzelm
parents: 64494
diff changeset
    86
        if (other_bash == "") script else Bash.string(other_bash) + " -c " + Bash.string(script),
754e1b4634c3 build sha1 library;
wenzelm
parents: 64494
diff changeset
    87
        cwd = cwd.file, env = null, echo = echo)
754e1b4634c3 build sha1 library;
wenzelm
parents: 64494
diff changeset
    88
754e1b4634c3 build sha1 library;
wenzelm
parents: 64494
diff changeset
    89
64491
6a1a1bbfcb93 copy libgmp on Linux;
wenzelm
parents: 64490
diff changeset
    90
    /* configure and make */
6a1a1bbfcb93 copy libgmp on Linux;
wenzelm
parents: 64490
diff changeset
    91
64483
bba1d341bdf6 build_polyml in Scala;
wenzelm
parents:
diff changeset
    92
    val configure_options =
64493
a2eebcc8bb69 clarified platform selection;
wenzelm
parents: 64492
diff changeset
    93
      (if (!arch_64 && Isabelle_System.getenv("ISABELLE_PLATFORM64") == "x86_64-linux")
a2eebcc8bb69 clarified platform selection;
wenzelm
parents: 64492
diff changeset
    94
        info.options_multilib
a2eebcc8bb69 clarified platform selection;
wenzelm
parents: 64492
diff changeset
    95
       else info.options) ::: List("--enable-intinf-as-int") ::: options
64483
bba1d341bdf6 build_polyml in Scala;
wenzelm
parents:
diff changeset
    96
64495
754e1b4634c3 build sha1 library;
wenzelm
parents: 64494
diff changeset
    97
    bash(root,
64487
b843bcdd40f0 more precise environment (for Windows);
wenzelm
parents: 64486
diff changeset
    98
      info.setup + "\n" +
64485
e996c0a5eca9 support other bash executable (notably for msys on Windows);
wenzelm
parents: 64484
diff changeset
    99
      """
e996c0a5eca9 support other bash executable (notably for msys on Windows);
wenzelm
parents: 64484
diff changeset
   100
        [ -f Makefile ] && make distclean
e996c0a5eca9 support other bash executable (notably for msys on Windows);
wenzelm
parents: 64484
diff changeset
   101
        {
e996c0a5eca9 support other bash executable (notably for msys on Windows);
wenzelm
parents: 64484
diff changeset
   102
          ./configure --prefix="$PWD/target" """ + Bash.strings(configure_options) + """
e996c0a5eca9 support other bash executable (notably for msys on Windows);
wenzelm
parents: 64484
diff changeset
   103
          rm -rf target
e996c0a5eca9 support other bash executable (notably for msys on Windows);
wenzelm
parents: 64484
diff changeset
   104
          make compiler && make compiler && make install
e996c0a5eca9 support other bash executable (notably for msys on Windows);
wenzelm
parents: 64484
diff changeset
   105
        } || { echo "Build failed" >&2; exit 2; }
64495
754e1b4634c3 build sha1 library;
wenzelm
parents: 64494
diff changeset
   106
      """, echo = true).check
64485
e996c0a5eca9 support other bash executable (notably for msys on Windows);
wenzelm
parents: 64484
diff changeset
   107
64495
754e1b4634c3 build sha1 library;
wenzelm
parents: 64494
diff changeset
   108
    val ldd_files =
64493
a2eebcc8bb69 clarified platform selection;
wenzelm
parents: 64492
diff changeset
   109
      if (Platform.is_linux) {
64495
754e1b4634c3 build sha1 library;
wenzelm
parents: 64494
diff changeset
   110
        val libs = bash(root, "ldd target/bin/poly").check.out_lines
64491
6a1a1bbfcb93 copy libgmp on Linux;
wenzelm
parents: 64490
diff changeset
   111
        val Pattern = """\s*libgmp.*=>\s*(\S+).*""".r
6a1a1bbfcb93 copy libgmp on Linux;
wenzelm
parents: 64490
diff changeset
   112
        for (Pattern(lib) <- libs) yield lib
6a1a1bbfcb93 copy libgmp on Linux;
wenzelm
parents: 64490
diff changeset
   113
      }
6a1a1bbfcb93 copy libgmp on Linux;
wenzelm
parents: 64490
diff changeset
   114
      else Nil
6a1a1bbfcb93 copy libgmp on Linux;
wenzelm
parents: 64490
diff changeset
   115
6a1a1bbfcb93 copy libgmp on Linux;
wenzelm
parents: 64490
diff changeset
   116
64495
754e1b4634c3 build sha1 library;
wenzelm
parents: 64494
diff changeset
   117
    /* sha1 library */
754e1b4634c3 build sha1 library;
wenzelm
parents: 64494
diff changeset
   118
754e1b4634c3 build sha1 library;
wenzelm
parents: 64494
diff changeset
   119
    val sha1_files =
754e1b4634c3 build sha1 library;
wenzelm
parents: 64494
diff changeset
   120
      if (sha1_root.isDefined) {
754e1b4634c3 build sha1 library;
wenzelm
parents: 64494
diff changeset
   121
        val dir1 = sha1_root.get
754e1b4634c3 build sha1 library;
wenzelm
parents: 64494
diff changeset
   122
        bash(dir1, "./build " + platform, echo = true).check
754e1b4634c3 build sha1 library;
wenzelm
parents: 64494
diff changeset
   123
        val dir2 = dir1 + Path.explode(platform)
754e1b4634c3 build sha1 library;
wenzelm
parents: 64494
diff changeset
   124
        File.read_dir(dir2).map(entry => dir2.implode + "/" + entry)
754e1b4634c3 build sha1 library;
wenzelm
parents: 64494
diff changeset
   125
      }
754e1b4634c3 build sha1 library;
wenzelm
parents: 64494
diff changeset
   126
      else Nil
754e1b4634c3 build sha1 library;
wenzelm
parents: 64494
diff changeset
   127
754e1b4634c3 build sha1 library;
wenzelm
parents: 64494
diff changeset
   128
64491
6a1a1bbfcb93 copy libgmp on Linux;
wenzelm
parents: 64490
diff changeset
   129
    /* target */
64484
784e28e4dc57 proper options;
wenzelm
parents: 64483
diff changeset
   130
784e28e4dc57 proper options;
wenzelm
parents: 64483
diff changeset
   131
    val target = Path.explode(platform)
64488
bc77e19aad44 no backup of generated stuff;
wenzelm
parents: 64487
diff changeset
   132
    Isabelle_System.rm_tree(target)
64483
bba1d341bdf6 build_polyml in Scala;
wenzelm
parents:
diff changeset
   133
    Isabelle_System.mkdirs(target)
bba1d341bdf6 build_polyml in Scala;
wenzelm
parents:
diff changeset
   134
bba1d341bdf6 build_polyml in Scala;
wenzelm
parents:
diff changeset
   135
    for {
64484
784e28e4dc57 proper options;
wenzelm
parents: 64483
diff changeset
   136
      d <- List("target/bin", "target/lib")
64489
db1bc2732554 clarified command-line;
wenzelm
parents: 64488
diff changeset
   137
      dir = root + Path.explode(d)
64483
bba1d341bdf6 build_polyml in Scala;
wenzelm
parents:
diff changeset
   138
      entry <- File.read_dir(dir)
bba1d341bdf6 build_polyml in Scala;
wenzelm
parents:
diff changeset
   139
    } File.move(dir + Path.explode(entry), target)
bba1d341bdf6 build_polyml in Scala;
wenzelm
parents:
diff changeset
   140
64495
754e1b4634c3 build sha1 library;
wenzelm
parents: 64494
diff changeset
   141
    for (file <- "~~/Admin/polyml/polyi" :: info.copy_files ::: ldd_files ::: sha1_files)
64483
bba1d341bdf6 build_polyml in Scala;
wenzelm
parents:
diff changeset
   142
      File.copy(Path.explode(file), target)
bba1d341bdf6 build_polyml in Scala;
wenzelm
parents:
diff changeset
   143
  }
bba1d341bdf6 build_polyml in Scala;
wenzelm
parents:
diff changeset
   144
bba1d341bdf6 build_polyml in Scala;
wenzelm
parents:
diff changeset
   145
64490
abc34a149690 prefer raw Admin tool, without Isabelle settings environment;
wenzelm
parents: 64489
diff changeset
   146
  /** command line entry point **/
64483
bba1d341bdf6 build_polyml in Scala;
wenzelm
parents:
diff changeset
   147
64490
abc34a149690 prefer raw Admin tool, without Isabelle settings environment;
wenzelm
parents: 64489
diff changeset
   148
  def main(args: Array[String])
abc34a149690 prefer raw Admin tool, without Isabelle settings environment;
wenzelm
parents: 64489
diff changeset
   149
  {
abc34a149690 prefer raw Admin tool, without Isabelle settings environment;
wenzelm
parents: 64489
diff changeset
   150
    Command_Line.tool0 {
abc34a149690 prefer raw Admin tool, without Isabelle settings environment;
wenzelm
parents: 64489
diff changeset
   151
      var other_bash = ""
64493
a2eebcc8bb69 clarified platform selection;
wenzelm
parents: 64492
diff changeset
   152
      var arch_64 = false
64495
754e1b4634c3 build sha1 library;
wenzelm
parents: 64494
diff changeset
   153
      var sha1_root: Option[Path] = None
64483
bba1d341bdf6 build_polyml in Scala;
wenzelm
parents:
diff changeset
   154
64490
abc34a149690 prefer raw Admin tool, without Isabelle settings environment;
wenzelm
parents: 64489
diff changeset
   155
      val getopts = Getopts("""
64489
db1bc2732554 clarified command-line;
wenzelm
parents: 64488
diff changeset
   156
Usage: isabelle build_polyml [OPTIONS] ROOT [CONFIGURE_OPTIONS]
64483
bba1d341bdf6 build_polyml in Scala;
wenzelm
parents:
diff changeset
   157
bba1d341bdf6 build_polyml in Scala;
wenzelm
parents:
diff changeset
   158
  Options are:
64485
e996c0a5eca9 support other bash executable (notably for msys on Windows);
wenzelm
parents: 64484
diff changeset
   159
    -b EXE       other bash executable (notably for msys on Windows)
64493
a2eebcc8bb69 clarified platform selection;
wenzelm
parents: 64492
diff changeset
   160
    -m ARCH      processor architecture (32=x86, 64=x86_64, default: x86)
64495
754e1b4634c3 build sha1 library;
wenzelm
parents: 64494
diff changeset
   161
    -s DIR       root directory for sha1 library
64483
bba1d341bdf6 build_polyml in Scala;
wenzelm
parents:
diff changeset
   162
64489
db1bc2732554 clarified command-line;
wenzelm
parents: 64488
diff changeset
   163
  Build Poly/ML in its source ROOT directory of its sources, with additional
db1bc2732554 clarified command-line;
wenzelm
parents: 64488
diff changeset
   164
  CONFIGURE_OPTIONS (e.g. --with-gmp).
64483
bba1d341bdf6 build_polyml in Scala;
wenzelm
parents:
diff changeset
   165
""",
64490
abc34a149690 prefer raw Admin tool, without Isabelle settings environment;
wenzelm
parents: 64489
diff changeset
   166
        "b:" -> (arg => other_bash = arg),
64493
a2eebcc8bb69 clarified platform selection;
wenzelm
parents: 64492
diff changeset
   167
        "m:" ->
a2eebcc8bb69 clarified platform selection;
wenzelm
parents: 64492
diff changeset
   168
          {
a2eebcc8bb69 clarified platform selection;
wenzelm
parents: 64492
diff changeset
   169
            case "32" | "x86" => arch_64 = false
a2eebcc8bb69 clarified platform selection;
wenzelm
parents: 64492
diff changeset
   170
            case "64" | "x86_64" => arch_64 = true
a2eebcc8bb69 clarified platform selection;
wenzelm
parents: 64492
diff changeset
   171
            case bad => error("Bad processor architecture: " + quote(bad))
64495
754e1b4634c3 build sha1 library;
wenzelm
parents: 64494
diff changeset
   172
          },
754e1b4634c3 build sha1 library;
wenzelm
parents: 64494
diff changeset
   173
        "s:" -> (arg => sha1_root = Some(Path.explode(arg))))
64483
bba1d341bdf6 build_polyml in Scala;
wenzelm
parents:
diff changeset
   174
64490
abc34a149690 prefer raw Admin tool, without Isabelle settings environment;
wenzelm
parents: 64489
diff changeset
   175
      val more_args = getopts(args)
abc34a149690 prefer raw Admin tool, without Isabelle settings environment;
wenzelm
parents: 64489
diff changeset
   176
      val (root, options) =
abc34a149690 prefer raw Admin tool, without Isabelle settings environment;
wenzelm
parents: 64489
diff changeset
   177
        more_args match {
abc34a149690 prefer raw Admin tool, without Isabelle settings environment;
wenzelm
parents: 64489
diff changeset
   178
          case root :: options => (Path.explode(root), options)
abc34a149690 prefer raw Admin tool, without Isabelle settings environment;
wenzelm
parents: 64489
diff changeset
   179
          case Nil => getopts.usage()
abc34a149690 prefer raw Admin tool, without Isabelle settings environment;
wenzelm
parents: 64489
diff changeset
   180
        }
64495
754e1b4634c3 build sha1 library;
wenzelm
parents: 64494
diff changeset
   181
      build_polyml(root, sha1_root = sha1_root, progress = new Console_Progress,
754e1b4634c3 build sha1 library;
wenzelm
parents: 64494
diff changeset
   182
        arch_64 = arch_64, options = options, other_bash = other_bash)
64490
abc34a149690 prefer raw Admin tool, without Isabelle settings environment;
wenzelm
parents: 64489
diff changeset
   183
    }
abc34a149690 prefer raw Admin tool, without Isabelle settings environment;
wenzelm
parents: 64489
diff changeset
   184
  }
64483
bba1d341bdf6 build_polyml in Scala;
wenzelm
parents:
diff changeset
   185
}