Skip to content

Commit

Permalink
build: respect --debug configure switch
Browse files Browse the repository at this point in the history
  • Loading branch information
bnoordhuis committed Jan 17, 2012
1 parent 4a38795 commit e493b29
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ ipch/
*.sdf
*.opensdf

/config.mk
/config.gypi
*-nodegyp*
/gyp-mac-tool
Expand Down
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
-include config.mk

BUILDTYPE ?= Release
PYTHON ?= python

Expand Down
19 changes: 11 additions & 8 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -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'])

0 comments on commit e493b29

Please sign in to comment.