Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Noordhuis <info@bnoordhuis.nl>2012-01-18 02:02:15 +0400
committerBen Noordhuis <info@bnoordhuis.nl>2012-01-18 02:03:21 +0400
commite493b295987df5608ad2580631b9fd6e9fc7fd3c (patch)
treeca313f6bab2625cc943e70b8e27b5494d183256d /configure
parent4a38795b6f9050c12e0851a5bdaa7daf3246854a (diff)
build: respect --debug configure switch
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure19
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'])