0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-21 21:19:50 +01:00

build: respect --debug configure switch

This commit is contained in:
Ben Noordhuis 2012-01-17 23:02:15 +01:00
parent 4a38795b6f
commit e493b29598
3 changed files with 13 additions and 7 deletions

1
.gitignore vendored
View File

@ -31,6 +31,7 @@ ipch/
*.sdf
*.opensdf
/config.mk
/config.gypi
*-nodegyp*
/gyp-mac-tool

View File

@ -1,3 +1,5 @@
-include config.mk
BUILDTYPE ?= Release
PYTHON ?= python

17
configure vendored
View File

@ -266,13 +266,16 @@ output = {
}
pprint.pprint(output, indent=2)
fn = os.path.join(root_dir, 'config.gypi')
print "creating ", fn
def write(filename, data):
filename = os.path.join(root_dir, filename)
print "creating ", filename
with open(filename, 'w+') as f:
f.write(data)
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()
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'])