Last active
October 13, 2015 17:08
-
-
Save sjb-gist/4228187 to your computer and use it in GitHub Desktop.
waf: wscript
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# encoding: utf-8 | |
# Copyright © 2012 SjB <[email protected]>. All Rights Reserved. | |
import os | |
from waflib import Options | |
APPNAME = "" | |
VERSION = "0.0.1" | |
top = "." | |
out = "build" | |
waftoolsdir = 'waftools/sjb-waftools/extra' | |
def options(ctx): | |
ctx.load('cs_extra', tooldir=waftoolsdir) | |
ctx.add_option('--debug', '-d', | |
dest='debug', | |
action='store_true', | |
default=False, | |
help='Enable debug build') | |
ctx.add_option('--default-assembly-dir', | |
dest='default_assembly_dir', | |
type='string', | |
default=False, | |
help='Location of local assembly repository') | |
def configure(ctx): | |
ctx.load('cs_extra', tooldir=waftoolsdir) | |
ctx.env.APPNAME = APPNAME | |
if Options.options.debug: | |
ctx.env.append_value('CSFLAGS', '/define:DEBUG') | |
ctx.env.CSDEBUG = 'full' | |
ctx.env.default_assembly_dir = Options.options.default_assembly_dir | |
if not ctx.env.default_assembly_dir: | |
ctx.end.default_assembly_dir = os.environ.get('DEFAULT_ASSEMBLY_DIR', './libs') | |
ctx.env.default_app_install_path = os.path.join('${PREFIX}', 'lib', APPNAME) | |
def build(ctx): | |
ctx.recurse([]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment