-
Notifications
You must be signed in to change notification settings - Fork 0
/
make.py
34 lines (31 loc) · 1.23 KB
/
make.py
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
#!/usr/bin/env python3
import sys, subprocess, os
arg = sys.argv[1]
if(arg == "install"):
print("###### Installing sdsl-lite...")
os.chdir("external/sdsl-lite")
subprocess.call("mkdir install_dir".split())
subprocess.call("./install.sh install_dir".split())
os.chdir("../../")
print("###### Installing finite-automata-partition-refinement...")
os.chdir("external/finite-automata-partition-refinement")
subprocess.call("mkdir build".split())
os.chdir("build")
subprocess.call("cmake ..".split())
subprocess.call("make".split())
os.chdir("../../../")
print("###### Installing Wheeler-Automaton-LCS...")
subprocess.call("mkdir build".split())
os.chdir("build")
subprocess.call("cmake ..".split())
subprocess.call("make".split())
if(arg == "clean"):
print("###### Cleaning sdsl-lite install...")
subprocess.call("rm -r external/sdsl-lite/install_dir".split())
print("###### Cleaning finite-automata-partition-refinement install...")
subprocess.call("rm -r external/finite-automata-partition-refinement/build".split())
print("###### Cleaning Wheeler-Automaton-LCS install...")
subprocess.call("rm -r build".split())
if(arg == "update"):
print("###### Updating Wheeler-Automaton-LCS install...")
subprocess.call("make -C build".split())