author | nipkow |
Tue, 17 Jun 2025 06:29:55 +0200 | |
changeset 82732 | 71574900b6ba |
parent 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 |
|
82065
f178475f274d
update to mlton-20241230-1 using recent builds from https://sourceforge.net/projects/mlton;
wenzelm
parents:
79961
diff
changeset
|
16 |
sealed case class Download_Platform(platform_name: String, download_name: String) |
79951
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
17 |
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
18 |
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
|
19 |
List( |
82065
f178475f274d
update to mlton-20241230-1 using recent builds from https://sourceforge.net/projects/mlton;
wenzelm
parents:
79961
diff
changeset
|
20 |
Download_Platform("arm64-darwin", "arm64-darwin.macos-14_gmp-static.tgz"), |
f178475f274d
update to mlton-20241230-1 using recent builds from https://sourceforge.net/projects/mlton;
wenzelm
parents:
79961
diff
changeset
|
21 |
Download_Platform("x86_64-darwin", "amd64-darwin.macos-13_gmp-static.tgz"), |
f178475f274d
update to mlton-20241230-1 using recent builds from https://sourceforge.net/projects/mlton;
wenzelm
parents:
79961
diff
changeset
|
22 |
Download_Platform("x86_64-linux", "amd64-linux.ubuntu-20.04_static.tgz")) |
79951
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
23 |
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
24 |
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
25 |
/* build mlton */ |
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
26 |
|
82065
f178475f274d
update to mlton-20241230-1 using recent builds from https://sourceforge.net/projects/mlton;
wenzelm
parents:
79961
diff
changeset
|
27 |
val default_url = "https://master.dl.sourceforge.net/project/mlton/mlton" |
f178475f274d
update to mlton-20241230-1 using recent builds from https://sourceforge.net/projects/mlton;
wenzelm
parents:
79961
diff
changeset
|
28 |
val default_url_suffix = "?viasf=1" |
f178475f274d
update to mlton-20241230-1 using recent builds from https://sourceforge.net/projects/mlton;
wenzelm
parents:
79961
diff
changeset
|
29 |
val default_version = "20241230" |
f178475f274d
update to mlton-20241230-1 using recent builds from https://sourceforge.net/projects/mlton;
wenzelm
parents:
79961
diff
changeset
|
30 |
val default_variant = "mlton-20241230-1" |
79951
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, |
82065
f178475f274d
update to mlton-20241230-1 using recent builds from https://sourceforge.net/projects/mlton;
wenzelm
parents:
79961
diff
changeset
|
34 |
base_url_suffix: String = default_url_suffix, |
79951
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
35 |
version: String = default_version, |
82065
f178475f274d
update to mlton-20241230-1 using recent builds from https://sourceforge.net/projects/mlton;
wenzelm
parents:
79961
diff
changeset
|
36 |
variant: String = default_variant, |
79951
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
37 |
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
|
38 |
progress: Progress = new Progress |
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
39 |
): Unit = { |
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
40 |
val component_dir = |
82065
f178475f274d
update to mlton-20241230-1 using recent builds from https://sourceforge.net/projects/mlton;
wenzelm
parents:
79961
diff
changeset
|
41 |
Components.Directory(target_dir + Path.basic(variant)).create(progress = progress) |
79951
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
42 |
|
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 |
/* download executables */ |
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
45 |
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
46 |
for (platform <- platforms) { |
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
47 |
Isabelle_System.with_tmp_dir("download") { download_dir => |
82065
f178475f274d
update to mlton-20241230-1 using recent builds from https://sourceforge.net/projects/mlton;
wenzelm
parents:
79961
diff
changeset
|
48 |
val archive_name = platform.download_name |
79951
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
49 |
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
|
50 |
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
51 |
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
|
52 |
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
|
53 |
|
82065
f178475f274d
update to mlton-20241230-1 using recent builds from https://sourceforge.net/projects/mlton;
wenzelm
parents:
79961
diff
changeset
|
54 |
val url = |
f178475f274d
update to mlton-20241230-1 using recent builds from https://sourceforge.net/projects/mlton;
wenzelm
parents:
79961
diff
changeset
|
55 |
Url.append_path(base_url, version) + "/" + variant + "." + archive_name + base_url_suffix |
f178475f274d
update to mlton-20241230-1 using recent builds from https://sourceforge.net/projects/mlton;
wenzelm
parents:
79961
diff
changeset
|
56 |
Isabelle_System.download_file(url, archive_path, progress = progress) |
79951
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(""" |
82065
f178475f274d
update to mlton-20241230-1 using recent builds from https://sourceforge.net/projects/mlton;
wenzelm
parents:
79961
diff
changeset
|
66 |
ISABELLE_MLTON_HOME="$COMPONENT" |
f178475f274d
update to mlton-20241230-1 using recent builds from https://sourceforge.net/projects/mlton;
wenzelm
parents:
79961
diff
changeset
|
67 |
|
f178475f274d
update to mlton-20241230-1 using recent builds from https://sourceforge.net/projects/mlton;
wenzelm
parents:
79961
diff
changeset
|
68 |
if [ -d "$ISABELLE_MLTON_HOME/${ISABELLE_APPLE_PLATFORM64:-$ISABELLE_PLATFORM64}" ]; then |
f178475f274d
update to mlton-20241230-1 using recent builds from https://sourceforge.net/projects/mlton;
wenzelm
parents:
79961
diff
changeset
|
69 |
ISABELLE_MLTON="$ISABELLE_MLTON_HOME/${ISABELLE_APPLE_PLATFORM64:-$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
|
70 |
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
|
71 |
linux*) |
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
72 |
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
|
73 |
;; |
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 |
ISABELLE_MLTON_OPTIONS="" |
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
76 |
;; |
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
77 |
esac |
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
78 |
fi |
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 |
|
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 |
/* README */ |
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
83 |
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
84 |
File.write(component_dir.README, |
82065
f178475f274d
update to mlton-20241230-1 using recent builds from https://sourceforge.net/projects/mlton;
wenzelm
parents:
79961
diff
changeset
|
85 |
"""This is the MLton SML compiler from |
f178475f274d
update to mlton-20241230-1 using recent builds from https://sourceforge.net/projects/mlton;
wenzelm
parents:
79961
diff
changeset
|
86 |
https://sourceforge.net/projects/mlton using following downloads:""" + |
f178475f274d
update to mlton-20241230-1 using recent builds from https://sourceforge.net/projects/mlton;
wenzelm
parents:
79961
diff
changeset
|
87 |
platforms.map(_.download_name).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
|
88 |
"""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
|
89 |
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
90 |
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
91 |
Makarius |
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
92 |
""" + 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
|
93 |
} |
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
94 |
|
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 |
/* Isabelle tool wrapper */ |
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
97 |
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
98 |
val isabelle_tool = |
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
99 |
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
|
100 |
{ args => |
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
101 |
var target_dir = Path.current |
82065
f178475f274d
update to mlton-20241230-1 using recent builds from https://sourceforge.net/projects/mlton;
wenzelm
parents:
79961
diff
changeset
|
102 |
var base_url_suffix = default_url_suffix |
79951
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
103 |
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
|
104 |
var version = default_version |
82065
f178475f274d
update to mlton-20241230-1 using recent builds from https://sourceforge.net/projects/mlton;
wenzelm
parents:
79961
diff
changeset
|
105 |
var variant = default_variant |
79951
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
106 |
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
107 |
val getopts = Getopts(""" |
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
108 |
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
|
109 |
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
110 |
Options are: |
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
111 |
-D DIR target directory (default ".") |
82065
f178475f274d
update to mlton-20241230-1 using recent builds from https://sourceforge.net/projects/mlton;
wenzelm
parents:
79961
diff
changeset
|
112 |
-S SUFFIX download URL suffix (default: """" + default_url_suffix + """") |
79951
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
113 |
-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
|
114 |
-V VERSION version (default: """" + default_version + """") |
82065
f178475f274d
update to mlton-20241230-1 using recent builds from https://sourceforge.net/projects/mlton;
wenzelm
parents:
79961
diff
changeset
|
115 |
-W VARIANT variant (default: """" + default_variant + """") |
79951
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 |
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
|
118 |
""", |
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
119 |
"D:" -> (arg => target_dir = Path.explode(arg)), |
82065
f178475f274d
update to mlton-20241230-1 using recent builds from https://sourceforge.net/projects/mlton;
wenzelm
parents:
79961
diff
changeset
|
120 |
"S:" -> (arg => base_url_suffix = arg), |
79951
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
121 |
"U:" -> (arg => base_url = arg), |
82065
f178475f274d
update to mlton-20241230-1 using recent builds from https://sourceforge.net/projects/mlton;
wenzelm
parents:
79961
diff
changeset
|
122 |
"V:" -> (arg => version = arg), |
f178475f274d
update to mlton-20241230-1 using recent builds from https://sourceforge.net/projects/mlton;
wenzelm
parents:
79961
diff
changeset
|
123 |
"W:" -> (arg => variant = arg)) |
79951
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 |
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
|
126 |
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
|
127 |
|
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
128 |
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
|
129 |
|
82065
f178475f274d
update to mlton-20241230-1 using recent builds from https://sourceforge.net/projects/mlton;
wenzelm
parents:
79961
diff
changeset
|
130 |
build_mlton(base_url = base_url, base_url_suffix = base_url_suffix, version = version, |
f178475f274d
update to mlton-20241230-1 using recent builds from https://sourceforge.net/projects/mlton;
wenzelm
parents:
79961
diff
changeset
|
131 |
variant = variant, target_dir = target_dir, progress = progress) |
79951
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
132 |
}) |
84f2d481d6d7
update to mlton-20210117-2, which covers x86_64-linux, x86_64-darwin, arm64-darwin;
wenzelm
parents:
diff
changeset
|
133 |
} |