-
Notifications
You must be signed in to change notification settings - Fork 0
/
dkml-component-ocamlcompiler-common.opam
85 lines (81 loc) · 3.78 KB
/
dkml-component-ocamlcompiler-common.opam
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# This file is generated by dune, edit dune-project instead
opam-version: "2.0"
version: "4.14.2~v2.1.3"
synopsis: "DkML common code for ocamlcompiler"
maintainer: ["[email protected]"]
authors: ["Diskuv, Inc. <[email protected]>"]
license: "Apache-2.0"
homepage: "https://gitlab.com/dkml/components/dkml-component-ocamlcompiler"
doc:
"https://gitlab.com/dkml/components/dkml-component-ocamlcompiler/-/blob/main/README.md"
bug-reports:
"https://gitlab.com/dkml/components/dkml-component-ocamlcompiler/-/issues"
depends: [
"dune" {>= "3.6"}
"dkml-install" {>= "0.2.0"}
"base64" {>= "3.5.0"}
"crunch" {>= "3.3.1"}
"re" {>= "1.10.0"}
"dkml-compiler-src" {>= "2.1.0"}
"dkml-component-staging-ocamlrun" {>= "4.12.1~"}
"dkml-runtime-common" {>= "2.1.2"}
"dkml-runtime-distribution" {>= "2.1.2"}
"alcotest" {>= "1.4.0" & with-test}
"odoc" {with-doc}
]
depopts: ["dkml-option-vcpkg"]
dev-repo:
"git+https://gitlab.com/dkml/components/dkml-component-ocamlcompiler.git"
build: [
# Portable shell scripts for OCaml compiling
#
# ** The only portable shell scripts needed are that that compile the bytecode
# ** interpreter for use in the dkml-component-staging-ocamlrun build:[] section.
# ** Any other logic needed for compiling the full native-code compiler
# ** can be done in OCaml bytecode. But since the portable shell scripts
# ** do 90% of the work needed for the native-code compiler, no strong
# ** reason (yet) to convert the native-code compiler installation into OCaml
# ** bytecode.
#
# Create a minimal DKMLDIR (no dkml-runtime-distribution) that can build
# the r-c-ocaml-* OCaml compiler. Its structure mimics a
# git submodule setup.
#
# <dkmldir>/vendor/drc/
["diskuvbox" "copy-dir" "%{dkml-runtime-common:lib}%/unix" "dkmldir/vendor/drc/unix"]
# <dkmldir>/.dkmlroot
["diskuvbox" "copy-file" "%{dkml-runtime-common:lib}%/template.dkmlroot" "dkmldir/.dkmlroot"]
# <dkmldir>/vendor/dkml-compiler/
["diskuvbox" "copy-dir" "%{dkml-compiler-src:lib}%/src" "dkmldir/vendor/dkml-compiler/src"]
["diskuvbox" "copy-dir" "%{dkml-compiler-src:lib}%/env" "dkmldir/vendor/dkml-compiler/env"]
# Build component
["dune" "subst"] {dev}
[
"dune"
"build"
"-p"
name
"-j"
jobs
"@install"
"@runtest" {with-test}
"@doc" {with-doc}
]
]
install: [
# Copy minimal dkmldir into staging, adding distribution which has
# PowerShell scripts and other Unix scripts needed by setup-userprofile.ps1
# Clone minimal dkmldir
["diskuvbox" "copy-dir" "dkmldir" "%{_:share}%/staging-files/windows_x86/dkmldir"]
["diskuvbox" "copy-dir" "dkmldir" "%{_:share}%/staging-files/windows_x86_64/dkmldir"]
# Unpack runtime-distribution
["diskuvbox" "copy-dir" "%{dkml-runtime-distribution:lib}%/src/none" "%{_:share}%/staging-files/windows_x86/dkmldir/vendor/drd/src/none"]
["diskuvbox" "copy-dir" "%{dkml-runtime-distribution:lib}%/src/none" "%{_:share}%/staging-files/windows_x86_64/dkmldir/vendor/drd/src/none"]
["diskuvbox" "copy-dir" "%{dkml-runtime-distribution:lib}%/src/unix" "%{_:share}%/staging-files/windows_x86/dkmldir/vendor/drd/src/unix"]
["diskuvbox" "copy-dir" "%{dkml-runtime-distribution:lib}%/src/unix" "%{_:share}%/staging-files/windows_x86_64/dkmldir/vendor/drd/src/unix"]
["diskuvbox" "copy-dir" "%{dkml-runtime-distribution:lib}%/src/windows" "%{_:share}%/staging-files/windows_x86/dkmldir/vendor/drd/src/windows"]
["diskuvbox" "copy-dir" "%{dkml-runtime-distribution:lib}%/src/windows" "%{_:share}%/staging-files/windows_x86_64/dkmldir/vendor/drd/src/windows"]
# Copy assets
["diskuvbox" "copy-dir" "assets/staging-files/win32" "%{_:share}%/staging-files/windows_x86"]
["diskuvbox" "copy-dir" "assets/staging-files/win32" "%{_:share}%/staging-files/windows_x86_64"]
]