diff options
author | kennyballou <kballou@onyx.boisestate.edu> | 2013-01-24 13:50:49 -0700 |
---|---|---|
committer | kennyballou <kballou@onyx.boisestate.edu> | 2013-01-24 13:50:49 -0700 |
commit | 85613c0e7ea1280296ae15edd7ad7932a2f05f00 (patch) | |
tree | 00b0cf6f2afb92781db07542df935d1bd611b4f8 /xnt | |
parent | 4f7f27b6d54ed46db633ee6f652d93ca4ee2aabc (diff) | |
download | xnt-85613c0e7ea1280296ae15edd7ad7932a2f05f00.tar.gz xnt-85613c0e7ea1280296ae15edd7ad7932a2f05f00.tar.xz |
Add optional flags to make and (N)ant
Diffstat (limited to 'xnt')
-rw-r--r-- | xnt/build/make.py | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/xnt/build/make.py b/xnt/build/make.py index a9339a4..80fcf1b 100644 --- a/xnt/build/make.py +++ b/xnt/build/make.py @@ -21,18 +21,24 @@ import subprocess import logging -def ant(path="", target=""): - cmd = ["ant", target] +def ant(path="", target="",flags=[]): + cmd = __addFlags(["ant", target], flags) return __run_in(path, lambda: subprocess.call(cmd)) -def make(path="", target=""): - cmd = ["make", target] +def make(path="", target="",flags=[]): + cmd = __addFlags(["make", target], flags) return __run_in(path, lambda: subprocess.call(cmd)) -def nant(path="", target=""): - cmd = ["nant", target] +def nant(path="", target="",flags=[]): + cmd = __addFlags(["nant", target], flags) return __run_in(path, lambda: subprocess.call(cmd)) +def __addFlags(cmd, flags): + c = list(cmd) + for f in flags: + c.append(f) + return c + def __run_in(path, f): oldPath = os.path.abspath(os.getcwd()) if path and os.path.exists(path): |