forked from pmetras/nim0
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.nims
59 lines (43 loc) · 1.54 KB
/
config.nims
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
#
# NimScript build file for Nim0
#
const
url = " --docSeeSrcUrl:http://gitlab.com/pmetras/nim0/"
# Switches
when not defined(release):
switch("verbosity", "1")
switch("hints", "on")
switch("debugger", "native")
when defined(release):
switch("d", "release")
switch("verbosity", "0")
switch("hints", "off")
#
# Tasks
#
task build, "Build Nim0 compiler environment":
exec "nim c -o:nim0 src/nim0.nim"
task buildExamples, "Build all Nim0 examples":
exec "./nim0 comp examples/Hello"
exec "./nim0 comp examples/Factorial"
exec "./nim0 comp examples/MagicSquares"
exec "./nim0 comp examples/Maths"
exec "./nim0 comp examples/PrimeNumbers"
exec "./nim0 comp examples/Sudoku"
task buildDoc, "Build Nim0 documentation":
exec "nim doc --outdir:doc" & url & " src/nim0.nim"
exec "nim doc --outdir:doc" & url & " src/OSS.nim"
exec "nim doc --outdir:doc" & url & " src/OSP.nim"
exec "nim doc --outdir:doc" & url & " src/OSG.nim"
exec "nim doc --outdir:doc" & url & " src/RISC.nim"
task buildSite, "Build Nim0 Gitlab page site files":
# Process the README.md document and apply Lua filter to translate relative URLs
# to absolute ones.
exec "cp misc/html/mvp.css doc/mvp.css"
exec "cp misc/html/Nim0.png doc/Nim0.png"
exec "pandoc --standalone --lua-filter misc/html/abs_url.lua --from markdown --to html5 --output doc/index.html --css mvp.css --template misc/html/template.html --toc --toc-depth=2 README.md"
task buildAll, "Build all Nim0 project":
buildTask()
buildExamplesTask()
buildDocTask()
buildSiteTask()