forked from OpenSeaMap/depth_webfrontend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwscript
40 lines (25 loc) · 818 Bytes
/
wscript
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
APPNAME = 'OSeaM-depth'
VERSION = '0.1'
top = '.'
out = 'build'
def configure(ctx):
ctx.recurse('src')
env = ctx.env
ctx.setenv('debug', env)
ctx.env.NAME = 'debug'
ctx.env.PREFIX = './debug'
ctx.setenv('release', env)
ctx.env.NAME = 'release'
ctx.env.PREFIX = './release'
def build(ctx):
if not ctx.variant:
ctx.fatal('call "waf build_debug" or "waf build_release", and try "waf --help"')
ctx.recurse('src')
from waflib.Build import BuildContext, CleanContext, \
InstallContext, UninstallContext
for x in 'debug release'.split():
for y in (BuildContext, CleanContext, InstallContext, UninstallContext):
name = y.__name__.replace('Context','').lower()
class tmp(y):
cmd = name + '_' + x
variant = x