| author | paulson <lp15@cam.ac.uk> |
| Sun, 14 Apr 2024 18:39:43 +0100 | |
| changeset 80101 | 2ff4cc7fa70a |
| parent 79961 | 2b9205301ff5 |
| child 82065 | f178475f274d |
| permissions | -rw-r--r-- |
|
79951
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
1 |
/* Title: Pure/Admin/component_mlton.scala |
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
2 |
Author: Makarius |
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
3 |
|
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
4 |
Build Isabelle component for MLton. See also: |
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
5 |
|
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
6 |
- http://mlton.org |
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
7 |
- https://projects.laas.fr/tina/software.php |
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
8 |
*/ |
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
9 |
|
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
10 |
package isabelle |
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
11 |
|
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
12 |
|
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
13 |
object Component_MLton {
|
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
14 |
/* platform information */ |
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
15 |
|
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
16 |
sealed case class Download_Platform(platform_name: String, download_name: String) {
|
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
17 |
def download(base_url: String, version: String): String = |
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
18 |
Url.append_path(base_url, version + "." + download_name) |
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
19 |
} |
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
20 |
|
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
21 |
val platforms: List[Download_Platform] = |
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
22 |
List( |
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
23 |
Download_Platform("x86_64-darwin", "amd64-darwin-16.7-gmp-static.tgz"),
|
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
24 |
Download_Platform("x86_64-linux", "amd64-linux-glibc2.19-gmp-static.tgz"))
|
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
25 |
|
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
26 |
|
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
27 |
/* build mlton */ |
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
28 |
|
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
29 |
val default_url = "https://projects.laas.fr/tina/software" |
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
30 |
val default_version = "mlton-20210117-1" |
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
31 |
|
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
32 |
def build_mlton( |
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
33 |
base_url: String = default_url, |
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
34 |
version: String = default_version, |
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
35 |
target_dir: Path = Path.current, |
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
36 |
progress: Progress = new Progress |
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
37 |
): Unit = {
|
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
38 |
val component_dir = |
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
39 |
Components.Directory(target_dir + Path.basic(version)).create(progress = progress) |
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
40 |
|
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
41 |
|
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
42 |
/* download executables */ |
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
43 |
|
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
44 |
for (platform <- platforms) {
|
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
45 |
Isabelle_System.with_tmp_dir("download") { download_dir =>
|
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
46 |
val download = platform.download(base_url, version) |
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
47 |
|
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
48 |
val archive_name = |
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
49 |
Url.get_base_name(download) getOrElse |
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
50 |
error("Malformed download URL " + quote(download))
|
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
51 |
val archive_path = download_dir + Path.basic(archive_name) |
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
52 |
|
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
53 |
val platform_dir = component_dir.path + Path.explode(platform.platform_name) |
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
54 |
Isabelle_System.make_directory(platform_dir) |
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
55 |
|
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
56 |
Isabelle_System.download_file(download, archive_path, progress = progress) |
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
57 |
Isabelle_System.extract(archive_path, platform_dir, strip = true) |
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
58 |
Isabelle_System.copy_file(platform_dir + Path.basic("LICENSE"), platform_dir.expand.dir)
|
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
59 |
} |
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
60 |
} |
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
61 |
|
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
62 |
|
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
63 |
/* settings */ |
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
64 |
|
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
65 |
component_dir.write_settings("""
|
|
79961
2b9205301ff5
suppress arm64-darwin, which does not support "-codegen native" (required for AFP/PAC_Checker);
wenzelm
parents:
79951
diff
changeset
|
66 |
if [ -d "$COMPONENT/$ISABELLE_PLATFORM64" ]; then |
|
2b9205301ff5
suppress arm64-darwin, which does not support "-codegen native" (required for AFP/PAC_Checker);
wenzelm
parents:
79951
diff
changeset
|
67 |
ISABELLE_MLTON="$COMPONENT/$ISABELLE_PLATFORM64/bin/mlton" |
|
79951
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
68 |
case "$ISABELLE_PLATFORM_FAMILY" in |
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
69 |
linux*) |
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
70 |
ISABELLE_MLTON_OPTIONS="-pi-style npi" |
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
71 |
;; |
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
72 |
*) |
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
73 |
ISABELLE_MLTON_OPTIONS="" |
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
74 |
;; |
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
75 |
esac |
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
76 |
fi |
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
77 |
""") |
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
78 |
|
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
79 |
|
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
80 |
/* README */ |
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
81 |
|
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
82 |
File.write(component_dir.README, |
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
83 |
"""This distribution of MLton has been taken from the TINA project |
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
84 |
https://projects.laas.fr/tina/software.php using following downloads:""" + |
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
85 |
platforms.map(_.download(base_url, version)).mkString("\n\n ", "\n ", "\n\n") +
|
|
79961
2b9205301ff5
suppress arm64-darwin, which does not support "-codegen native" (required for AFP/PAC_Checker);
wenzelm
parents:
79951
diff
changeset
|
86 |
"""Windows and Linux ARM are unsupported. |
|
79951
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
87 |
|
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
88 |
|
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
89 |
Makarius |
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
90 |
""" + Date.Format.date(Date.now()) + "\n") |
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
91 |
} |
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
92 |
|
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
93 |
|
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
94 |
/* Isabelle tool wrapper */ |
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
95 |
|
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
96 |
val isabelle_tool = |
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
97 |
Isabelle_Tool("component_mlton", "build component for MLton", Scala_Project.here,
|
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
98 |
{ args =>
|
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
99 |
var target_dir = Path.current |
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
100 |
var base_url = default_url |
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
101 |
var version = default_version |
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
102 |
|
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
103 |
val getopts = Getopts("""
|
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
104 |
Usage: isabelle component_mlton [OPTIONS] |
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
105 |
|
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
106 |
Options are: |
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
107 |
-D DIR target directory (default ".") |
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
108 |
-U URL download URL (default: """" + default_url + """") |
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
109 |
-V VERSION version (default: """" + default_version + """") |
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
110 |
|
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
111 |
Build component for MLton compiler. |
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
112 |
""", |
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
113 |
"D:" -> (arg => target_dir = Path.explode(arg)), |
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
114 |
"U:" -> (arg => base_url = arg), |
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
115 |
"V:" -> (arg => version = arg)) |
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
116 |
|
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
117 |
val more_args = getopts(args) |
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
118 |
if (more_args.nonEmpty) getopts.usage() |
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
119 |
|
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
120 |
val progress = new Console_Progress() |
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
121 |
|
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
122 |
build_mlton(base_url = base_url, version = version, target_dir = target_dir, |
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
123 |
progress = progress) |
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
124 |
}) |
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
125 |
} |