-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild
executable file
·52 lines (38 loc) · 1.34 KB
/
build
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
#!/usr/bin/env python3
import os
import subprocess
import sys
# Bootstrapping
# =============
subprocess.check_call(['git', 'submodule', 'update', '--init', '--recursive'])
extdir = 'ext'
sys.path.append(os.path.join(os.path.dirname(__file__), extdir))
from buildtools import KHPProject, KHPDefinition
# Build
# =====
proj = KHPProject(extdir = extdir)
def build_khp(backend, alias, tangle_selector = '', flags = ''):
return proj.definition( alias = alias
, backend = backend
, main = 'khp.md'
, other = ['khp-real.md', 'wolframlanguage.md']
, flags = '--syntax-module KHP-SYNTAX ' + flags
, runner_script = './khp'
, tangle_selector = '.k,' + tangle_selector
)
khp_defn = build_khp(backend = 'llvm'
, alias = 'execution'
, flags = '-ccopt -g -O3'
)
# Testing
# =======
khp_defn.synthesis( glob = 't/constraint-synthesis/*.khp'
, alias = 'synthesis-tests'
)
khp_defn.tests( glob = 't/execution/*.khp'
, alias = 'execution-tests'
, flags = '-cMODE=\"#regular\"'
)
# Main
# ====
proj.main()