forked from makerbot/s3g
-
Notifications
You must be signed in to change notification settings - Fork 1
/
SConstruct
39 lines (29 loc) · 952 Bytes
/
SConstruct
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
# vim:ai:et:ff=unix:fileencoding=utf-8:sw=4:syntax=python:ts=4:
#
# Top-level SConstruct file for s3g.
#
import os,sys
AddOption('--test', action='store_true', dest='test')
run_test = GetOption('test')
#not used, added for consistency
AddOption('--debug_build', action='store_true', dest='debug_build')
debug = GetOption('debug_build')
env = Environment(ENV = os.environ)
if 'win32' == sys.platform:
vcmd=env.Command('virtualenv', 'setup.bat', 'setup.bat')
else:
vcmd=env.Command('virtualenv', 'setup.sh', './setup.sh')
env.Clean(vcmd,'virtualenv')
if run_test:
if 'win32' == sys.platform:
env.Command('test', 'test.bat', 'test.bat')
else:
env.Command('test', 'test.sh', 'test.sh')
path_to_avrdude = os.path.join(
'makerbot_driver',
'Firmware',
'avrdude',
)
env.Command(path_to_avrdude, vcmd, 'python copy_avrdude.py')
#if run_test:
# env.Command('test', 'unit_tests.py', 'python unit_tests.py')