diff options
author | Ben Noordhuis <info@bnoordhuis.nl> | 2012-01-18 02:02:15 +0400 |
---|---|---|
committer | Ben Noordhuis <info@bnoordhuis.nl> | 2012-01-18 02:03:21 +0400 |
commit | e493b295987df5608ad2580631b9fd6e9fc7fd3c (patch) | |
tree | ca313f6bab2625cc943e70b8e27b5494d183256d /configure | |
parent | 4a38795b6f9050c12e0851a5bdaa7daf3246854a (diff) |
build: respect --debug configure switch
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/configure b/configure index 5b13b5a36b0..6a709c92443 100755 --- a/configure +++ b/configure @@ -266,13 +266,16 @@ output = { } pprint.pprint(output, indent=2) -fn = os.path.join(root_dir, 'config.gypi') -print "creating ", fn - -f = open(fn, 'w+') -f.write("# Do not edit. Generated by the configure script.\n") -pprint.pprint(output, stream=f, indent=2) -f.write("\n") -f.close() +def write(filename, data): + filename = os.path.join(root_dir, filename) + print "creating ", filename + with open(filename, 'w+') as f: + f.write(data) + +write('config.gypi', "# Do not edit. Generated by the configure script.\n" + + pprint.pformat(output, indent=2)) + +write('config.mk', "# Do not edit. Generated by the configure script.\n" + + ("BUILDTYPE=%s\n" % ('Debug' if options.debug else 'Release'))) subprocess.call(['tools/gyp_node','-f', 'make']) |