Permalink
Browse files

build: respect --debug configure switch

  • Loading branch information...
1 parent 4a38795 commit e493b295987df5608ad2580631b9fd6e9fc7fd3c @bnoordhuis bnoordhuis committed Jan 17, 2012
Showing with 14 additions and 8 deletions.
  1. +1 −0 .gitignore
  2. +2 −0 Makefile
  3. +11 −8 configure
View
@@ -31,6 +31,7 @@ ipch/
*.sdf
*.opensdf
+/config.mk
/config.gypi
*-nodegyp*
/gyp-mac-tool
View
@@ -1,3 +1,5 @@
+-include config.mk
+
BUILDTYPE ?= Release
PYTHON ?= python
View
@@ -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.