-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.pie
More file actions
57 lines (49 loc) · 1.23 KB
/
build.pie
File metadata and controls
57 lines (49 loc) · 1.23 KB
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
(defines
(build-dir "./build")
(build-lib-dir (path build-dir "lib"))
(libpymo-file (path build-lib-dir "libpymo.ykm"))
(libpymo-url
"https://raw.githubusercontent.com/Strrationalism/CPyMO/main/libpymo.ykm"))
(task (download-libpymo)
(out libpymo-file)
(make
(display "Downloading libpymo...")
(ensure-dir build-lib-dir)
(http-download libpymo-file libpymo-url)))
(task (compile-ykm src dst)
(in src)
(in libpymo-file)
(out dst)
(make
(shell
"ykmc"
src
"--target-pymo"
dst
(+ "-L" build-lib-dir))
(display "Compile " src " -> " dst)))
(action rebuild
(clean)
(build))
(define (compile-all-ykms)
(define all-ykms (match-files "." "./src/*.ykm"))
(foreach ykm all-ykms
(define dst (+ "./script/" (filename-no-ext ykm) ".txt"))
(compile-ykm ykm dst)))
(action build
(download-libpymo)
(ensure-dir "./script")
(compile-all-ykms))
(action run
(build)
(shell "cpymo"))
(action clean
(delete
"./build"
"./save"
"./script"))
(export
clean
run
rebuild
build)