build: make default_configuration consistent with BUILDTYPE
authorShigeki Ohtsu <ohtsu@iij.ad.jp>
Wed, 18 Jan 2012 09:37:02 +0000 (18:37 +0900)
committerBen Noordhuis <info@bnoordhuis.nl>
Thu, 23 Feb 2012 13:11:26 +0000 (14:11 +0100)
common.gypi
configure
tools/gyp_addon

index 00fad43..7c462e7 100644 (file)
@@ -10,7 +10,6 @@
   },
 
   'target_defaults': {
-    'default_configuration': 'Debug',
     'configurations': {
       'Debug': {
         'defines': [ 'DEBUG', '_DEBUG' ],
index e72f9ea..7734a17 100755 (executable)
--- a/configure
+++ b/configure
@@ -189,6 +189,7 @@ def configure_node(o):
   o['variables']['node_install_waf'] = b(not options.without_waf)
   o['variables']['host_arch'] = host_arch()
   o['variables']['target_arch'] = options.dest_cpu or target_arch()
+  o['default_configuration'] = 'Debug' if options.debug else 'Release'
 
   # TODO move to node.gyp
   if sys.platform == 'sunos5':
index 2dac0e0..c47c37f 100755 (executable)
@@ -12,8 +12,10 @@ if __name__ == '__main__':
   args = sys.argv[1:]
   addon_gypi = os.path.join(node_root, 'tools', 'addon.gypi')
   common_gypi = os.path.join(node_root, 'common.gypi')
+  config_gypi = os.path.join(node_root, 'config.gypi')
   args.extend(['-I', addon_gypi])
   args.extend(['-I', common_gypi])
+  args.extend(['-I', config_gypi])
   args.extend(['-Dlibrary=shared_library'])
   args.extend(['-Dvisibility=default'])
   args.extend(['-Dnode_root_dir=%s' % node_root])